- Sort Score
- Result 10 results
- Languages All
Results 11 - 15 of 15 for from (0.15 sec)
-
tests/preload_test.go
if err != nil { t.Fatalf("failed to preload and find users: %v", err) } AssertEqual(t, result, users) AssertEqual(t, len(query), 2) // Check preload queries are merged if !regexp.MustCompile(`SELECT \* FROM .*tools.* WHERE .*IN.*`).MatchString(query[0]) { t.Fatalf("Expected first query to preload manager tools, got: %s", query[0]) } } func TestEmbedPreload(t *testing.T) { type Country struct {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Apr 25 12:21:03 GMT 2024 - 14.9K bytes - Viewed (0) -
tests/sql_builder_test.go
Name string Email string } var results []result DB.Raw("SELECT name, age FROM users WHERE name = ? or name = ?", user2.Name, user3.Name).Scan(&results) if len(results) != 2 || results[0].Name != user2.Name || results[1].Name != user3.Name { t.Errorf("Raw with scan") } rows, _ := DB.Raw("select name, age from users where name = ?", user3.Name).Rows() count := 0 for rows.Next() { count++ }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 16.7K bytes - Viewed (0) -
schema/schema.go
} type TablerWithNamer interface { TableName(Namer) string } // Parse get data type from dialector func Parse(dest interface{}, cacheStore *sync.Map, namer Namer) (*Schema, error) { return ParseWithSpecialTableName(dest, cacheStore, namer, "") } // ParseWithSpecialTableName get data type from dialector with extra schema table
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Oct 10 06:50:29 GMT 2023 - 13.7K bytes - Viewed (0) -
gorm.go
func (db *DB) Set(key string, value interface{}) *DB { tx := db.getInstance() tx.Statement.Settings.Store(key, value) return tx } // Get get value with key from current db instance's context func (db *DB) Get(key string) (interface{}, bool) { return db.Statement.Settings.Load(key) } // InstanceSet store value with key into current db instance's context
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sun Aug 20 11:46:56 GMT 2023 - 11.6K bytes - Viewed (0) -
association.go
if len(joinStmt.SQL.String()) > 0 { tx.Clauses(clause.Expr{SQL: strings.Replace(joinStmt.SQL.String(), "WHERE ", "", 1), Vars: joinStmt.Vars}) } } 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}) }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu May 04 11:30:45 GMT 2023 - 21.2K bytes - Viewed (0)