Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 447 for company (0.2 sec)

  1. tests/helper_test.go

    	}
    
    	for i := 0; i < config.Tools; i++ {
    		user.Tools = append(user.Tools, Tools{Name: name + "_tool_" + strconv.Itoa(i+1)})
    	}
    
    	if config.Company {
    		user.Company = Company{Name: "company-" + name}
    	}
    
    	if config.Manager {
    		user.Manager = GetUser(name+"_manager", Config{})
    	}
    
    	for i := 0; i < config.Team; i++ {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 8K bytes
    - Viewed (0)
  2. tests/create_test.go

    	}
    }
    
    func TestFirstOrCreateWithPrimaryKey(t *testing.T) {
    	company := Company{ID: 100, Name: "company100_with_primarykey"}
    	DB.FirstOrCreate(&company)
    
    	if company.ID != 100 {
    		t.Errorf("invalid primary key after creating, got %v", company.ID)
    	}
    
    	companies := []Company{
    		{ID: 101, Name: "company101_with_primarykey"},
    		{ID: 102, Name: "company102_with_primarykey"},
    	}
    	DB.Create(&companies)
    
    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)
  3. utils/utils.go

    	}
    	return ""
    }
    
    const nestedRelationSplit = "__"
    
    // NestedRelationName nested relationships like `Manager__Company`
    func NestedRelationName(prefix, name string) string {
    	return prefix + nestedRelationSplit + name
    }
    
    // SplitNestedRelationName Split nested relationships to `[]string{"Manager","Company"}`
    func SplitNestedRelationName(name string) []string {
    	return strings.Split(name, nestedRelationSplit)
    }
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 22 06:43:02 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  4. docs/extensions/s3zip/README.md

    e.g.:
    To download `2021/taxes.csv` archived in `financial.zip` and stored under a bucket named `company-data`, you can issue a GET request using the following path 'company-data/financial.zip/2021/taxes.csv`
    
    ## Contents properties
    
    Plain Text
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 10 16:28:27 GMT 2024
    - 3K bytes
    - Viewed (0)
  5. tests/connpool_test.go

    			"INSERT INTO `users` (`created_at`,`updated_at`,`deleted_at`,`name`,`age`,`birthday`,`company_id`,`manager_id`,`active`) VALUES (?,?,?,?,?,?,?,?,?)",
    			"SELECT * FROM `users` WHERE name = ? AND `users`.`deleted_at` IS NULL ORDER BY `users`.`id` LIMIT ?",
    			"INSERT INTO `users` (`created_at`,`updated_at`,`deleted_at`,`name`,`age`,`birthday`,`company_id`,`manager_id`,`active`) VALUES (?,?,?,?,?,?,?,?,?)",
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Feb 06 02:54:40 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  6. tests/query_test.go

    	var results2 []User
    	DB.Find(&results2, map[string]interface{}{"name": users[3].Name, "company_id": nil})
    	if len(results2) != 0 {
    		t.Errorf("Search all records with inline map containing null value finding 0 records")
    	}
    
    	DB.Find(&results2, map[string]interface{}{"name": users[0].Name, "company_id": nil})
    	if len(results2) != 1 {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
  7. tests/table_test.go

    	dryDB := DB.Session(&gorm.Session{DryRun: true, QueryFields: true})
    	userQuery := "SELECT .*user.*id.*user.*created_at.*user.*updated_at.*user.*deleted_at.*user.*name.*user.*age" +
    		".*user.*birthday.*user.*company_id.*user.*manager_id.*user.*active.* "
    
    	r := dryDB.Table("`user`").Find(&User{}).Statement
    	if !regexp.MustCompile(userQuery + "FROM `user`").MatchString(r.Statement.SQL.String()) {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sat Mar 09 09:31:28 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  8. schema/relationship_test.go

    		References: []Reference{
    			{"ID", "", "UserID", "Account", "", true},
    		},
    	})
    
    	checkStructRelation(t, &result, Relation{
    		Name: "Company", Type: schema.BelongsTo, Schema: "", FieldSchema: "Company",
    		References: []Reference{
    			{"ID", "Company", "CompanyID", "", "", false},
    		},
    	})
    }
    
    func TestSameForeignKey(t *testing.T) {
    	type UserAux struct {
    		gorm.Model
    		Aux  string
    		UUID string
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 25.5K bytes
    - Viewed (0)
  9. tests/preload_test.go

    	. "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,
    		Languages: 3,
    		Friends:   1,
    	})
    
    	if err := DB.Create(&user).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  10. tests/migrate_test.go

    		t.Fatalf("Found deleted column")
    	}
    }
    
    func TestMigrateConstraint(t *testing.T) {
    	names := []string{"Account", "fk_users_account", "Pets", "fk_users_pets", "Company", "fk_users_company", "Team", "fk_users_team", "Languages", "fk_users_languages"}
    
    	for _, name := range names {
    		if !DB.Migrator().HasConstraint(&User{}, name) {
    			DB.Migrator().CreateConstraint(&User{}, name)
    		}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Mar 18 11:24:16 GMT 2024
    - 56.2K bytes
    - Viewed (0)
Back to top