Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Meleti (0.09 sec)

  1. clause/delete_test.go

    	results := []struct {
    		Clauses []clause.Interface
    		Result  string
    		Vars    []interface{}
    	}{
    		{
    			[]clause.Interface{clause.Delete{}, clause.From{}},
    			"DELETE FROM `users`", nil,
    		},
    		{
    			[]clause.Interface{clause.Delete{Modifier: "LOW_PRIORITY"}, clause.From{}},
    			"DELETE LOW_PRIORITY FROM `users`", nil,
    		},
    	}
    
    	for idx, result := range results {
    		t.Run(fmt.Sprintf("case #%v", idx), func(t *testing.T) {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Tue Jun 02 01:18:01 UTC 2020
    - 608 bytes
    - Viewed (0)
  2. tests/delete_test.go

    		return
    	}
    
    	users := []*User{
    		GetUser("delete-returning-1", Config{}),
    		GetUser("delete-returning-2", Config{}),
    		GetUser("delete-returning-3", Config{}),
    	}
    	DB.Create(&users)
    
    	var results []User
    	DB.Where("name IN ?", []string{users[0].Name, users[1].Name}).Clauses(clause.Returning{}).Delete(&results)
    	if len(results) != 2 {
    		t.Errorf("failed to return delete data, got %v", results)
    	}
    
    	var count int64
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Tue Oct 10 07:03:34 UTC 2023
    - 9.4K bytes
    - Viewed (0)
Back to top