- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for border (0.14 sec)
-
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) -
finisher_api.go
} } tx.Statement.AddClause(clause.Select{Expression: expr}) } if orderByClause, ok := db.Statement.Clauses["ORDER BY"]; ok { if _, ok := db.Statement.Clauses["GROUP BY"]; !ok { delete(tx.Statement.Clauses, "ORDER BY") defer func() { tx.Statement.Clauses["ORDER BY"] = orderByClause }() } } tx.Statement.Dest = count tx = tx.callbacks.Query().Execute(tx)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 22.7K bytes - Viewed (0) -
tests/sql_builder_test.go
// find sql := DB.ToSQL(func(tx *gorm.DB) *gorm.DB { return tx.Model(&User{}).Where("id = ?", 100).Limit(10).Order("age desc").Find(&[]User{}) }) assertEqualSQL(t, `SELECT * FROM "users" WHERE id = 100 AND "users"."deleted_at" IS NULL ORDER BY age desc LIMIT 10`, sql) // after model changed if DB.Statement.DryRun || DB.DryRun {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 16.7K bytes - Viewed (0) -
gorm.go
return nil } // ToSQL for generate SQL string. // // db.ToSQL(func(tx *gorm.DB) *gorm.DB { // return tx.Model(&User{}).Where(&User{Name: "foo", Age: 20}) // .Limit(10).Offset(5) // .Order("name ASC") // .First(&User{}) // }) func (db *DB) ToSQL(queryFn func(tx *DB) *DB) string { tx := queryFn(db.Session(&Session{DryRun: true, SkipDefaultTransaction: true})) stmt := tx.Statement
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sun Aug 20 11:46:56 GMT 2023 - 11.6K bytes - Viewed (0) -
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)