diff options
author | Kenneth Shaw <kenshaw@gmail.com> | 2017-04-07 14:23:08 +0700 |
---|---|---|
committer | Kenneth Shaw <kenshaw@gmail.com> | 2017-04-07 14:23:08 +0700 |
commit | 18135fa650d3bd5f54e89ce3668e005468162266 (patch) | |
tree | 441cfc74bbce410a52f149dc34b2cc753f95ff50 /sqlite3_vtable.go | |
parent | Merge pull request #399 from kenshaw/add-vtable-updater-hook (diff) | |
download | golite-18135fa650d3bd5f54e89ce3668e005468162266.tar.gz golite-18135fa650d3bd5f54e89ce3668e005468162266.tar.xz |
Adding unit test for VTable Insert/Update/Delete
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 { |