Merge remote-tracking branch 'upstream/master' into stmt-cache
This commit is contained in:
commit
adfa331ece
21 changed files with 218 additions and 54 deletions
|
|
@ -73,6 +73,12 @@ var DateTimeExp = jet.TimestampExp
|
|||
// Does not add sql cast to generated sql builder output.
|
||||
var TimestampExp = jet.TimestampExp
|
||||
|
||||
// CustomExpression is used to define custom expressions.
|
||||
var CustomExpression = jet.CustomExpression
|
||||
|
||||
// Token is used to define custom token in a custom expression.
|
||||
type Token = jet.Token
|
||||
|
||||
// RawArgs is type used to pass optional arguments to Raw method
|
||||
type RawArgs = map[string]interface{}
|
||||
|
||||
|
|
@ -96,3 +102,6 @@ var Func = jet.Func
|
|||
|
||||
// NewEnumValue creates new named enum value
|
||||
var NewEnumValue = jet.NewEnumValue
|
||||
|
||||
// BinaryOperator can be used to use custom or unsupported operators that take two operands.
|
||||
var BinaryOperator = jet.BinaryOperator
|
||||
|
|
|
|||
|
|
@ -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