- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 57 for Page (0.15 sec)
-
chainable_api.go
// Select accepts both string arguments and arrays. // // // Select name and age of user using multiple arguments // db.Select("name", "age").Find(&users) // // Select name and age of user using an array // db.Select([]string{"name", "age"}).Find(&users) func (db *DB) Select(query interface{}, args ...interface{}) (tx *DB) { tx = db.getInstance() switch v := query.(type) {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Wed Apr 17 03:38:55 GMT 2024 - 14.3K bytes - Viewed (1) -
callbacks/create_test.go
Name string Email string `gorm:"default:(-)"` Age int `gorm:"default:(-)"` } s, err := schema.Parse(&user{}, schemaCache, schema.NamingStrategy{}) if err != nil { t.Errorf("parse schema error: %v, is not expected", err) return } dest := []*user{ { ID: 1, Name: "alice", Email: "email", Age: 18, }, { ID: 2, Name: "bob", Email: "email",
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Mar 18 05:48:42 GMT 2024 - 1.4K bytes - Viewed (0) -
schema/field_test.go
}, Name: "valuer_and_setter", Age: 18, Birthday: tests.Now(), Active: true, } reflectValue = reflect.ValueOf(&user) ) // test valuer values := map[string]interface{}{ "name": user.Name, "id": user.ID, "created_at": user.CreatedAt, "updated_at": user.UpdatedAt, "deleted_at": user.DeletedAt, "age": user.Age, "birthday": user.Birthday,
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sat Feb 19 09:02:53 GMT 2022 - 12.7K bytes - Viewed (0) -
clause/select_test.go
clause.Expr{ SQL: "? as name", Vars: []interface{}{ clause.Eq{ Column: clause.Column{Name: "age"}, Value: 18, }, }, }, }, }, }, clause.From{}}, "SELECT `age` = ? as name FROM `users`", []interface{}{18}, }, } for idx, result := range results { t.Run(fmt.Sprintf("case #%v", idx), func(t *testing.T) {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sat Feb 18 01:06:43 GMT 2023 - 1.7K bytes - Viewed (0) -
clause/benchmarks_test.go
clauses := []clause.Interface{clause.Select{}, clause.From{}, clause.Where{Exprs: []clause.Expression{clause.Eq{Column: clause.PrimaryColumn, Value: "1"}, clause.Gt{Column: "age", Value: 18}, clause.Or(clause.Neq{Column: "name", Value: "jinzhu"})}}} for _, clause := range clauses { stmt.AddClause(clause) } stmt.Build("SELECT", "FROM", "WHERE") _ = stmt.SQL.String() } }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Oct 07 12:14:14 GMT 2022 - 1.9K bytes - Viewed (0) -
clause/returning_test.go
}, { []clause.Interface{clause.Select{}, clause.From{}, clause.Returning{ []clause.Column{clause.PrimaryColumn}, }, clause.Returning{ []clause.Column{{Name: "name"}, {Name: "age"}}, }}, "SELECT * FROM `users` RETURNING `users`.`id`,`name`,`age`", nil, }, } for idx, result := range results { t.Run(fmt.Sprintf("case #%v", idx), func(t *testing.T) { checkBuildClauses(t, result.Clauses, result.Result, result.Vars)
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Tue Jun 02 01:18:01 GMT 2020 - 845 bytes - Viewed (0) -
schema/model_test.go
package schema_test import ( "database/sql" "time" "gorm.io/gorm" "gorm.io/gorm/utils/tests" ) type User struct { *gorm.Model Name *string Age *uint Birthday *time.Time Account *tests.Account Pets []*tests.Pet Toys []*tests.Toy `gorm:"polymorphic:Owner"` CompanyID *int Company *tests.Company ManagerID *uint Manager *User
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 1.1K bytes - Viewed (0) -
cmd/bucket-policy.go
} if lc != "" { args["LocationConstraint"] = []string{lc} } cloneHeader := r.Header.Clone() if v := cloneHeader.Get("x-amz-signature-age"); v != "" { args["signatureAge"] = []string{v} cloneHeader.Del("x-amz-signature-age") } if userTags := cloneHeader.Get(xhttp.AmzObjectTagging); userTags != "" { tag, _ := tags.ParseObjectTags(userTags) if tag != nil { tagMap := tag.ToMap()
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 8K bytes - Viewed (0) -
istioctl/cmd/options.go
"log_as_json": true, "log_stacktrace_level": true, "log_target": true, "log_caller": true, "log_output_level": true, // istioctl also inherits support for log_rotate, log_rotate_max_age, log_rotate_max_backups, // log_rotate_max_size, but these are rarely appropriate for a user-facing CLI so we ignore them } func optionsCommand(rootCmd *cobra.Command) *cobra.Command { retval := &cobra.Command{
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Thu Jun 15 15:02:17 GMT 2023 - 1.8K bytes - Viewed (0) -
istioctl/pkg/tag/revision.go
type PodFilteredInfo struct { Namespace string `json:"namespace"` Name string `json:"name"` Address string `json:"address"` Status corev1.PodPhase `json:"status"` Age string `json:"age"` } // IstioOperatorCRInfo represents a tiny subset of fields from // IstioOperator CR. This structure is used for displaying data. // Exposed for integration test type IstioOperatorCRInfo struct {
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Sat Jan 28 13:16:05 GMT 2023 - 4.5K bytes - Viewed (0)