Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Time (0.17 sec)

  1. tests/migrate_test.go

    		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)
  2. tests/query_test.go

    		}
    	}
    
    	var times []time.Time
    	if err := DB.Model(User{}).Where("name like ?", "pluck-user%").Pluck("created_at", &times).Error; err != nil {
    		t.Errorf("got error when pluck time: %v", err)
    	}
    
    	for idx, tv := range times {
    		AssertEqual(t, tv, users[idx].CreatedAt)
    	}
    
    	var ptrtimes []*time.Time
    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)
Back to top