- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for argv (0.13 sec)
-
chainable_api.go
}) } else if strings.Count(v, "@") > 0 && len(args) > 0 { tx.Statement.AddClause(clause.Select{ Distinct: db.Statement.Distinct, Expression: clause.NamedExpr{SQL: v, Vars: args}, }) } else { tx.Statement.Selects = []string{v} for _, arg := range args { switch arg := arg.(type) { case string: tx.Statement.Selects = append(tx.Statement.Selects, arg) case []string:
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Apr 17 03:38:55 GMT 2024 - 14.3K bytes - Viewed (1) -
tests/callbacks_test.go
for _, c := range data.callbacks { var v interface{} = callbacks.Create() callMethod := func(s interface{}, name string, args ...interface{}) { var argValues []reflect.Value for _, arg := range args { argValues = append(argValues, reflect.ValueOf(arg)) } results := reflect.ValueOf(s).MethodByName(name).Call(argValues) if len(results) > 0 { v = results[0].Interface()
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 26 03:33:36 GMT 2024 - 7.2K bytes - Viewed (0) -
tests/migrate_test.go
_, err = findColumnType(&RelationModel2{}, "id") if err == nil { t.Errorf("RelationModel2 should not be migrated") } } func TestMigrateView(t *testing.T) { DB.Save(GetUser("joins-args-db", Config{Pets: 2})) if err := DB.Migrator().CreateView("invalid_users_pets", gorm.ViewOption{Query: nil}); err != gorm.ErrSubQueryRequired { t.Fatalf("no view should be created, got %v", err) }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 18 11:24:16 GMT 2024 - 56.2K bytes - Viewed (0) -
prepare_stmt.go
} return nil, ErrInvalidTransaction } func (db *PreparedStmtDB) ExecContext(ctx context.Context, query string, args ...interface{}) (result sql.Result, err error) { stmt, err := db.prepare(ctx, db.ConnPool, false, query) if err == nil { result, err = stmt.ExecContext(ctx, args...) if errors.Is(err, driver.ErrBadConn) { db.Mux.Lock() defer db.Mux.Unlock() go stmt.Close()
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Mar 28 08:47:39 GMT 2024 - 6.4K bytes - Viewed (0) -
callbacks/preload.go
// clause.Associations: {"arg1"}, // "k1": {"arg2"}, // "k2.k3": {"arg3"}, // "k4.k5.k6": {"arg4"}, // }) // // preloadMap is // map[string]map[string][]interface{}{ // "k0": {}, // "k7": { // "k8": {}, // }, // "k1": {}, // "k2": { // "k3": {"arg3"}, // }, // "k4": { // "k5.k6": {"arg4"}, // }, // }
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/preload_test.go
}, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { actual := Org{} tx := DB.Where("id = ?", org.ID).Session(&gorm.Session{}) for name, args := range test.preloads { tx = tx.Preload(name, args...) } if err := tx.Find(&actual).Error; err != nil { t.Errorf("failed to find org, got err: %v", err) } AssertEqual(t, actual, test.expect) }) }
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)