- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 78 for Klauser (0.18 sec)
-
clause/group_by_test.go
package clause_test import ( "fmt" "testing" "gorm.io/gorm/clause" ) func TestGroupBy(t *testing.T) { results := []struct { Clauses []clause.Interface Result string Vars []interface{} }{ { []clause.Interface{clause.Select{}, clause.From{}, clause.GroupBy{ Columns: []clause.Column{{Name: "role"}}, Having: []clause.Expression{clause.Eq{"role", "admin"}}, }},
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 1.1K bytes - Viewed (0) -
clause/from_test.go
Joins: []clause.Join{ { Type: clause.RightJoin, Table: clause.Table{Name: "profiles"}, ON: clause.Where{ []clause.Expression{clause.Eq{clause.Column{Table: "profiles", Name: "email"}, clause.Column{Table: clause.CurrentTable, Name: "email"}}}, }, }, }, }, clause.From{ Joins: []clause.Join{ { Type: clause.InnerJoin,
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Wed Jul 15 02:25:10 GMT 2020 - 1.9K bytes - Viewed (0) -
clause/where_test.go
}}, "SELECT * FROM `users` WHERE `users`.`id` = ? OR `name` <> ?", []interface{}{"1", "jinzhu"}, }, { []clause.Interface{clause.Select{}, clause.From{}, clause.Where{
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Apr 25 12:22:53 GMT 2024 - 6.2K bytes - Viewed (0) -
tests/update_test.go
t.Errorf("Not error should happen when updating with gorm expr, but got %v", err) } if err := DB.Model(&results[1]).Clauses(clause.Returning{Columns: []clause.Column{{Name: "age"}}}).Updates(map[string]interface{}{"age": gorm.Expr("age + ?", 100)}).Error; err != nil { t.Errorf("Not error should happen when updating with gorm expr, but got %v", err) }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Dec 04 03:50:58 GMT 2023 - 30.3K bytes - Viewed (0) -
clause/select.go
} } else { builder.WriteByte('*') } } func (s Select) MergeClause(clause *Clause) { if s.Expression != nil { if s.Distinct { if expr, ok := s.Expression.(Expr); ok { expr.SQL = "DISTINCT " + expr.SQL clause.Expression = expr return } } clause.Expression = s.Expression } else { clause.Expression = s } }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Wed Jul 14 07:51:24 GMT 2021 - 1.1K bytes - Viewed (0) -
schema/utils.go
if len(foreignKeys) == 1 { for idx, r := range foreignValues { queryValues[idx] = r[0] } return clause.Column{Table: table, Name: foreignKeys[0]}, queryValues } columns := make([]clause.Column, len(foreignKeys)) for idx, key := range foreignKeys { columns[idx] = clause.Column{Table: table, Name: key} } for idx, r := range foreignValues { queryValues[idx] = r }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sat Aug 19 13:35:14 GMT 2023 - 5.5K bytes - Viewed (0) -
tests/scanner_valuer_test.go
sql.NullString } type Point struct { X, Y int } func (point Point) GormDataType() string { return "geo" } func (point Point) GormValue(ctx context.Context, db *gorm.DB) clause.Expr { return clause.Expr{ SQL: "ST_PointFromText(?)", Vars: []interface{}{fmt.Sprintf("POINT(%d %d)", point.X, point.Y)}, } } func TestGORMValuer(t *testing.T) { type UserWithPoint struct { Name string
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Wed Jun 07 07:02:07 GMT 2023 - 10.6K bytes - Viewed (0) -
clause/benchmarks_test.go
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Oct 07 12:14:14 GMT 2022 - 1.9K bytes - Viewed (0) -
soft_delete.go
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Wed Feb 01 06:40:55 GMT 2023 - 4.5K bytes - Viewed (0) -
chainable_api.go
tx = db.getInstance() tx.Statement.Model = value return } // Clauses Add clauses // // This supports both standard clauses (clause.OrderBy, clause.Limit, clause.Where) and more // advanced techniques like specifying lock strength and optimizer hints. See the // [docs] for more depth. // // // add a simple limit clause // db.Clauses(clause.Limit{Limit: 1}).Find(&User{}) // // tell the optimizer to use the `idx_user_name` index
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Wed Apr 17 03:38:55 GMT 2024 - 14.3K bytes - Viewed (1)