Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 3,132 for user (0.18 sec)

  1. tests/count_test.go

    func TestCount(t *testing.T) {
    	var (
    		user1                 = *GetUser("count-1", Config{})
    		user2                 = *GetUser("count-2", Config{})
    		user3                 = *GetUser("count-3", Config{})
    		users                 []User
    		count, count1, count2 int64
    	)
    
    	DB.Save(&user1).Save(&user2).Save(&user3)
    
    	if err := DB.Where("name = ?", user1.Name).Or("name = ?", user3.Name).Find(&users).Count(&count).Error; err != nil {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 6.9K bytes
    - Viewed (0)
  2. tests/associations_has_many_test.go

    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    	CheckUser(t, user, user)
    
    	// Find
    	var user2 User
    	DB.Find(&user2, "id = ?", user.ID)
    	DB.Model(&user2).Association("Team").Find(&user2.Team)
    	CheckUser(t, user2, user)
    
    	// Count
    	AssertAssociationCount(t, user, "Team", 2, "")
    
    	// Append
    	team := *GetUser("team", Config{})
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 15.6K bytes
    - Viewed (0)
  3. tests/create_test.go

    	user.Birthday = nil
    	user.Pets = nil
    	user.Company = Company{}
    	user.Team = nil
    	user.Friends = nil
    
    	CheckUser(t, user2, user)
    }
    
    func TestOmitWithCreate(t *testing.T) {
    	user := *GetUser("omit_create", Config{Account: true, Pets: 3, Toys: 3, Company: true, Manager: true, Team: 3, Languages: 3, Friends: 4})
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 26.4K bytes
    - Viewed (0)
  4. chainable_api.go

    //
    //	// Find the first user with name jinzhu
    //	db.Where("name = ?", "jinzhu").First(&user)
    //	// Find the first user with name jinzhu and age 20
    //	db.Where(&User{Name: "jinzhu", Age: 20}).First(&user)
    //	// Find the first user with name jinzhu and age not equal to 20
    //	db.Where("name = ?", "jinzhu").Where("age <> ?", "20").First(&user)
    //
    // [docs]: https://gorm.io/docs/query.html#Conditions
    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)
  5. tests/associations_belongs_to_test.go

    	}
    
    	if err := DB.Model(&users[1]).Association("Company").Append(&company); err != nil {
    		t.Errorf("Error happened when append company to user, got %v", err)
    	}
    
    	if users[0].CompanyID == nil || users[1].CompanyID == nil || *users[0].CompanyID != *users[1].CompanyID {
    		t.Errorf("user's company id should exists and equal, but its: %v, %v", users[0].CompanyID, users[1].CompanyID)
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 9.3K bytes
    - Viewed (0)
  6. tests/prepared_stmt_test.go

    	defer cancel()
    	txCtx := tx.WithContext(ctx)
    
    	user := *GetUser("prepared_stmt", Config{})
    
    	txCtx.Create(&user)
    
    	var result1 User
    	if err := txCtx.Find(&result1, user.ID).Error; err != nil {
    		t.Fatalf("no error should happen but got %v", err)
    	}
    
    	time.Sleep(time.Second)
    
    	var result2 User
    	if err := tx.Find(&result2, user.ID).Error; err != nil {
    		t.Fatalf("no error should happen but got %v", err)
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Mar 21 07:55:43 GMT 2024
    - 4K bytes
    - Viewed (0)
  7. tests/update_has_one_test.go

    	CheckUser(t, user2, user)
    
    	user.Account.Number += "new"
    	if err := DB.Save(&user).Error; err != nil {
    		t.Fatalf("errors happened when update: %v", err)
    	}
    
    	var user3 User
    	DB.Preload("Account").Find(&user3, "id = ?", user.ID)
    
    	CheckUser(t, user2, user3)
    	lastUpdatedAt := user2.Account.UpdatedAt
    	time.Sleep(time.Second)
    
    	if err := DB.Session(&gorm.Session{FullSaveAssociations: true}).Save(&user).Error; err != nil {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Jul 14 06:55:54 GMT 2022
    - 3.6K bytes
    - Viewed (0)
  8. docs_src/bigger_applications/app_an_py39/routers/users.py

    from fastapi import APIRouter
    
    router = APIRouter()
    
    
    @router.get("/users/", tags=["users"])
    async def read_users():
        return [{"username": "Rick"}, {"username": "Morty"}]
    
    
    @router.get("/users/me", tags=["users"])
    async def read_user_me():
        return {"username": "fakecurrentuser"}
    
    
    @router.get("/users/{username}", tags=["users"])
    async def read_user(username: str):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 407 bytes
    - Viewed (0)
  9. docs/sts/ldap.md

    - User provides their AD/LDAP username and password to the STS API.
    - MinIO looks up the user's information (specifically the user's Distinguished Name) in the LDAP server.
    - On finding the user's info, MinIO verifies the login credentials with the AD/LDAP server.
    Plain Text
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 18.4K bytes
    - Viewed (1)
  10. tests/associations_has_one_test.go

    )
    
    func TestHasOneAssociation(t *testing.T) {
    	user := *GetUser("hasone", Config{Account: true})
    
    	if err := DB.Create(&user).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    	CheckUser(t, user, user)
    
    	// Find
    	var user2 User
    	DB.Find(&user2, "id = ?", user.ID)
    	DB.Model(&user2).Association("Account").Find(&user2.Account)
    	CheckUser(t, user2, user)
    
    	// Count
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 6.8K bytes
    - Viewed (0)
Back to top