Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 35 of 35 for joina (0.48 sec)

  1. statement.go

    	}
    
    	for k, c := range stmt.Clauses {
    		newStmt.Clauses[k] = c
    	}
    
    	for k, p := range stmt.Preloads {
    		newStmt.Preloads[k] = p
    	}
    
    	if len(stmt.Joins) > 0 {
    		newStmt.Joins = make([]join, len(stmt.Joins))
    		copy(newStmt.Joins, stmt.Joins)
    	}
    
    	if len(stmt.scopes) > 0 {
    		newStmt.scopes = make([]func(*DB) *DB, len(stmt.scopes))
    		copy(newStmt.scopes, stmt.scopes)
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Jan 12 08:42:21 UTC 2024
    - 19.8K bytes
    - Viewed (0)
  2. clause/joins_test.go

    			name: "RIGHT JOIN",
    			join: clause.Join{
    				Type:  clause.RightJoin,
    				Table: clause.Table{Name: "user"},
    				ON: clause.Where{
    					Exprs: []clause.Expression{clause.Eq{clause.Column{Table: "user_info", Name: "user_id"}, clause.PrimaryColumn}},
    				},
    			},
    			sql: "RIGHT JOIN `user` ON `user_info`.`user_id` = `users`.`id`",
    		},
    		{
    			name: "INNER JOIN",
    			join: clause.Join{
    				Type:  clause.InnerJoin,
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Nov 03 13:03:13 UTC 2022
    - 2.6K bytes
    - Viewed (0)
  3. schema/naming.go

    }
    
    // ColumnName convert string to column name
    func (ns NamingStrategy) ColumnName(table, column string) string {
    	return ns.toDBName(column)
    }
    
    // JoinTableName convert string to join table name
    func (ns NamingStrategy) JoinTableName(str string) string {
    	if !ns.NoLowerCase && strings.ToLower(str) == str {
    		return ns.TablePrefix + str
    	}
    
    	if ns.SingularTable {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 03:46:59 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  4. schema/schema.go

    //	}
    func (schema Schema) LookUpFieldByBindName(bindNames []string, name string) *Field {
    	if len(bindNames) == 0 {
    		return nil
    	}
    	for i := len(bindNames) - 1; i >= 0; i-- {
    		find := strings.Join(bindNames[:i], ".") + "." + name
    		if field, ok := schema.FieldsByBindName[find]; ok {
    			return field
    		}
    	}
    	return nil
    }
    
    type Tabler interface {
    	TableName() string
    }
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:52:33 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  5. tests/migrate_test.go

    	query := DB.Model(&User{}).
    		Select("users.id as users_id, users.name as users_name, pets.id as pets_id, pets.name as pets_name").
    		Joins("inner join pets on pets.user_id = users.id")
    
    	if err := DB.Migrator().CreateView("users_pets", gorm.ViewOption{Query: query}); err != nil {
    		t.Fatalf("Failed to crate view, got %v", err)
    	}
    
    	var count int64
    	if err := DB.Table("users_pets").Count(&count).Error; err != nil {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Mar 18 11:24:16 UTC 2024
    - 56.2K bytes
    - Viewed (0)
Back to top