Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Pizza (0.22 sec)

  1. tests/sql_builder_test.go

    func TestGroupConditions(t *testing.T) {
    	type Pizza struct {
    		ID   uint
    		Name string
    		Size string
    	}
    	dryRunDB := DB.Session(&gorm.Session{DryRun: true})
    
    	stmt := dryRunDB.Where(
    		DB.Where("pizza = ?", "pepperoni").Where(DB.Where("size = ?", "small").Or("size = ?", "medium")),
    	).Or(
    		DB.Where("pizza = ?", "hawaiian").Where("size = ?", "xlarge"),
    	).Find(&Pizza{}).Statement
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 16.7K bytes
    - Viewed (0)
Back to top