Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for statement (0.16 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() {
    				t.Errorf("want: %s, got: %s", result.sql, stmt.SQL.String())
    			}
    		})
    Go
    - Registered: Sun Apr 28 09:35:09 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())
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Apr 26 14:19:32 GMT 2023
    - 13.5K bytes
    - Viewed (1)
Back to top