- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 339 for clause (0.08 sec)
-
callbacks/query.go
} exprs = append(exprs, clause.Expr{SQL: onSQL, Vars: vars}) } } } } return clause.Join{ Type: joinType, Table: clause.Table{Name: relation.FieldSchema.Table, Alias: tableAliasName}, ON: clause.Where{Exprs: exprs}, } } parentTableName := clause.CurrentTable for idx, rel := range relations {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Sun May 25 07:40:40 UTC 2025 - 10.4K bytes - Viewed (1) -
chainable_api.go
// }}) func (db *DB) Order(value interface{}) (tx *DB) { tx = db.getInstance() switch v := value.(type) { case clause.OrderBy: tx.Statement.AddClause(v) case clause.OrderByColumn: tx.Statement.AddClause(clause.OrderBy{ Columns: []clause.OrderByColumn{v}, }) case string: if v != "" { tx.Statement.AddClause(clause.OrderBy{ Columns: []clause.OrderByColumn{{
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Sun May 25 07:40:40 UTC 2025 - 14.8K bytes - Viewed (0) -
finisher_api.go
break } queryDB = tx.Clauses(clause.Gt{Column: clause.Column{Table: clause.CurrentTable, Name: clause.PrimaryKey}, Value: primaryValue}) } tx.RowsAffected = rowsAffected return tx } func (db *DB) assignInterfacesToValue(values ...interface{}) { for _, value := range values { switch v := value.(type) { case []clause.Expression: for _, expr := range v {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Tue Aug 26 06:24:29 UTC 2025 - 22.9K bytes - Viewed (0) -
generics.go
} if len(selectExpr.Exprs) == 0 { selectExpr.Exprs = []clause.Expression{clause.Expr{SQL: "*", Vars: []interface{}{}}} } partitionBy := clause.CommaExpression{} for _, column := range refColumns { partitionBy.Exprs = append(partitionBy.Exprs, clause.Expr{SQL: "?", Vars: []interface{}{clause.Column{Name: column.Name}}})
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Sep 04 13:13:16 UTC 2025 - 15.5K bytes - Viewed (0) -
statement.go
return []clause.Expression{clause.And(conds...)} } return nil } } conds = append(conds, clause.IN{Column: clause.Column{Table: curTable, Name: clause.PrimaryKey}, Values: args}) } } } if len(conds) > 0 { return []clause.Expression{clause.And(conds...)} } return nil } // Build build sql with clauses names func (stmt *Statement) Build(clauses ...string) {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Sep 04 13:13:16 UTC 2025 - 20.8K bytes - Viewed (0) -
association.go
tx = tx.Session(&Session{QueryFields: true}).Clauses(clause.From{Joins: []clause.Join{{ Table: clause.Table{Name: association.Relationship.JoinTable.Table}, ON: clause.Where{Exprs: queryConds}, }}}) } else { tx.Clauses(clause.Where{Exprs: queryConds}) } return tx
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 21.5K bytes - Viewed (0) -
callbacks/create.go
if field.AutoUpdateTime > 0 { assignment := clause.Assignment{Column: clause.Column{Name: field.DBName}, Value: curTime} switch field.AutoUpdateTime { case schema.UnixNanosecond: assignment.Value = curTime.UnixNano() case schema.UnixMillisecond: assignment.Value = curTime.UnixMilli() case schema.UnixSecond: assignment.Value = curTime.Unix() }
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Tue Jul 29 11:06:13 UTC 2025 - 13K bytes - Viewed (0) -
tests/upsert_test.go
} for idx, lang := range langs { lang.Name = lang.Name + "_new" langs[idx] = lang } if err := DB.Clauses(clause.OnConflict{ Columns: []clause.Column{{Name: "code"}}, DoUpdates: clause.AssignmentColumns([]string{"name"}), }, clause.Returning{}).CreateInBatches(&langs, len(langs)).Error; err != nil { t.Fatalf("failed to upsert, got %v", err) } for _, lang := range langs {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Tue Jul 29 11:06:13 UTC 2025 - 13.1K bytes - Viewed (0) -
tests/generics_test.go
for _, user := range users { userIDs = append(userIDs, user.ID) } users2, err := db.Joins(clause.LeftJoin.Association("Manager"), nil). Joins(clause.LeftJoin.Association("Manager.Company"), nil). Joins(clause.LeftJoin.Association("Manager.NamedPet.Toy"), nil). Joins(clause.LeftJoin.Association("NamedPet.Toy"), nil). Joins(clause.LeftJoin.Association("NamedPet").As("t"), nil). Where(map[string]any{"id": userIDs}).Find(ctx)
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Sep 04 13:13:16 UTC 2025 - 28K bytes - Viewed (0) -
gorm.go
tx.Statement = db.Statement.clone() tx.Statement.DB = tx } return tx } return db } // Expr returns clause.Expr, which can be used to pass SQL expression as params func Expr(expr string, args ...interface{}) clause.Expr { return clause.Expr{SQL: expr, Vars: args} } // SetupJoinTable setup join table schema
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Tue Aug 26 06:24:29 UTC 2025 - 12.8K bytes - Viewed (0)