Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
The module for blocking MariaDB API calls. It should be possible to call functions from this module when using MySQL's or an older version of MariaDB's libmysqlclient.
type 'a result = ('a, error) Pervasives.result
The result of MariaDB API calls.
module Time : sig ... end
Module representing MariaDB date- and time-related values.
module Field : sig ... end
This module defines a database field retrieved by a query.
module Row : sig ... end
A module representing database rows. Rows can be retrieved as different data structures, which as passed to the row retrieval functions from the Res
module. There's built-in support for fetching rows as arrays and maps and hash tables of field name to field, but any module conforming to Row.S
can be provided to those functions.
module Res : sig ... end
The module containing operations on MariaDB query results.
module Stmt : sig ... end
The module contains operations on MariaDB prepared statements.
type client_option =
| Connect_timeout of int
| Compress
| Named_pipe of string
| Init_command of string
| Read_default_file of string
| Read_default_group of string
| Set_charset_dir of string
| Set_charset_name of string
| Local_infile of bool
| Protocol of protocol
| Read_timeout of int
| Write_timeout of int
| Secure_auth of bool
| Report_data_truncation of bool
| Reconnect of bool
| Ssl_verify_server_cert of bool
| Plugin_dir of string
| Default_auth of string
| Bind of string
| Ssl_key of string
| Ssl_cert of string
| Ssl_ca of string
| Ssl_capath of string
| Ssl_cipher of string
| Ssl_crl of string
| Ssl_crlpath of string
| Connect_attr_reset
| Connect_attr_add of string * string
| Connect_attr_delete of string
| Server_public_key of string
| Enable_cleartext_plugin of bool
val connect :
?host:string ->
?user:string ->
?pass:string ->
?db:string ->
?port:int ->
?socket:string ->
?flags:flag list ->
unit ->
t result
Connect to a MariaDB server at the specified location with the specified flags and optionally select a database db
.
val close : t -> unit
Close a database handle.
Sets the connection character set to the given parameter.
change_user mariadb user pass db
changes the connection user to user
with password password
and optionally change to database db
.
val set_client_option : t -> client_option -> unit
Sets the given client option on the connection.
val set_server_option : t -> server_option -> unit result
Sets the given server option on the connection.
Checks if the connection to the MariaDB server is working. If the Reconnect
option is set and the connection is down, a reconnect attempt will be made.
Rolls back the current transaction. Does not work if autocommit is enabled.