From f11ea539cf91b4bbee56c3779125e20d2fe471c7 Mon Sep 17 00:00:00 2001 From: Samuel Mortenson Date: Tue, 7 Jan 2025 11:39:38 -0800 Subject: [PATCH] Add missing column name to INSERTs on NULL columns (#9) --- db.go | 1 + 1 file changed, 1 insertion(+) diff --git a/db.go b/db.go index 47b5ca3..af169c9 100644 --- a/db.go +++ b/db.go @@ -209,6 +209,7 @@ func buildQueryForRow(primaryKeys PrimaryKeysResult, rowId string, row Row, depe // Technically we allow more than null strings in ripoff files for templating purposes, // but full support (ex: escaping arrays, what to do with maps, etc.) is quite hard so tabling that for now. if valueRaw == nil { + columns = append(columns, pq.QuoteIdentifier(column)) values = append(values, "NULL") setStatements = append(setStatements, fmt.Sprintf("%s = %s", pq.QuoteIdentifier(column), "NULL")) } else {