Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for random (0.39 sec)

  1. tests/docker-compose.yml

    version: '3'
    
    services:
      mysql:
        image: 'mysql/mysql-server:latest'
        ports:
          - "9910:3306"
        environment:
          - MYSQL_DATABASE=gorm
          - MYSQL_USER=gorm
          - MYSQL_PASSWORD=gorm
          - MYSQL_RANDOM_ROOT_PASSWORD="yes"
      postgres:
        image: 'postgres:latest'
        ports:
          - "9920:5432"
        environment:
          - TZ=Asia/Shanghai
          - POSTGRES_DB=gorm
          - POSTGRES_USER=gorm
    Others
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 08:28:46 GMT 2024
    - 862 bytes
    - Viewed (0)
  2. .github/workflows/tests.yml

        services:
          mysql:
            image: ${{ matrix.dbversion }}
            env:
              MYSQL_DATABASE: gorm
              MYSQL_USER: gorm
              MYSQL_PASSWORD: gorm
              MYSQL_RANDOM_ROOT_PASSWORD: "yes"
            ports:
              - 9910:3306
            options: >-
              --health-cmd "mysqladmin ping -ugorm -pgorm"
              --health-interval 10s
              --health-start-period 10s
    Others
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Jan 29 02:34:20 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  3. tests/migrate_test.go

    	}
    }
    
    func TestTiDBMigrateColumns(t *testing.T) {
    	if !isTiDB() {
    		t.Skip()
    	}
    
    	// TiDB can't change column constraint and has auto_random feature
    	type ColumnStruct struct {
    		ID    int `gorm:"primarykey;default:auto_random()"`
    		Name  string
    		Age   int    `gorm:"default:18;comment:my age"`
    		Code  string `gorm:"unique;comment:my code;"`
    		Code2 string
    		Code3 string `gorm:"unique"`
    	}
    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)
  4. callbacks/preload.go

    func preloadEntryPoint(db *gorm.DB, joins []string, relationships *schema.Relationships, preloads map[string][]interface{}, associationsConds []interface{}) error {
    	preloadMap := parsePreloadMap(db.Statement.Schema, preloads)
    
    	// avoid random traversal of the map
    	preloadNames := make([]string, 0, len(preloadMap))
    	for key := range preloadMap {
    		preloadNames = append(preloadNames, key)
    	}
    	sort.Strings(preloadNames)
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  5. tests/tests_test.go

    }
    
    func RunMigrations() {
    	var err error
    	allModels := []interface{}{&User{}, &Account{}, &Pet{}, &Company{}, &Toy{}, &Language{}, &Coupon{}, &CouponProduct{}, &Order{}, &Parent{}, &Child{}, &Tools{}}
    	rand.Seed(time.Now().UnixNano())
    	rand.Shuffle(len(allModels), func(i, j int) { allModels[i], allModels[j] = allModels[j], allModels[i] })
    
    	DB.Migrator().DropTable("user_friends", "user_speaks")
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 3.3K bytes
    - Viewed (1)
Back to top