Optimize. (#51)

This commit is contained in:
Nuno Cruces
2024-01-11 02:18:12 +00:00
committed by GitHub
parent 97f2b73701
commit 6b0c2c0554
12 changed files with 147 additions and 85 deletions

View File

@@ -50,7 +50,7 @@ func (dup *Value) Close() error {
return nil
}
// Type returns the initial [Datatype] of the value.
// Type returns the initial datatype of the value.
//
// https://sqlite.org/c3ref/value_blob.html
func (v Value) Type() Datatype {
@@ -58,6 +58,14 @@ func (v Value) Type() Datatype {
return Datatype(r)
}
// Type returns the numeric datatype of the value.
//
// https://sqlite.org/c3ref/value_blob.html
func (v Value) NumericType() Datatype {
r := v.c.call("sqlite3_value_numeric_type", v.protected())
return Datatype(r)
}
// Bool returns the value as a bool.
// SQLite does not have a separate boolean storage class.
// Instead, boolean values are retrieved as integers,