- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 27 for interfaces (0.41 sec)
-
finisher_api.go
} } } else if andCond, ok := expr.(clause.AndConditions); ok { db.assignInterfacesToValue(andCond.Exprs) } } case clause.Expression, map[string]string, map[interface{}]interface{}, map[string]interface{}: if exprs := db.Statement.BuildCondition(value); len(exprs) > 0 { db.assignInterfacesToValue(exprs) } default:
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Jan 12 08:42:21 UTC 2024 - 22.7K bytes - Viewed (0) -
gorm.go
if db != nil { for _, plugin := range c.Plugins { if err := plugin.Initialize(db); err != nil { return err } } } return nil } // Option gorm option interface type Option interface { Apply(*Config) error AfterInitialize(*DB) error } // DB GORM DB definition type DB struct { *Config Error error RowsAffected int64 Statement *Statement
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Sun Aug 20 11:46:56 UTC 2023 - 11.6K bytes - Viewed (0) -
schema/relationship.go
func (constraint *Constraint) Build() (sql string, vars []interface{}) { sql = "CONSTRAINT ? FOREIGN KEY ? REFERENCES ??" if constraint.OnDelete != "" { sql += " ON DELETE " + constraint.OnDelete } if constraint.OnUpdate != "" { sql += " ON UPDATE " + constraint.OnUpdate } foreignKeys := make([]interface{}, 0, len(constraint.ForeignKeys)) for _, field := range constraint.ForeignKeys {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Wed Jun 12 03:46:59 UTC 2024 - 22.7K bytes - Viewed (0) -
tests/sql_builder_test.go
stmt := dryRunDB.Model(&user).Where("id = ?", 1).Updates(map[string]interface{}{"age": ageInt(8)}).Statement sql := DB.Dialector.Explain(stmt.SQL.String(), stmt.Vars...) if !regexp.MustCompile(`.*age.*=8,`).MatchString(sql) { t.Errorf("Failed to generate sql, got %v", sql) } stmt = dryRunDB.Model(&user).Where("id = ?", 1).Updates(map[string]interface{}{"age": ageUint64(10241024)}).Statement
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Jan 12 08:42:21 UTC 2024 - 16.7K bytes - Viewed (0) -
tests/upsert_test.go
} lang3 := Language{Code: "upsert", Name: "Upsert"} if err := DB.Clauses(clause.OnConflict{ Columns: []clause.Column{{Name: "code"}}, DoUpdates: clause.Assignments(map[string]interface{}{"name": "upsert-new"}), }).Create(&lang3).Error; err != nil { t.Fatalf("failed to upsert, got %v", err) } if err := DB.Find(&langs, "code = ?", lang.Code).Error; err != nil {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Sep 05 07:39:19 UTC 2022 - 11.4K bytes - Viewed (0) -
callbacks/query.go
for idx, dbName := range db.Statement.Schema.DBNames { clauseSelect.Columns[idx] = clause.Column{Table: db.Statement.Table, Name: dbName} } } specifiedRelationsName := make(map[string]interface{}) for _, join := range db.Statement.Joins { if db.Statement.Schema != nil { var isRelations bool // is relations or raw sql var relations []*schema.Relationship
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Wed Jun 12 09:51:44 UTC 2024 - 10.1K bytes - Viewed (0) -
association.go
Unscope: true, } } func (association *Association) Find(out interface{}, conds ...interface{}) error { if association.Error == nil { association.Error = association.buildCondition().Find(out, conds...).Error } return association.Error } func (association *Association) Append(values ...interface{}) error { if association.Error == nil { switch association.Relationship.Type {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 21.5K bytes - Viewed (0) -
schema/field_test.go
) // test valuer values := map[string]interface{}{ "name": user.Name, "id": user.ID, "created_at": user.CreatedAt, "deleted_at": user.DeletedAt, "age": user.Age, "birthday": user.Birthday, "active": true, } checkField(t, userSchema, reflectValue, values) // test setter newValues := map[string]interface{}{ "name": "valuer_and_setter_2",
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Sat Feb 19 09:02:53 UTC 2022 - 12.7K bytes - Viewed (0) -
tests/hooks_test.go
} DB.Model(&product).Select("code", "price").Updates(map[string]interface{}{"code": "L1212"}) if product.Price != 150 || product.Code != "L1212" { t.Errorf("invalid data after update, got %+v", product) } // Code not changed, price should not change DB.Model(&product).Updates(map[string]interface{}{"Name": "Product New"})
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Sat Feb 18 01:20:29 UTC 2023 - 15.9K bytes - Viewed (0) -
migrator/migrator.go
gorm.Dialector } type printSQLLogger struct { logger.Interface } func (l *printSQLLogger) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error) { sql, _ := fc() fmt.Println(sql + ";") l.Interface.Trace(ctx, begin, fc, err) } // GormDataTypeInterface gorm data type interface type GormDataTypeInterface interface { GormDBDataType(*gorm.DB, *schema.Field) string }
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Apr 26 07:15:49 UTC 2024 - 29K bytes - Viewed (0)