Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for inside (0.27 sec)

  1. tests/upsert_test.go

    	}
    
    	DB.FirstOrInit(&user3, map[string]interface{}{"name": "find or init 2"})
    	if user3.Name != "find or init 2" || user3.ID != 0 {
    		t.Errorf("user should be initialized with inline search value")
    	}
    
    	DB.Where(&User{Name: "find or init"}).Attrs(User{Age: 44}).FirstOrInit(&user4)
    	if user4.Name != "find or init" || user4.ID != 0 || user4.Age != 44 {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Sep 05 07:39:19 GMT 2022
    - 11.4K bytes
    - Viewed (0)
  2. callbacks/query.go

    					for idx, dbName := range stmt.Schema.DBNames {
    						clauseSelect.Columns[idx] = clause.Column{Table: db.Statement.Table, Name: dbName}
    					}
    				}
    			}
    		}
    
    		// inline joins
    		fromClause := clause.From{}
    		if v, ok := db.Statement.Clauses["FROM"].Expression.(clause.From); ok {
    			fromClause = v
    		}
    
    		if len(db.Statement.Joins) != 0 || len(fromClause.Joins) != 0 {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Jan 29 03:34:57 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  3. tests/delete_test.go

    		t.Errorf("should raise record not found error, but got error %v", err)
    	}
    }
    
    func TestInlineCondDelete(t *testing.T) {
    	user1 := *GetUser("inline_delete_1", Config{})
    	user2 := *GetUser("inline_delete_2", Config{})
    	DB.Save(&user1).Save(&user2)
    
    	if DB.Delete(&User{}, user1.ID).Error != nil {
    		t.Errorf("No error should happen when delete a record")
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 07:03:34 GMT 2023
    - 9.4K bytes
    - Viewed (0)
  4. tests/query_test.go

    	if len(results) != 1 {
    		t.Fatalf("Search all records with inline map")
    	}
    
    	CheckUser(t, results[0], users[2])
    
    	var results2 []User
    	DB.Find(&results2, map[string]interface{}{"name": users[3].Name, "company_id": nil})
    	if len(results2) != 0 {
    		t.Errorf("Search all records with inline map containing null value finding 0 records")
    	}
    
    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