module Factory: sig end
val connect : string ->
?host:string ->
?port:string -> ?user:string -> ?password:string -> string -> Dbi.connection
Connect to a specific type of database. The first string parameter
* is the database type, eg. "postgres", "mysql", etc.
*
*
Raises Invalid_argument
if the database type is not known.
* May throw other connection-specific SQL errors.
val database_types : unit -> string list
Returns a list of registered database types.
val register : string ->
(?host:string ->
?port:string -> ?user:string -> ?password:string -> string -> Dbi.connection) ->
unit
Specific database drivers register themselves on load (or
Dynlink
) by calling this function. The first argument is the
database type (usually the name of the database engine) and the
second is the connection function.