Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for birthday (0.19 sec)

  1. tests/group_by_test.go

    		Name:     "groupby",
    		Age:      10,
    		Birthday: Now(),
    		Active:   true,
    	}, {
    		Name:     "groupby",
    		Age:      20,
    		Birthday: Now(),
    	}, {
    		Name:     "groupby",
    		Age:      30,
    		Birthday: Now(),
    		Active:   true,
    	}, {
    		Name:     "groupby1",
    		Age:      110,
    		Birthday: Now(),
    	}, {
    		Name:     "groupby1",
    		Age:      220,
    		Birthday: Now(),
    		Active:   true,
    	}, {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 3.3K bytes
    - Viewed (0)
  2. schema/field_test.go

    			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,
    		"active":     true,
    	}
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Sat Feb 19 09:02:53 GMT 2022
    - 12.7K bytes
    - Viewed (0)
  3. 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 21 09:35:09 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 1.1K bytes
    - Viewed (0)
  4. tests/helper_test.go

    	Team      int
    	Languages int
    	Friends   int
    	NamedPet  bool
    	Tools     int
    }
    
    func GetUser(name string, config Config) *User {
    	var (
    		birthday = time.Now().Round(time.Second)
    		user     = User{
    			Name:     name,
    			Age:      18,
    			Birthday: &birthday,
    		}
    	)
    
    	if config.Account {
    		user.Account = Account{Number: name + "_account"}
    	}
    
    	for i := 0; i < config.Pets; i++ {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 8K bytes
    - Viewed (0)
  5. tests/embedded_struct_test.go

    		t.Errorf("Expected to get nil Author contentPtr but got: %v", hnPost.Author.ContentPtr)
    	}
    
    	if NewPost.Author.Birthday.UnixMilli() != hnPost.Author.Birthday.UnixMilli() {
    		t.Errorf("Expected to get Author birthday with %+v but got: %+v", NewPost.Author.Birthday, hnPost.Author.Birthday)
    	}
    
    	if hnPost.Author.BirthdayPtr != nil {
    		t.Errorf("Expected to get nil Author birthdayPtr but got: %+v", hnPost.Author.BirthdayPtr)
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Thu Oct 26 03:58:13 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  6. schema/schema_test.go

    		{Name: "Name", DBName: "name", BindNames: []string{"Name"}, DataType: schema.String},
    		{Name: "Age", DBName: "age", BindNames: []string{"Age"}, DataType: schema.Uint, Size: 64},
    		{Name: "Birthday", DBName: "birthday", BindNames: []string{"Birthday"}, DataType: schema.Time},
    		{Name: "CompanyID", DBName: "company_id", BindNames: []string{"CompanyID"}, DataType: schema.Int, Size: 64},
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:31:23 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  7. tests/query_test.go

    		if err := DB.Model(&User{}).Where("name = ?", "find").First(first).Error; err != nil {
    			t.Errorf("errors happened when query first: %v", err)
    		} else {
    			for _, name := range []string{"Name", "Age", "Birthday"} {
    				t.Run(name, func(t *testing.T) {
    					dbName := DB.NamingStrategy.ColumnName("", name)
    
    					switch name {
    					case "Name":
    						if _, ok := first[dbName].(string); !ok {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Fri Mar 15 06:14:48 GMT 2024
    - 49.4K bytes
    - Viewed (0)
  8. utils/tests/models.go

    // His pet also has one Toy (has one - polymorphic)
    // NamedPet is a reference to a named `Pet` (has one)
    type User struct {
    	gorm.Model
    	Name      string
    	Age       uint
    	Birthday  *time.Time
    	Account   Account
    	Pets      []*Pet
    	NamedPet  *Pet
    	Toys      []Toy   `gorm:"polymorphic:Owner"`
    	Tools     []Tools `gorm:"polymorphicType:Type;polymorphicId:CustomID"`
    	CompanyID *int
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  9. tests/connpool_test.go

    			"SELECT VERSION()",
    			"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 21 09:35:09 GMT 2024
    - Last Modified: Tue Feb 06 02:54:40 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  10. tests/scanner_valuer_test.go

    		Gender:   &sql.NullString{String: "M", Valid: true},
    		Age:      sql.NullInt64{Int64: 18, Valid: true},
    		Male:     sql.NullBool{Bool: true, Valid: true},
    		Height:   sql.NullFloat64{Float64: 1.8888, Valid: true},
    		Birthday: sql.NullTime{Time: time.Now(), Valid: true},
    		Allergen: NullString{sql.NullString{String: "Allergen", Valid: true}},
    		Password: EncryptedData("pass1"),
    		Bytes:    []byte("byte"),
    		Num:      18,
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Wed Jun 07 07:02:07 GMT 2023
    - 10.6K bytes
    - Viewed (0)
Back to top