Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 43 of 43 for selected (0.16 sec)

  1. tests/sql_builder_test.go

    	if !regexp.MustCompile(`WHERE \(a = .+ or b = .+\) AND .users.\..deleted_at. IS NULL`).MatchString(sql) {
    		t.Fatalf("invalid sql generated, got %v", sql)
    	}
    
    	sql = dryRunDB.Where("a = ? or b = ?", "a", "b").Or("c = ? and d = ?", "c", "d").Find(&User{}).Statement.SQL.String()
    	if !regexp.MustCompile(`WHERE \(\(a = .+ or b = .+\) OR \(c = .+ and d = .+\)\) AND .users.\..deleted_at. IS NULL`).MatchString(sql) {
    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)
  2. tests/associations_test.go

    	}
    
    	var result Member
    	if err := DB.First(&result, member.ID).Error; err == nil {
    		t.Fatalf("Should not find deleted member")
    	}
    
    	if err := DB.First(&profile2, profile.ID).Error; err == nil {
    		t.Fatalf("Should not find deleted profile")
    	}
    }
    
    func TestForeignKeyConstraintsBelongsTo(t *testing.T) {
    	tidbSkip(t, "not support the foreign key feature")
    
    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)
  3. association.go

    			association.Error = association.DB.Where(clause.Where{Exprs: conds}).Model(nil).Delete(joinValue).Error
    		}
    
    		if association.Error == nil {
    			// clean up deleted values's foreign key
    			relValuesMap, _ := schema.GetIdentityFieldValuesMapFromValues(association.DB.Statement.Context, values, rel.FieldSchema.PrimaryFields)
    
    			cleanUpDeletedRelations := func(data reflect.Value) {
    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)
Back to top