package mariadb

  1. Overview
  2. Docs

This is the nonblocking MariaDB API. The interface contains a functor Make which, given a way to wait for a connection socket to be ready for reading or writing, returns a module with the same signature S as the traditional blocking API.

module Status : sig ... end
type t

The type of nonblocking database handles.

val fd : t -> Unix.file_descr

The underlying file descriptor of the database connection.

val timeout : t -> int

If a nonblocking operation returns a Status.t indicating a timeout event, this function can be used to obtain the value, in seconds, after which the timeout has occured.

val timeout_ms : t -> int

Same as timeout but with millisecond resolution.

module type Wait = sig ... end

Input module signature for the functor that generates a nonblocking connection module.

module type S = sig ... end
module Make (W : Wait) : S with type 'a future := 'a W.IO.future

Functor that generates a nonblocking database interface, given a nonblocking IO monad and a way to wait for connection socket events.

OCaml

Innovation. Community. Security.