Module Sqlite3.Data
val opt_text : string option -> t
opt_text value
convertsvalue
to aData.t
TEXT
value, convertingNone
to SQLiteNULL
.
val opt_int : int option -> t
opt_int value
convertsvalue
to aData.t
INT
value, convertingNone
to SQLiteNULL
.
val opt_nativeint : nativeint option -> t
opt_nativeint value
convertsvalue
to aData.t
INT
value, convertingNone
to SQLiteNULL
.
val opt_int32 : int32 option -> t
opt_int32 value
convertsvalue
to aData.t
INT
value, convertingNone
to SQLiteNULL
.
val opt_int64 : int64 option -> t
opt_int64 value
convertsvalue
to aData.t
INT
value, convertingNone
to SQLiteNULL
.
val opt_float : float option -> t
opt_float value
convertsvalue
to aData.t
FLOAT
value, convertingNone
to SQLiteNULL
.
val opt_bool : bool option -> t
opt_bool value
convertsvalue
to aData.t
INT
value, convertingNone
to SQLiteNULL
.
val to_string_exn : t -> string
to_string_exn data
convertsTEXT
andBLOB
data
to a string.- raises DataTypeError
if
data
is invalid.
val to_int_exn : t -> int
to_int_exn data
convertsINT
data
to an int.- raises DataTypeError
if
data
is invalid.
- raises Failure
if the integer conversion over- or underflows.
val to_nativeint_exn : t -> nativeint
to_nativeint_exn data
convertsINT
data
to a nativeint.- raises DataTypeError
if
data
is invalid.
- raises Failure
if the integer conversion over- or underflows.
val to_int32_exn : t -> int32
to_int32_exn data
convertsINT
data
to an int32.- raises DataTypeError
if
data
is invalid.
- raises Failure
if the integer conversion over- or underflows.
val to_int64_exn : t -> int64
to_int64_exn data
convertsINT
data
to an int64.- raises DataTypeError
if
data
is invalid.
val to_float_exn : t -> float
to_float_exn data
convertsFLOAT
data
to a float.- raises DataTypeError
if
data
is invalid.
val to_bool_exn : t -> bool
to_bool_exn data
convertsINT
data
to a bool.- raises DataTypeError
if
data
is invalid.
val to_string : t -> string option
to_string data
convertsdata
toSome string
orNone
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
convertsdata
toSome int
orNone
if it is not a valid conversion.- raises Failure
if the integer conversion over- or underflows.
val to_nativeint : t -> nativeint option
to_nativeint data
convertsdata
toSome nativeint
orNone
if it is not a valid conversion.- raises Failure
if the integer conversion over- or underflows.
val to_int32 : t -> int32 option
to_int32 data
convertsdata
toSome int32
orNone
if it is not a valid conversion.- raises Failure
if the integer conversion over- or underflows.
val to_int64 : t -> int64 option
to_int64 data
convertsdata
toSome int64
orNone
if it is not a valid conversion.
val to_float : t -> float option
to_float data
convertsdata
toSome float
orNone
if it is not a valid conversion.
val to_bool : t -> bool option
to_bool data
convertsdata
toSome bool
orNone
if it is not a valid conversion.
val to_string_coerce : t -> string
to_string_coerce data
coercesdata
to a string, using coercion on ints, NULLs, floats, and other data types.
val to_string_debug : t -> string
to_string_debug data
convertsdata
to a string including the data constructor. The contents of blobs will not be printed, only its length. Useful for debugging.