Commit db86f485 authored by Vladimir Barsukov's avatar Vladimir Barsukov
Browse files

db default

parent 89566a93
...@@ -358,8 +358,8 @@ func (d *Pool) prepare(sql string, param map[string]any) (string, []any) { ...@@ -358,8 +358,8 @@ func (d *Pool) prepare(sql string, param map[string]any) (string, []any) {
args = append(args, v) args = append(args, v)
} }
case string: case string:
if v == "NULL" { if v == "NULL" || v == "DEFAULT" {
sql = strings.ReplaceAll(sql, ":"+n+":", "NULL") sql = strings.ReplaceAll(sql, ":"+n+":", v)
} else { } else {
idx++ idx++
sql = strings.ReplaceAll(sql, ":"+n+":", fmt.Sprintf("$%d", idx)) sql = strings.ReplaceAll(sql, ":"+n+":", fmt.Sprintf("$%d", idx))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment