mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-12 05:59:14 +00:00
Optimize. (#51)
This commit is contained in:
10
value.go
10
value.go
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user