Skip to content

Commit f11ea53

Browse files
authored
Add missing column name to INSERTs on NULL columns (#9)
1 parent cbc6436 commit f11ea53

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

db.go

+1
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ func buildQueryForRow(primaryKeys PrimaryKeysResult, rowId string, row Row, depe
209209
// Technically we allow more than null strings in ripoff files for templating purposes,
210210
// but full support (ex: escaping arrays, what to do with maps, etc.) is quite hard so tabling that for now.
211211
if valueRaw == nil {
212+
columns = append(columns, pq.QuoteIdentifier(column))
212213
values = append(values, "NULL")
213214
setStatements = append(setStatements, fmt.Sprintf("%s = %s", pq.QuoteIdentifier(column), "NULL"))
214215
} else {

0 commit comments

Comments
 (0)