diff options
Diffstat (limited to 'sqlite3_vtable.go')
-rw-r--r-- | sqlite3_vtable.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sqlite3_vtable.go b/sqlite3_vtable.go index 129498f..8bef291 100644 --- a/sqlite3_vtable.go +++ b/sqlite3_vtable.go @@ -537,7 +537,14 @@ func goVUpdate(pVTab unsafe.Pointer, argc C.int, argv **C.sqlite3_value, pRowid if err != nil { 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) } switch { |