- Sort Score
- Result 10 results
- Languages All
Results 11 - 18 of 18 for MergeClause (0.14 sec)
-
clause/set.go
} } else { builder.WriteQuoted(Column{Name: PrimaryKey}) builder.WriteByte('=') builder.WriteQuoted(Column{Name: PrimaryKey}) } } // MergeClause merge assignments clauses func (set Set) MergeClause(clause *Clause) { copiedAssignments := make([]Assignment, len(set)) copy(copiedAssignments, set) clause.Expression = Set(copiedAssignments) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Nov 29 03:02:44 UTC 2021 - 1.4K bytes - Viewed (0) -
clause/where.go
builder.WriteByte('(') expr.Build(builder) builder.WriteByte(')') wrapInParentheses = false } else { expr.Build(builder) } } } // MergeClause merge where clauses func (where Where) MergeClause(clause *Clause) { if w, ok := clause.Expression.(Where); ok { exprs := make([]Expression, len(w.Exprs)+len(where.Exprs)) copy(exprs, w.Exprs) copy(exprs[len(w.Exprs):], where.Exprs)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Apr 25 12:22:53 UTC 2024 - 5.1K bytes - Viewed (0) -
soft_delete.go
Field *schema.Field } func (sd SoftDeleteQueryClause) Name() string { return "" } func (sd SoftDeleteQueryClause) Build(clause.Builder) { } func (sd SoftDeleteQueryClause) MergeClause(*clause.Clause) { } func (sd SoftDeleteQueryClause) ModifyStatement(stmt *Statement) { if _, ok := stmt.Clauses["soft_delete_enabled"]; !ok && !stmt.Statement.Unscoped { if c, ok := stmt.Clauses["WHERE"]; ok {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Feb 01 06:40:55 UTC 2023 - 4.5K bytes - Viewed (1) -
clause/delete.go
return "DELETE" } func (d Delete) Build(builder Builder) { builder.WriteString("DELETE") if d.Modifier != "" { builder.WriteByte(' ') builder.WriteString(d.Modifier) } } func (d Delete) MergeClause(clause *Clause) { clause.Name = "" clause.Expression = d
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Mar 09 09:07:00 UTC 2020 - 359 bytes - Viewed (0) -
clause/clause.go
package clause // Interface clause interface type Interface interface { Name() string Build(Builder) MergeClause(*Clause) } // ClauseBuilder clause builder, allows to customize how to build clause type ClauseBuilder func(Clause, Builder) type Writer interface { WriteByte(byte) error WriteString(string) (int, error) } // Builder builder interface type Builder interface { Writer WriteQuoted(field interface{})
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Feb 02 09:15:08 UTC 2023 - 1.7K bytes - Viewed (0) -
clause/select.go
} for idx, column := range s.Columns { if idx > 0 { builder.WriteByte(',') } builder.WriteQuoted(column) } } else { builder.WriteByte('*') } } func (s Select) MergeClause(clause *Clause) { if s.Expression != nil { if s.Distinct { if expr, ok := s.Expression.(Expr); ok { expr.SQL = "DISTINCT " + expr.SQL clause.Expression = expr return } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jul 14 07:51:24 UTC 2021 - 1.1K bytes - Viewed (0) -
tests/associations_test.go
} func (sd emptyQueryClause) Name() string { return "empty" } func (sd emptyQueryClause) Build(clause.Builder) { } func (sd emptyQueryClause) MergeClause(*clause.Clause) { } func (sd emptyQueryClause) ModifyStatement(stmt *gorm.Statement) { // do nothing } func TestAssociationEmptyQueryClause(t *testing.T) { type Organization struct {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Feb 08 08:29:09 UTC 2023 - 10.9K bytes - Viewed (0) -
statement.go
stmt.AddVar(writer, nil) } else { stmt.AddVar(writer, v.GormValue(stmt.Context, stmt.DB)) } case clause.Interface: c := clause.Clause{Name: v.Name()} v.MergeClause(&c) c.Build(stmt) case clause.Expression: v.Build(stmt) case driver.Valuer: stmt.Vars = append(stmt.Vars, v) stmt.DB.Dialector.BindVarTo(writer, stmt, v) case []byte:
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 19.9K bytes - Viewed (0)