%% MySQL/OTP – a MySQL driver for Erlang/OTP %% Copyright (C) 2014 Viktor Söderqvist %% %% This program is free software: you can redistribute it and/or modify %% it under the terms of the GNU General Public License as published by %% the Free Software Foundation, either version 3 of the License, or %% (at your option) any later version. %% %% This program is distributed in the hope that it will be useful, %% but WITHOUT ANY WARRANTY; without even the implied warranty of %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %% GNU General Public License for more details. %% %% You should have received a copy of the GNU General Public License %% along with this program. If not, see . ------------------------------------------------------------------------ @title MySQL/OTP client library @doc This is the documentation generated from the Erlang source code using EDoc. The source code is available on the github page https://github.com/mysql-otp/mysql-otp/ along with a wiki and an issue tracker. This documentation is free to to copy, change and use for any purpose in accordance with the GNU GPL 3 or any later version as it is generated from the the source code itself which has this license. See the LICENSE file in the source code.

API functions

The mysql module contains all the API functions for connecting to and interacting with a MySQL server. The mysql_connection module is the `gen_server' callback module holding a connection so you may want to refer to that sometimes (e.g. in the Modules part in a childspec for a supervisor). The other modules are for the internals.

Value representation

MySQL Erlang Example
INT, TINYINT, etc. `integer()' `42'
VARCHAR, TEXT, etc. `iodata()' `<<"foo">>, "bar"'
FLOAT, DOUBLE `float()' `3.14'
DECIMAL `binary()' `<<"3.140">>'
DATETIME, TIMESTAMP `calendar:datetime()' `{{2014, 11, 18}, {10, 22, 36}}'
DATE `calendar:date()' `{2014, 11, 18}'
TIME `{Days, calendar:time()}' `{0, {10, 22, 36}}'
NULL `null' `null'

Example with Poolboy

TODO