mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
fix issue of OmitEmptyWhere in Builder for package gdb (#2195)
This commit is contained in:
@ -116,7 +116,7 @@ func (b *WhereBuilder) convertWhereBuilder(where interface{}, args []interface{}
|
||||
}
|
||||
if builder != nil {
|
||||
conditionWhere, conditionArgs := builder.Build()
|
||||
if len(b.whereHolder) == 0 {
|
||||
if conditionWhere != "" && len(b.whereHolder) == 0 {
|
||||
conditionWhere = "(" + conditionWhere + ")"
|
||||
}
|
||||
return conditionWhere, conditionArgs
|
||||
|
||||
Reference in New Issue
Block a user