mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-19 01:24:20 +01:00
add support for bool type
This commit is contained in:
@@ -243,6 +243,13 @@ func buildArgs(args []driver.Value) ([]limboValue, func(), error) {
|
|||||||
case float64:
|
case float64:
|
||||||
limboVal.Type = realVal
|
limboVal.Type = realVal
|
||||||
limboVal.Value = *(*[8]byte)(unsafe.Pointer(&val))
|
limboVal.Value = *(*[8]byte)(unsafe.Pointer(&val))
|
||||||
|
case bool:
|
||||||
|
limboVal.Type = intVal
|
||||||
|
boolAsInt := int64(0)
|
||||||
|
if val {
|
||||||
|
boolAsInt = 1
|
||||||
|
}
|
||||||
|
limboVal.Value = *(*[8]byte)(unsafe.Pointer(&boolAsInt))
|
||||||
case string:
|
case string:
|
||||||
limboVal.Type = textVal
|
limboVal.Type = textVal
|
||||||
cstr := CString(val)
|
cstr := CString(val)
|
||||||
|
|||||||
Reference in New Issue
Block a user