- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for name (0.2 sec)
-
scan.go
} } else if names := utils.SplitNestedRelationName(column); len(names) > 1 { // has nested relation if rel, ok := sch.Relationships.Relations[names[0]]; ok { subNameCount := len(names) // nested relation fields relFields := make([]*schema.Field, 0, subNameCount-1) relFields = append(relFields, rel.Field) for _, name := range names[1 : subNameCount-1] {
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) -
migrator/migrator.go
} return fmt.Errorf("failed to create index with name %s", name) }) } // DropIndex drop index `name` func (m Migrator) DropIndex(value interface{}, name string) error { return m.RunWithValue(value, func(stmt *gorm.Statement) error { if stmt.Schema != nil { if idx := stmt.Schema.LookIndex(name); idx != nil { name = idx.Name } }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Apr 26 07:15:49 GMT 2024 - 29K bytes - Viewed (0) -
clause/where_test.go
}, clause.Where{ Exprs: []clause.Expression{clause.Or(clause.Not(clause.Gt{Column: "score", Value: 100}), clause.Like{Column: "name", Value: "%linus%"})}, }}, "SELECT * FROM `users` WHERE (`users`.`id` <> ? AND `age` <= ?) OR `name` <> ? AND (`score` <= ? OR `name` LIKE ?)", []interface{}{"1", 18, "jinzhu", 100, "%linus%"}, }, {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Apr 25 12:22:53 GMT 2024 - 6.2K bytes - Viewed (0) -
tests/preload_test.go
org := Org{ PostalAddress: EmbeddedAddress{Name: "a1", Country: &Country{Name: "c1"}}, VisitingAddress: EmbeddedAddress{Name: "a2", Country: &Country{Name: "c2"}}, Address: &EmbeddedAddress{Name: "a3", Country: &Country{Name: "c3"}}, NestedAddress: NestedAddress{ EmbeddedAddress: EmbeddedAddress{Name: "a4", Country: &Country{Name: "c4"}}, }, } if err := DB.Create(&org).Error; err != nil {
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) -
callbacks/preload.go
setPreloadMap := func(name, value string, args []interface{}) { if _, ok := preloadMap[name]; !ok { preloadMap[name] = map[string][]interface{}{} } if value != "" { preloadMap[name][value] = args } } for name, args := range preloads { preloadFields := strings.Split(name, ".") value := strings.TrimPrefix(strings.TrimPrefix(name, preloadFields[0]), ".")
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Apr 25 12:21:03 GMT 2024 - 11.6K bytes - Viewed (0) -
tests/query_test.go
if result.ID != 0 { t.Errorf("Should not have ID because only selected name, %+v", result.ID) } if user.Name != result.Name { t.Errorf("Should have user Name when selected it") } var result2 User DB.Where("name = ?", user.Name).Select("name as name").Find(&result2) if result2.ID != 0 { t.Errorf("Should not have ID because only selected name, %+v", result2.ID) }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Apr 25 12:22:53 GMT 2024 - 49.8K bytes - Viewed (0) -
clause/where.go
package clause import ( "strings" ) const ( AndWithSpace = " AND " OrWithSpace = " OR " ) // Where where clause type Where struct { Exprs []Expression } // Name where clause name func (where Where) Name() string { return "WHERE" } // Build build where clause func (where Where) Build(builder Builder) { if len(where.Exprs) == 1 { if andCondition, ok := where.Exprs[0].(AndConditions); ok {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Apr 25 12:22:53 GMT 2024 - 5.1K bytes - Viewed (0)