- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 343 for users3 (0.1 sec)
-
tests/joins_test.go
CheckUser(t, user, users2[idx]) } } func TestJoinConds(t *testing.T) { user := *GetUser("joins-conds", Config{Account: true, Pets: 3}) DB.Save(&user) var users1 []User DB.Joins("inner join pets on pets.user_id = users.id").Where("users.name = ?", user.Name).Find(&users1) if len(users1) != 3 { t.Errorf("should find two users using left join, but got %v", len(users1)) } var users2 []User
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 17 03:58:13 UTC 2024 - 15K bytes - Viewed (0) -
tests/preload_test.go
DB.Preload("Account", clause.Eq{Column: "number", Value: users[0].Account.Number}).Find(&users2, "id IN ?", userIDs) sort.Slice(users2, func(i, j int) bool { return users2[i].ID < users2[j].ID }) for idx, user := range users2[1:2] { if user.Account.Number != "" { t.Errorf("No account should found for user %v but got %v", idx+2, user.Account.Number) } } CheckUser(t, users2[0], users[0])
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:00:47 UTC 2024 - 15.9K bytes - Viewed (0) -
tests/update_test.go
if users[1].Name != "update_column_02_newname" || users[1].Age != 100 { t.Errorf("user 2 should be updated with update column") } AssertEqual(t, lastUpdatedAt.UnixNano(), users[1].UpdatedAt.UnixNano()) // user2 should not be updated var user1, user2 User DB.First(&user1, users[0].ID) DB.First(&user2, users[1].ID) CheckUser(t, user1, *users[0]) CheckUser(t, user2, *users[1])
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Dec 04 03:50:58 UTC 2023 - 30.3K bytes - Viewed (0) -
chainable_api.go
} // Limit specify the number of records to be retrieved // // Limit conditions can be cancelled by using `Limit(-1)`. // // // retrieve 3 users // db.Limit(3).Find(&users) // // retrieve 3 users into users1, and all users into users2 // db.Limit(3).Find(&users1).Limit(-1).Find(&users2) func (db *DB) Limit(limit int) (tx *DB) { tx = db.getInstance() tx.Statement.AddClause(clause.Limit{Limit: &limit}) return }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 14.8K bytes - Viewed (0) -
tests/create_test.go
DB.Omit(clause.Associations).Create(&user2) var result2 User DB.Preload(clause.Associations).First(&result2, user2.ID) user2.Account = Account{} user2.Toys = nil user2.Manager = nil user2.Company = Company{} user2.Pets = nil user2.Team = nil user2.Languages = nil user2.Friends = nil CheckUser(t, result2, user2) } func TestFirstOrCreateNotExistsTable(t *testing.T) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 26.4K bytes - Viewed (0) -
tests/scan_test.go
} DB.Table("users").Select("id, name, age").Where("id = ?", user2.ID).Scan(&res) if res.ID != user2.ID || res.Name != user2.Name || res.Age != int(user2.Age) { t.Fatalf("Scan into struct should work, got %#v, should %#v", res, user2) } DB.Model(&User{Model: gorm.Model{ID: user3.ID}}).Select("id, name, age").Scan(&res) if res.ID != user3.ID || res.Name != user3.Name || res.Age != int(user3.Age) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:57:36 UTC 2024 - 10.9K bytes - Viewed (0) -
tests/sql_builder_test.go
if age != 20 { t.Errorf("Scan with Row, age expects: %v, got %v", user2.Age, age) } } func TestRows(t *testing.T) { user1 := User{Name: "RowsUser1", Age: 1} user2 := User{Name: "RowsUser2", Age: 10} user3 := User{Name: "RowsUser3", Age: 20} DB.Save(&user1).Save(&user2).Save(&user3) rows, err := DB.Table("users").Where("name = ? or name = ?", user2.Name, user3.Name).Select("name, age").Rows() if err != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Jan 12 08:42:21 UTC 2024 - 16.7K bytes - Viewed (0) -
schema/relationship_test.go
type User struct { ID int32 `gorm:"primaryKey"` Name string CreatorID *int32 Creator *User } checkStructRelation(t, &User{}, Relation{ Name: "Creator", Type: schema.BelongsTo, Schema: "User", FieldSchema: "User", References: []Reference{{"ID", "User", "CreatorID", "User", "", false}}, }) } func TestSelfReferentialBelongsToOverrideReferences(t *testing.T) { type User struct {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Apr 15 03:20:20 UTC 2024 - 25.5K bytes - Viewed (0) -
cmd/admin-handlers-idp-ldap.go
if s3Err != ErrNone { writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(s3Err), r.URL) return } userDN := r.Form.Get("userDN") // If listing is requested for a specific user (who is not the request // sender), check that the user has permissions. if userDN != "" && userDN != cred.ParentUser { if !globalIAMSys.IsAllowed(policy.Args{ AccountName: cred.AccessKey, Groups: cred.Groups,
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Sep 21 11:35:40 UTC 2024 - 19.1K bytes - Viewed (0) -
docs/sts/ldap.md
**Please note that when AD/LDAP is configured, MinIO will not support long term users defined internally.** Only AD/LDAP users (and the root user) are allowed. In addition to this, the server will not support operations on users or groups using `mc admin user` or `mc admin group` commands except `mc admin user info` and `mc admin group info` to list set policies for users and groups. This is because users and groups are defined externally in AD/LDAP. ## Configuring AD/LDAP on MinIO
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 18.9K bytes - Viewed (0)