Sqlite3.Data
val opt_text : string option -> t
opt_text value
converts value
to a Data.t
TEXT
value, converting None
to SQLite NULL
.
val opt_int : int option -> t
opt_int value
converts value
to a Data.t
INT
value, converting None
to SQLite NULL
.
val opt_nativeint : nativeint option -> t
opt_nativeint value
converts value
to a Data.t
INT
value, converting None
to SQLite NULL
.
val opt_int32 : int32 option -> t
opt_int32 value
converts value
to a Data.t
INT
value, converting None
to SQLite NULL
.
val opt_int64 : int64 option -> t
opt_int64 value
converts value
to a Data.t
INT
value, converting None
to SQLite NULL
.
val opt_float : float option -> t
opt_float value
converts value
to a Data.t
FLOAT
value, converting None
to SQLite NULL
.
val opt_bool : bool option -> t
opt_bool value
converts value
to a Data.t
INT
value, converting None
to SQLite NULL
.
val to_string_exn : t -> string
to_string_exn data
converts TEXT
and BLOB
data
to a string.
val to_int_exn : t -> int
to_int_exn data
converts INT
data
to an int.
val to_nativeint_exn : t -> nativeint
to_nativeint_exn data
converts INT
data
to a nativeint.
val to_int32_exn : t -> int32
to_int32_exn data
converts INT
data
to an int32.
val to_int64_exn : t -> int64
to_int64_exn data
converts INT
data
to an int64.
val to_float_exn : t -> float
to_float_exn data
converts FLOAT
data
to a float.
val to_bool_exn : t -> bool
to_bool_exn data
converts INT
data
to a bool.
val to_string : t -> string option
to_string data
converts data
to Some string
or None
if it is not a valid conversion. This method also converts data of type BLOB to a string.
val to_int : t -> int option
to_int data
converts data
to Some int
or None
if it is not a valid conversion.
val to_nativeint : t -> nativeint option
to_nativeint data
converts data
to Some nativeint
or None
if it is not a valid conversion.
val to_int32 : t -> int32 option
to_int32 data
converts data
to Some int32
or None
if it is not a valid conversion.
val to_int64 : t -> int64 option
to_int64 data
converts data
to Some int64
or None
if it is not a valid conversion.
val to_float : t -> float option
to_float data
converts data
to Some float
or None
if it is not a valid conversion.
val to_bool : t -> bool option
to_bool data
converts data
to Some bool
or None
if it is not a valid conversion.
val to_string_coerce : t -> string
to_string_coerce data
coerces data
to a string, using coercion on ints, NULLs, floats, and other data types.
val to_string_debug : t -> string
to_string_debug data
converts data
to a string including the data constructor. The contents of blobs will not be printed, only its length. Useful for debugging.