Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for sql (0.14 sec)

  1. clause/joins_test.go

    				},
    			},
    			sql: "INNER JOIN `user` USING (`id`)",
    		},
    	}
    	for _, result := range results {
    		t.Run(result.name, func(t *testing.T) {
    			user, _ := schema.Parse(&tests.User{}, &sync.Map{}, db.NamingStrategy)
    			stmt := &gorm.Statement{DB: db, Table: user.Table, Schema: user, Clauses: map[string]clause.Clause{}}
    			result.join.Build(stmt)
    			if result.sql != stmt.SQL.String() {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Nov 03 13:03:13 GMT 2022
    - 2.6K bytes
    - Viewed (0)
  2. tests/joins_test.go

    	if !regexp.MustCompile("SELECT .* FROM .users. left join pets.*join accounts.*").MatchString(stmt.SQL.String()) {
    		t.Errorf("joins should be ordered, but got %v", stmt.SQL.String())
    	}
    
    	iv := DB.Table(`table_invoices`).Select(`seller, SUM(total) as total, SUM(paid) as paid, SUM(balance) as balance`).Group(`seller`)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Apr 26 14:19:32 GMT 2023
    - 13.5K bytes
    - Viewed (1)
Back to top