- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for joina (0.09 sec)
-
tests/count_test.go
t.Fatalf("Build count with select, but got %v", result.Statement.SQL.String()) } var count4 int64 if err := DB.Table("users").Joins("LEFT JOIN companies on companies.name = users.name").Where("users.name = ?", user1.Name).Count(&count4).Error; err != nil || count4 != 1 { t.Errorf("count with join, got error: %v, count %v", err, count4) } var count5 int64
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Oct 30 09:15:49 UTC 2023 - 6.9K bytes - Viewed (0) -
schema/constraint.go
names := strings.Split(chk, ",") if len(names) > 1 && regEnLetterAndMidline.MatchString(names[0]) { checks[names[0]] = CheckConstraint{Name: names[0], Constraint: strings.Join(names[1:], ","), Field: field} } else { if names[0] == "" { chk = strings.Join(names[1:], ",") } name := schema.namer.CheckerName(schema.Table, field.DBName) checks[name] = CheckConstraint{Name: name, Constraint: chk, Field: field} } }
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Mar 18 07:33:54 UTC 2024 - 1.9K bytes - Viewed (0) -
schema/schema_helper_test.go
} if r.JoinTable != nil { if r.JoinTable.Name != relation.JoinTable.Name { t.Errorf("schema %v relation's join table name expects %v, but got %v", s, relation.JoinTable.Name, r.JoinTable.Name) } if r.JoinTable.Table != relation.JoinTable.Table { t.Errorf("schema %v relation's join table tablename expects %v, but got %v", s, relation.JoinTable.Table, r.JoinTable.Table) }
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Dec 15 08:31:23 UTC 2023 - 7.5K bytes - Viewed (0) -
README.md
## Overview * Full-Featured ORM * Associations (Has One, Has Many, Belongs To, Many To Many, Polymorphism, Single-table inheritance) * Hooks (Before/After Create/Save/Update/Delete/Find) * Eager loading with `Preload`, `Joins` * Transactions, Nested Transactions, Save Point, RollbackTo to Saved Point * Context, Prepared Statement Mode, DryRun Mode * Batch Insert, FindInBatches, Find To Map
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Tue Nov 07 02:20:06 UTC 2023 - 1.8K bytes - Viewed (0) -
schema/utils.go
names[i] = "" } else { break } } } values := strings.Split(names[j], ":") k := strings.TrimSpace(strings.ToUpper(values[0])) if len(values) >= 2 { settings[k] = strings.Join(values[1:], ":") } else if k != "" { settings[k] = k } } return settings } func toColumns(val string) (results []string) { if val != "" { for _, v := range strings.Split(val, ",") {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Sat Aug 19 13:35:14 UTC 2023 - 5.5K bytes - Viewed (0) -
schema/index.go
k := strings.TrimSpace(strings.ToUpper(v[0])) if k == "INDEX" || k == "UNIQUEINDEX" { var ( name string tag = strings.Join(v[1:], ":") idx = strings.Index(tag, ",") tagSetting = strings.Join(strings.Split(tag, ",")[1:], ",") settings = ParseTagSetting(tagSetting, ",") length, _ = strconv.Atoi(settings["LENGTH"]) ) if idx == -1 {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Sun Feb 04 07:49:19 UTC 2024 - 3.7K bytes - Viewed (0) -
utils/utils.go
default: results[idx] = "nil" vv := reflect.ValueOf(v) if vv.IsValid() && !vv.IsZero() { results[idx] = fmt.Sprint(reflect.Indirect(vv).Interface()) } } } return strings.Join(results, "_") } func Contains(elems []string, elem string) bool { for _, e := range elems { if elem == e { return true } } return false } func AssertEqual(x, y interface{}) bool {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Apr 22 06:43:02 UTC 2024 - 3.8K bytes - Viewed (0) -
tests/tests_test.go
log.Println("testing tidb...") if dbDSN == "" { dbDSN = tidbDSN } db, err = gorm.Open(mysql.Open(dbDSN), cfg) default: log.Println("testing sqlite3...") db, err = gorm.Open(sqlite.Open(filepath.Join(os.TempDir(), "gorm.db")), cfg) if err == nil { db.Exec("PRAGMA foreign_keys = ON") } } if err != nil { return } if debug := os.Getenv("DEBUG"); debug == "true" {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Dec 15 08:36:08 UTC 2023 - 3.3K bytes - Viewed (0) -
schema/naming.go
} // ColumnName convert string to column name func (ns NamingStrategy) ColumnName(table, column string) string { return ns.toDBName(column) } // JoinTableName convert string to join table name func (ns NamingStrategy) JoinTableName(str string) string { if !ns.NoLowerCase && strings.ToLower(str) == str { return ns.TablePrefix + str } if ns.SingularTable {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Wed Jun 12 03:46:59 UTC 2024 - 5.3K bytes - Viewed (0)