Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 24 of 24 for elseif (0.14 sec)

  1. tests/associations_test.go

    	} else if profile.Refer != member.ProfileID {
    		t.Fatalf("member id is not equal: expects: %v, got: %v", profile.Refer, member.ProfileID)
    	}
    
    	DB.Model(&profile).Update("Refer", 100)
    
    	var member2 Member
    	if err := DB.First(&member2, "id = ?", member.ID).Error; err != nil {
    		t.Fatalf("failed to find member, got error: %v", err)
    	} else if member2.ProfileID != 100 {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Feb 08 08:29:09 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  2. schema/schema.go

    	// Use the modelType or modelType + schemaTable (if it present) as cache key.
    	var schemaCacheKey interface{}
    	if specialTableName != "" {
    		schemaCacheKey = fmt.Sprintf("%p-%s", modelType, specialTableName)
    	} else {
    		schemaCacheKey = modelType
    	}
    
    	// Load exist schema cache, return if exists
    	if v, ok := cacheStore.Load(schemaCacheKey); ok {
    		s := v.(*Schema)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 06:50:29 GMT 2023
    - 13.7K bytes
    - Viewed (0)
  3. gorm.go

    		tx.Statement.Context = config.Context
    	}
    
    	if config.PrepareStmt {
    		var preparedStmt *PreparedStmtDB
    
    		if v, ok := db.cacheStore.Load(preparedStmtDBKey); ok {
    			preparedStmt = v.(*PreparedStmtDB)
    		} else {
    			preparedStmt = NewPreparedStmtDB(db.ConnPool)
    			db.cacheStore.Store(preparedStmtDBKey, preparedStmt)
    		}
    
    		switch t := tx.Statement.ConnPool.(type) {
    		case Tx:
    			tx.Statement.ConnPool = &PreparedStmtTX{
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sun Aug 20 11:46:56 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  4. tests/sql_builder_test.go

    	for rows.Next() {
    		var name string
    		var total int64
    		rows.Scan(&name, &total)
    
    		if name == users[0].Name && total != 3 {
    			t.Errorf("Should have one user having name %v", users[0].Name)
    		} else if name == users[1].Name && total != 1 {
    			t.Errorf("Should have two users having name %v", users[1].Name)
    		}
    	}
    }
    
    func TestQueryRaw(t *testing.T) {
    	users := []*User{
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 16.7K bytes
    - Viewed (0)
Back to top