Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Birthday (0.22 sec)

  1. 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 May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
  2. tests/migrate_test.go

    		ID       uint
    		Name     string
    		Salary   float64
    		Birthday time.Time `gorm:"precision:4"`
    	}
    
    	DB.Migrator().DropTable(&UserMigrateColumn{})
    
    	DB.AutoMigrate(&UserMigrateColumn{})
    
    	type UserMigrateColumn2 struct {
    		ID                  uint
    		Name                string    `gorm:"size:128"`
    		Salary              float64   `gorm:"precision:2"`
    		Birthday            time.Time `gorm:"precision:2"`
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 11:24:16 GMT 2024
    - 56.2K bytes
    - Viewed (0)
Back to top