1
0
mirror of https://github.com/luapower/mysql.git synced 2025-07-02 00:10:30 +02:00

ability to configure the client library used

This commit is contained in:
Cosmin Apreutesei
2015-04-27 14:40:53 +03:00
parent 6a5ea5e99f
commit 6fc07cdb73
3 changed files with 219 additions and 178 deletions

View File

@ -12,6 +12,8 @@ A complete, lightweight ffi binding of the mysql client library.
## Summary
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
**[Initialization]**
`mysql.config(['mysql'|'mariadb'|libname|clib]) -> mysql`
**[Connections]**
`mysql.connect(host, [user], [pass], [db], [charset], [port]) -> conn` connect to a mysql server
`mysql.connect(options_t) -> conn` connect to a mysql server
@ -169,6 +171,14 @@ end
print_help'CONCAT%'
~~~
## Initialization
### `mysql.config(['mysql'|'mariadb'|libname|clib]) -> mysql`
Load the mysql client library to use (default is 'mysql').
This function is called on every module-level function.
Calling this function again is a no-op.
## Connections
### `mysql.connect(host, [user], [pass], [db], [charset], [port]) -> conn`
@ -537,4 +547,3 @@ Instruct the server to dump debug info in the log file. `SUPER` priviledge neede
* reader function for getting large blobs in chunks using
mysql_stmt_fetch_column: `stmt:chunks(i[, bufsize])` or `stmt:read()` ?
* support connecting against different runtimes (client_library option)