- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for sortBy (0.23 sec)
-
callbacks.go
if c.after == "*" && len(sorted) > 0 { if curIdx := getRIndex(sorted, c.name); curIdx == -1 { sorted = append(sorted, c.name) } } else if sortedIdx := getRIndex(sorted, c.after); sortedIdx != -1 { if curIdx := getRIndex(sorted, c.name); curIdx == -1 { // if after callback sorted, append current callback to last sorted = append(sorted, c.name) } else if curIdx < sortedIdx {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 26 03:33:36 GMT 2024 - 8.6K bytes - Viewed (1) -
migrator/migrator.go
str = opt.Expression } else if opt.Length > 0 { str += fmt.Sprintf("(%d)", opt.Length) } if opt.Collate != "" { str += " COLLATE " + opt.Collate } if opt.Sort != "" { str += " " + opt.Sort } results = append(results, clause.Expr{SQL: str}) } return } // BuildIndexOptionsInterface build index options interface type BuildIndexOptionsInterface interface {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Apr 26 07:15:49 GMT 2024 - 29K bytes - Viewed (0) -
tests/helper_test.go
if len(user.Pets) != len(expect.Pets) { t.Fatalf("pets should equal, expect: %v, got %v", len(expect.Pets), len(user.Pets)) } sort.Slice(user.Pets, func(i, j int) bool { return user.Pets[i].ID > user.Pets[j].ID }) sort.Slice(expect.Pets, func(i, j int) bool { return expect.Pets[i].ID > expect.Pets[j].ID }) for idx, pet := range user.Pets {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 19 03:50:28 GMT 2024 - 8K bytes - Viewed (0) -
schema/index.go
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sun Feb 04 07:49:19 GMT 2024 - 3.7K bytes - Viewed (0) -
schema/index_test.go
"testing" "gorm.io/gorm/schema" "gorm.io/gorm/utils/tests" ) type UserIndex struct { Name string `gorm:"index"` Name2 string `gorm:"index:idx_name,unique"` Name3 string `gorm:"index:,sort:desc,collate:utf8,type:btree,length:10,where:name3 != 'jinzhu'"` Name4 string `gorm:"uniqueIndex"` Name5 int64 `gorm:"index:,class:FULLTEXT,comment:hello \\, world,where:age > 10"`
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sun Feb 04 07:49:19 GMT 2024 - 8K bytes - Viewed (0) -
tests/preload_test.go
package tests_test import ( "context" "encoding/json" "regexp" "sort" "strconv" "sync" "testing" "time" "gorm.io/gorm" "gorm.io/gorm/clause" . "gorm.io/gorm/utils/tests" ) func TestPreloadWithAssociations(t *testing.T) { user := *GetUser("preload_with_associations", Config{ Account: true, Pets: 2, Toys: 3, Company: true, Manager: true, Team: 4,
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/update.go
package callbacks import ( "reflect" "sort" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/schema" "gorm.io/gorm/utils" ) func SetupUpdateReflectValue(db *gorm.DB) { if db.Error == nil && db.Statement.Schema != nil { if !db.Statement.ReflectValue.CanAddr() || db.Statement.Model != db.Statement.Dest { db.Statement.ReflectValue = reflect.ValueOf(db.Statement.Model)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 18 05:44:55 GMT 2024 - 9.4K bytes - Viewed (1) -
callbacks/preload.go
package callbacks import ( "fmt" "reflect" "sort" "strings" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/schema" "gorm.io/gorm/utils" ) // parsePreloadMap extracts nested preloads. e.g. // // // schema has a "k0" relation and a "k7.k8" embedded relation // parsePreloadMap(schema, map[string][]interface{}{ // clause.Associations: {"arg1"}, // "k1": {"arg2"},
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) -
statement.go
for i := range v { keys = append(keys, i) } sort.Strings(keys) for _, key := range keys { conds = append(conds, clause.Eq{Column: key, Value: v[key]}) } case map[string]interface{}: keys := make([]string, 0, len(v)) for i := range v { keys = append(keys, i) } sort.Strings(keys) for _, key := range keys {
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) -
tests/query_test.go
package tests_test import ( "database/sql" "database/sql/driver" "fmt" "reflect" "regexp" "sort" "strconv" "strings" "testing" "time" "gorm.io/gorm" "gorm.io/gorm/clause" . "gorm.io/gorm/utils/tests" ) func TestFind(t *testing.T) { users := []User{ *GetUser("find", Config{}), *GetUser("find", Config{}), *GetUser("find", Config{}), }
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)