Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 56 of 56 for Kappen (0.16 sec)

  1. association.go

    					if ref.OwnPrimaryKey {
    						primaryFields = append(primaryFields, ref.PrimaryKey)
    						joinPrimaryKeys = append(joinPrimaryKeys, ref.ForeignKey.DBName)
    					} else {
    						relPrimaryFields = append(relPrimaryFields, ref.PrimaryKey)
    						joinRelPrimaryKeys = append(joinRelPrimaryKeys, ref.ForeignKey.DBName)
    					}
    				} else {
    					conds = append(conds, clause.Eq{Column: ref.ForeignKey.DBName, Value: ref.PrimaryValue})
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu May 04 11:30:45 GMT 2023
    - 21.2K bytes
    - Viewed (0)
  2. schema/schema.go

    				field.Schema.CreateClauses = append(field.Schema.CreateClauses, fc.CreateClauses(field)...)
    			}
    
    			if fc, ok := fieldInterface.(QueryClausesInterface); ok {
    				field.Schema.QueryClauses = append(field.Schema.QueryClauses, fc.QueryClauses(field)...)
    			}
    
    			if fc, ok := fieldInterface.(UpdateClausesInterface); ok {
    				field.Schema.UpdateClauses = append(field.Schema.UpdateClauses, fc.UpdateClauses(field)...)
    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. tests/non_std_test.go

    	UpdatedAt  time.Time
    }
    
    func TestNonStdPrimaryKeyAndDefaultValues(t *testing.T) {
    	DB.Migrator().DropTable(&Animal{})
    	if err := DB.AutoMigrate(&Animal{}); err != nil {
    		t.Fatalf("no error should happen when migrate but got %v", err)
    	}
    
    	animal := Animal{Name: "Ferdinand"}
    	DB.Save(&animal)
    	updatedAt1 := animal.UpdatedAt
    
    	DB.Save(&animal).Update("name", "Francis")
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  4. schema/field.go

    				ef.BindNames = append([]string{fieldStruct.Name}, ef.BindNames...)
    				if _, ok := field.TagSettings["EMBEDDED"]; ok || !fieldStruct.Anonymous {
    					ef.EmbeddedBindNames = append([]string{fieldStruct.Name}, ef.EmbeddedBindNames...)
    				}
    				// index is negative means is pointer
    				if field.FieldType.Kind() == reflect.Struct {
    					ef.StructField.Index = append([]int{fieldStruct.Index[0]}, ef.StructField.Index...)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
  5. tests/sql_builder_test.go

    	DB.Save(&user1).Save(&user2).Save(&user3)
    
    	rows, err := DB.Table("users").Where("name = ? or name = ?", user2.Name, user3.Name).Select("name, age").Rows()
    	if err != nil {
    		t.Errorf("Not error should happen, got %v", err)
    	}
    
    	count := 0
    	for rows.Next() {
    		var name string
    		var age int64
    		rows.Scan(&name, &age)
    		count++
    	}
    
    	if count != 2 {
    		t.Errorf("Should found two records")
    	}
    }
    
    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)
  6. tests/query_test.go

    		t.Errorf("No error should returns, but got %v", err)
    	}
    
    	AssertEqual(t, p, p2)
    
    	if err := DB.First(&p, "id = ?", p2.ID).Error; err != nil {
    		t.Errorf("No error should happen when querying with customized type for primary key, got err %v", err)
    	}
    
    	AssertEqual(t, p, p2)
    }
    
    func TestStringPrimaryKeyForNumericValueStartingWithZero(t *testing.T) {
    	type AddressByZipCode struct {
    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