Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for border (0.28 sec)

  1. chainable_api.go

    	tx.Statement.AddClause(clause.GroupBy{
    		Having: tx.Statement.BuildCondition(query, args...),
    	})
    	return
    }
    
    // Order specify order when retrieving records from database
    //
    //	db.Order("name DESC")
    //	db.Order(clause.OrderByColumn{Column: clause.Column{Name: "name"}, Desc: true})
    func (db *DB) Order(value interface{}) (tx *DB) {
    	tx = db.getInstance()
    
    	switch v := value.(type) {
    	case clause.OrderByColumn:
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Apr 17 03:38:55 GMT 2024
    - 14.3K bytes
    - Viewed (1)
  2. callbacks/create_test.go

    		Dest:         dest,
    	}
    
    	stmt.Schema = s
    
    	values := ConvertToCreateValues(stmt)
    	expected := clause.Values{
    		// column has value + defaultValue column has value (which should have a stable order)
    		Columns: []clause.Column{{Name: "name"}, {Name: "email"}, {Name: "age"}, {Name: "id"}},
    		Values: [][]interface{}{
    			{"alice", "email", 18, 1},
    			{"bob", "email", 19, 2},
    		},
    	}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 05:48:42 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  3. tests/migrate_test.go

    			t.Fatalf("Should have index on %s", "CompanyI.")
    		}
    
    		if !m.HasIndex(&DynamicUser{}, "DeletedAt") {
    			t.Fatalf("Should have index on deleted_at.")
    		}
    	}
    }
    
    // check column order after migration, flaky test
    // https://github.com/go-gorm/gorm/issues/4351
    func TestMigrateColumnOrder(t *testing.T) {
    	type UserMigrateColumn struct {
    		ID uint
    	}
    	DB.Migrator().DropTable(&UserMigrateColumn{})
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 11:24:16 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  4. tests/query_test.go

    		t.Fatalf("Build Order condition, but got %v", result.Statement.SQL.String())
    	}
    
    	result = dryDB.Order("age desc, name").Find(&User{})
    	if !regexp.MustCompile("SELECT \\* FROM .*users.* ORDER BY age desc, name").MatchString(result.Statement.SQL.String()) {
    		t.Fatalf("Build Order condition, but got %v", result.Statement.SQL.String())
    	}
    
    	result = dryDB.Order("age desc").Order("name").Find(&User{})
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
  5. schema/relationship.go

    		name     string
    		idx      = strings.Index(str, ",")
    		settings = ParseTagSetting(str, ",")
    	)
    
    	// optimize match english letters and midline
    	// The following code is basically called in for.
    	// In order to avoid the performance problems caused by repeated compilation of regular expressions,
    	// it only needs to be done once outside, so optimization is done here.
    	if idx != -1 && regEnLetterAndMidline.MatchString(str[0:idx]) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 22.4K bytes
    - Viewed (0)
Back to top