class virtual connection : ?host:string ->
?port:string -> ?user:string -> ?password:string -> string -> object end
val mutable closed : bool
method id : int
method closed : bool
true
if this database handle has been closed. Subsequent
operations on the handle will fail.method host : string option
host
parameter.method port : string option
port
parameter.method user : string option
user
parameter.method password : string option
password
parameter.method database : string
method virtual database_type : string
method virtual prepare : string -> statement
?
placeholders which can be substituted
for values when the statement is executed.method prepare_cached : string -> statement
prepare
except that, if possible, it
caches the statement handle with the database object. Future calls
with the same query string return the previously prepared statement.
For databases which support prepared statement handles, this avoids
a round-trip to the database, and an expensive recompilation of the
statement.method ex : string -> arg_t list -> statement
let sth = dbh#prepare_cached stmt in sth#execute [args ...]; sth
method commit : unit
method rollback : unit
method register_precommit : (unit -> unit) -> precommit_handle
method unregister_precommit : precommit_handle -> unit
method register_postrollback : (unit -> unit) -> postrollback_handle
method unregister_postrollback : postrollback_handle -> unit
method close : unit
method ping : bool
true
. If the database is down or
unresponsive, it returns false
. This method should never throw
an exception (unless, perhaps, there is some sort of catastrophic
internal error in the Dbi
library or the driver).method set_debug : bool -> unit
method debug : bool