- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for statement (0.15 sec)
-
statement.go
subdb := v.Session(&Session{Logger: logger.Discard, DryRun: true}).getInstance() if v.Statement.SQL.Len() > 0 { var ( vars = subdb.Statement.Vars sql = v.Statement.SQL.String() ) subdb.Statement.Vars = make([]interface{}, 0, len(vars)) for _, vv := range vars { subdb.Statement.Vars = append(subdb.Statement.Vars, vv) bindvar := strings.Builder{}
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 19.8K bytes - Viewed (0) -
scan.go
if isArrayKind { db.Statement.ReflectValue.Set(reflect.Zero(reflectValue.Type())) } else { // if the slice cap is externally initialized, the externally initialized slice is directly used here if reflectValue.Cap() == 0 { db.Statement.ReflectValue.Set(reflect.MakeSlice(reflectValue.Type(), 0, 20)) } else { reflectValue.SetLen(0) db.Statement.ReflectValue.Set(reflectValue) }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Apr 26 09:53:11 GMT 2024 - 9.8K bytes - Viewed (0) -
callbacks/query.go
db.Statement.AddClause(c) } } if db.Statement.SQL.Len() == 0 { db.Statement.SQL.Grow(100) clauseSelect := clause.Select{Distinct: db.Statement.Distinct} if db.Statement.ReflectValue.Kind() == reflect.Struct && db.Statement.ReflectValue.Type() == db.Statement.Schema.ModelType { var conds []clause.Expression for _, primaryField := range db.Statement.Schema.PrimaryFields {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Jan 29 03:34:57 GMT 2024 - 9.9K bytes - Viewed (0) -
finisher_api.go
case string: if field := db.Statement.Schema.LookUpField(column); field != nil { db.AddError(field.Set(db.Statement.Context, db.Statement.ReflectValue, eq.Value)) } case clause.Column: if field := db.Statement.Schema.LookUpField(column.Name); field != nil { db.AddError(field.Set(db.Statement.Context, db.Statement.ReflectValue, eq.Value)) } }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 22.7K bytes - Viewed (0) -
callbacks/associations.go
if _, zero := rel.Field.ValueOf(db.Statement.Context, db.Statement.ReflectValue); !zero { rv := rel.Field.ReflectValueOf(db.Statement.Context, db.Statement.ReflectValue) // relation reflect value if rv.Kind() != reflect.Ptr { rv = rv.Addr() } if saveAssociations(db, rel, rv, selectColumns, restricted, nil) == nil { setupReferences(db.Statement.ReflectValue, rv) } } }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Apr 11 03:06:13 GMT 2023 - 14.3K bytes - Viewed (0) -
chainable_api.go
j := join{ Name: query, Conds: args, Selects: db.Statement.Selects, Omits: db.Statement.Omits, JoinType: joinType, } if where, ok := db.Statement.Clauses["WHERE"].Expression.(clause.Where); ok { j.On = &where } tx.Statement.Joins = append(tx.Statement.Joins, j) return } } tx.Statement.Joins = append(tx.Statement.Joins, join{Name: query, Conds: args, JoinType: joinType}) return
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Apr 17 03:38:55 GMT 2024 - 14.3K bytes - Viewed (1) -
migrator/migrator.go
GormDBDataType(*gorm.DB, *schema.Field) string } // RunWithValue run migration with statement value func (m Migrator) RunWithValue(value interface{}, fc func(*gorm.Statement) error) error { stmt := &gorm.Statement{DB: m.DB} if m.DB.Statement != nil { stmt.Table = m.DB.Statement.Table stmt.TableExpr = m.DB.Statement.TableExpr } if table, ok := value.(string); ok { stmt.Table = table
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Apr 26 07:15:49 GMT 2024 - 29K bytes - Viewed (0) -
callbacks/create.go
if db.Statement.Schema != nil { if !db.Statement.Unscoped { for _, c := range db.Statement.Schema.CreateClauses { db.Statement.AddClause(c) } } if supportReturning && len(db.Statement.Schema.FieldsWithDefaultDBValue) > 0 { if _, ok := db.Statement.Clauses["RETURNING"]; !ok { fromColumns := make([]clause.Column, 0, len(db.Statement.Schema.FieldsWithDefaultDBValue))
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Apr 08 03:29:55 GMT 2024 - 12.5K bytes - Viewed (0) -
tests/table_test.go
r := dryDB.Table("`user`").Find(&User{}).Statement if !regexp.MustCompile("SELECT \\* FROM `user`").MatchString(r.Statement.SQL.String()) { t.Errorf("Table with escape character, got %v", r.Statement.SQL.String()) } r = dryDB.Table("user as u").Select("name").Find(&User{}).Statement if !regexp.MustCompile("SELECT .name. FROM user as u WHERE .u.\\..deleted_at. IS NULL").MatchString(r.Statement.SQL.String()) {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sat Mar 09 09:31:28 GMT 2024 - 10.6K bytes - Viewed (0) -
tests/joins_test.go
if !regexp.MustCompile("SELECT .* FROM .users. left join pets.*join accounts.*").MatchString(stmt.SQL.String()) { t.Errorf("joins should be ordered, but got %v", stmt.SQL.String()) }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Apr 26 14:19:32 GMT 2023 - 13.5K bytes - Viewed (1)