Additional tests for 'ON CONFLICT DO NOTHING without conflict target does not appear in generated SQL' bug.
This commit is contained in:
parent
60d8f15513
commit
39de87671e
5 changed files with 71 additions and 3 deletions
|
|
@ -2,6 +2,7 @@ package sqlite
|
|||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/go-jet/jet/v2/internal/utils/is"
|
||||
)
|
||||
|
||||
type onConflict interface {
|
||||
|
|
@ -37,7 +38,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.do == nil {
|
||||
if is.Nil(o.do) {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue