123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- MySQL/OTP – MySQL client library for Erlang/OTP
- Copyright (C) 2014 Viktor Söderqvist
- This file is part of MySQL/OTP.
- MySQL/OTP is free software: you can redistribute it and/or modify it under
- the terms of the GNU Lesser 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 Lesser General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>.
- ------------------------------------------------------------------------
- @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 <a target="_top"
- href="https://github.com/mysql-otp/mysql-otp/">
- https://github.com/mysql-otp/mysql-otp/</a> along with a wiki and an issue
- tracker.
- <img src="https://www.gnu.org/graphics/lgplv3-88x31.png" width="88" height="31"
- style="float:right"/>
- This library is free software licensed under the GNU LGPL which allows you to
- use it in non-free applications and applications with other licenses. This
- documentation is generated from the source code and thus goes under the same
- license as the library itself.
- <h2>API functions</h2>
- The <a href="mysql.html">mysql</a> module contains all the API
- functions for connecting to and interacting with a MySQL server.
- The <a href="mysql_connection.html">mysql_connection</a> 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.
- <h2>Value representation</h2>
- <table>
- <thead>
- <tr>
- <th>MySQL</th>
- <th>Erlang</th>
- <th>Example</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>INT, TINYINT, etc.</td>
- <td>`integer()'</td>
- <td>`42'</td>
- </tr>
- <tr>
- <td>VARCHAR, TEXT, etc.</td>
- <td>`iodata()'</td>
- <td>`<<"foo">>, "bar"'</td>
- </tr>
- <tr>
- <td>FLOAT, DOUBLE</td>
- <td>`float()'</td>
- <td>`3.14'</td>
- </tr>
- <tr>
- <td>DECIMAL</td>
- <td>`binary()'</td>
- <td>`<<"3.140">>'</td>
- </tr>
- <tr>
- <td>DATETIME, TIMESTAMP</td>
- <td>`calendar:datetime()'</td>
- <td>`{{2014, 11, 18}, {10, 22, 36}}'</td>
- </tr>
- <tr>
- <td>DATE</td>
- <td>`calendar:date()'</td>
- <td>`{2014, 11, 18}'</td>
- </tr>
- <tr>
- <td>TIME</td>
- <td>`{Days, calendar:time()}'</td>
- <td>`{0, {10, 22, 36}}'</td>
- </tr>
- <tr>
- <td>NULL</td>
- <td>`null'</td>
- <td>`null'</td>
- </tr>
- </tbody>
- </table>
- <h2>Example with Poolboy</h2>
- TODO
|