add UseColums function to avoid extra allocation performed by Colums function
fix name tidy adding SetWhere adding SetWhere fix go mod fix comment style revert go mod Avoid to append if no needed fix git ignore revert change in go.sum/go.mod adding specific benchmark
This commit is contained in:
committed by
Michal Jan Matczuk
parent
a57d58f38f
commit
9239d9c4b4
12
qb/update.go
12
qb/update.go
@@ -212,14 +212,22 @@ func (b *UpdateBuilder) removeValue(column string, value value) *UpdateBuilder {
|
||||
// Where adds an expression to the WHERE clause of the query. Expressions are
|
||||
// ANDed together in the generated CQL.
|
||||
func (b *UpdateBuilder) Where(w ...Cmp) *UpdateBuilder {
|
||||
b.where = append(b.where, w...)
|
||||
if len(b.where) == 0 {
|
||||
b.where = w
|
||||
} else {
|
||||
b.where = append(b.where, w...)
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// If adds an expression to the IF clause of the query. Expressions are ANDed
|
||||
// together in the generated CQL.
|
||||
func (b *UpdateBuilder) If(w ...Cmp) *UpdateBuilder {
|
||||
b._if = append(b._if, w...)
|
||||
if len(b._if) == 0 {
|
||||
b._if = w
|
||||
} else {
|
||||
b._if = append(b._if, w...)
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user