Merge pull request #1431 from mattn/fix-vtable-filter-null
Translate SQL NULL filter arguments to nil like goVUpdate
This commit is contained in:
@@ -536,7 +536,14 @@ func goVFilter(pCursor unsafe.Pointer, idxNum C.int, idxName *C.char, argc C.int
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return mPrintf("%s", err.Error())
|
return mPrintf("%s", err.Error())
|
||||||
}
|
}
|
||||||
vals = append(vals, conv.Interface())
|
|
||||||
|
// work around for SQLITE_NULL
|
||||||
|
x := conv.Interface()
|
||||||
|
if z, ok := x.([]byte); ok && z == nil {
|
||||||
|
x = nil
|
||||||
|
}
|
||||||
|
|
||||||
|
vals = append(vals, x)
|
||||||
}
|
}
|
||||||
err := vtc.vTabCursor.Filter(int(idxNum), C.GoString(idxName), vals)
|
err := vtc.vTabCursor.Filter(int(idxNum), C.GoString(idxName), vals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user