field IsNull, IsNotNull methods
This commit is contained in:
12
qry.go
12
qry.go
@@ -208,12 +208,16 @@ func (cv *Cond) Condition(args *[]any, argIdx int) string {
|
||||
}
|
||||
|
||||
// 2. normal condition
|
||||
*args = append(*args, cv.Val)
|
||||
var op string
|
||||
if strings.HasSuffix(cv.op, "$") {
|
||||
op = cv.op + strconv.Itoa(argIdx+1)
|
||||
if cv.Val != nil {
|
||||
*args = append(*args, cv.Val)
|
||||
if strings.HasSuffix(cv.op, "$") {
|
||||
op = cv.op + strconv.Itoa(argIdx+1)
|
||||
} else {
|
||||
op = strings.Replace(cv.op, "$", "$"+strconv.Itoa(argIdx+1), 1)
|
||||
}
|
||||
} else {
|
||||
op = strings.Replace(cv.op, "$", "$"+strconv.Itoa(argIdx+1), 1)
|
||||
op = cv.op
|
||||
}
|
||||
|
||||
if cv.action == CondActionNeedToClose {
|
||||
|
Reference in New Issue
Block a user