From 444d7858b8f394ca7b0003b92d65adcf01a63407 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Mon, 4 Dec 2017 10:10:29 +0000 Subject: [PATCH] Enable use of VOID in field VALUE statements It is now possible to specify VOID values in field VALUE statements, to remove the field entirely. --- db/merge.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/db/merge.go b/db/merge.go index 4fede17b..f8ae3ba7 100644 --- a/db/merge.go +++ b/db/merge.go @@ -315,7 +315,12 @@ func (d *document) mrgFld(ctx context.Context) (err error) { } } - d.current.Iff(val, key) + switch val.(type) { + default: + d.current.Iff(val, key) + case *sql.Void: + d.current.Del(key) + } return