- Sort Score
- Num 10 results
- Language All
Results 1 - 3 of 3 for MapColumns (0.06 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
generics.go
func (c chainG[T]) Omit(columns ...string) ChainInterface[T] { return c.with(func(db *DB) *DB { return db.Omit(columns...) }) } func (c chainG[T]) MapColumns(m map[string]string) ChainInterface[T] { return c.with(func(db *DB) *DB { return db.MapColumns(m) }) } func (c chainG[T]) Set(assignments ...clause.Assigner) SetUpdateOnlyInterface[T] { return c.processSet(assignments...) }
Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Sat Mar 21 11:34:24 GMT 2026 - 26K bytes - Click Count (0) -
chainable_api.go
tx.Statement.Omits = strings.FieldsFunc(columns[0], utils.IsInvalidDBNameChar) } else { tx.Statement.Omits = columns } return } // MapColumns modify the column names in the query results to facilitate align to the corresponding structural fields func (db *DB) MapColumns(m map[string]string) (tx *DB) { tx = db.getInstance() tx.Statement.ColumnMapping = m return } // Where add conditions //
Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Fri Sep 19 01:49:06 GMT 2025 - 14.8K bytes - Click Count (0) -
tests/query_test.go
DB.Save(&user) type result struct { Name string Nickname string Age uint } var res result DB.Table("users").Where("name = ?", user.Name).MapColumns(map[string]string{"name": "nickname"}).Scan(&res) if res.Nickname != user.Name { t.Errorf("Expected res.Nickname to be %s, but got %s", user.Name, res.Nickname) } if res.Name != "" {
Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Tue Jul 22 06:21:04 GMT 2025 - 51K bytes - Click Count (0)