mirror of
https://github.com/hanzoai/sqlbuilder.git
synced 2026-10-01 00:37:42 +00:00
Merge remote-tracking branch 'origin/master' into frok/master
# Conflicts: # update.go
This commit is contained in:
@@ -125,7 +125,10 @@ func (db *DeleteBuilder) TableNames() []string {
|
||||
return tableNames
|
||||
}
|
||||
|
||||
// Where sets expressions of WHERE in DELETE.
|
||||
// Where adds expressions to the WHERE clause in DELETE.
|
||||
//
|
||||
// Multiple calls to Where will join expressions with AND.
|
||||
// To reset the WHERE clause, set the WhereClause field to nil.
|
||||
func (db *DeleteBuilder) Where(andExpr ...string) *DeleteBuilder {
|
||||
if len(andExpr) == 0 || estimateStringsBytes(andExpr) == 0 {
|
||||
return db
|
||||
|
||||
@@ -205,7 +205,10 @@ func (sb *SelectBuilder) JoinWithOption(option JoinOption, table string, onExpr
|
||||
return sb
|
||||
}
|
||||
|
||||
// Where sets expressions of WHERE in SELECT.
|
||||
// Where adds expressions to the WHERE clause in SELECT.
|
||||
//
|
||||
// Multiple calls to Where will join expressions with AND.
|
||||
// To reset the WHERE clause, set the WhereClause field to nil.
|
||||
func (sb *SelectBuilder) Where(andExpr ...string) *SelectBuilder {
|
||||
if len(andExpr) == 0 || estimateStringsBytes(andExpr) == 0 {
|
||||
return sb
|
||||
|
||||
@@ -149,7 +149,10 @@ func (ub *UpdateBuilder) From(table ...string) *UpdateBuilder {
|
||||
return ub
|
||||
}
|
||||
|
||||
// Where sets expressions of WHERE in UPDATE.
|
||||
// Where adds expressions to the WHERE clause in UPDATE.
|
||||
//
|
||||
// Multiple calls to Where will join expressions with AND.
|
||||
// To reset the WHERE clause, set the WhereClause field to nil.
|
||||
func (ub *UpdateBuilder) Where(andExpr ...string) *UpdateBuilder {
|
||||
if len(andExpr) == 0 || estimateStringsBytes(andExpr) == 0 {
|
||||
return ub
|
||||
|
||||
Reference in New Issue
Block a user