ON CONFLICT DO NOTHING without a conflict target is valid SQL as far as Postgres is concerned.
This commit is contained in:
parent
1b63280b74
commit
0d250f5b41
2 changed files with 3 additions and 2 deletions
|
|
@ -44,7 +44,7 @@ func (o *onConflictClause) DO_UPDATE(action conflictAction) InsertStatement {
|
|||
}
|
||||
|
||||
func (o *onConflictClause) Serialize(statementType jet.StatementType, out *jet.SQLBuilder, options ...jet.SerializeOption) {
|
||||
if len(o.indexExpressions) == 0 && o.constraint == "" {
|
||||
if len(o.indexExpressions) == 0 && o.constraint == "" && o.do != jet.Keyword("DO NOTHING") {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue