- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for 100 (0.14 sec)
-
clause/where_test.go
}, }}, "SELECT * FROM `users` WHERE `users`.`id` <> ? AND `score` <= ?", []interface{}{"1", 100}, }, { []clause.Interface{clause.Select{}, clause.From{}, clause.Where{ Exprs: []clause.Expression{clause.Not(clause.Eq{Column: clause.PrimaryColumn, Value: "1"}, clause.And(clause.Expr{SQL: "`score` <= ?", Vars: []interface{}{100}, WithoutParentheses: false}))},
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
// update with map if res := DB.Model(users[0]).Updates(map[string]interface{}{"name": "updates_01_newname", "age": 100}); res.Error != nil || res.RowsAffected != 1 { t.Errorf("Failed to update users") } if users[0].Name != "updates_01_newname" || users[0].Age != 100 { t.Errorf("Record should be updated also with map") } if users[0].UpdatedAt.UnixNano() == lastUpdatedAt.UnixNano() {
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) -
tests/scanner_valuer_test.go
type UserWithPoint struct { Name string Point Point } dryRunDB := DB.Session(&gorm.Session{DryRun: true}) stmt := dryRunDB.Create(&UserWithPoint{ Name: "jinzhu", Point: Point{X: 100, Y: 100}, }).Statement if stmt.SQL.String() == "" || len(stmt.Vars) != 2 { t.Errorf("Failed to generate sql, got %v", stmt.SQL.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) -
prepare_stmt.go
} func NewPreparedStmtDB(connPool ConnPool) *PreparedStmtDB { return &PreparedStmtDB{ ConnPool: connPool, Stmts: make(map[string]*Stmt), Mux: &sync.RWMutex{}, PreparedSQL: make([]string, 0, 100), } } func (db *PreparedStmtDB) GetDBConn() (*sql.DB, error) { if sqldb, ok := db.ConnPool.(*sql.DB); ok { return sqldb, nil }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Mar 28 08:47:39 GMT 2024 - 6.4K bytes - Viewed (0) -
tests/hooks_test.go
p := Product{Code: "Invalid", Price: 100} if DB.Save(&p).Error == nil { t.Fatalf("An error from before create callbacks happened when create with invalid value") } if DB.Where("code = ?", "Invalid").First(&Product{}).Error == nil { t.Fatalf("Should not save record that have errors") } if DB.Save(&Product{Code: "dont_save", Price: 100}).Error == nil {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sat Feb 18 01:20:29 GMT 2023 - 15.9K bytes - Viewed (0) -
clause/benchmarks_test.go
clause.Gt{Column: "age", Value: 18}, clause.Or(clause.Neq{Column: "name", Value: "jinzhu"}), }}, clause.Where{Exprs: []clause.Expression{ clause.Or(clause.Gt{Column: "score", Value: 100}, clause.Like{Column: "name", Value: "%linus%"}), }}, clause.GroupBy{Columns: []clause.Column{{Name: "role"}}, Having: []clause.Expression{clause.Eq{"role", "admin"}}}, clause.Limit{Limit: &limit10, Offset: 20},
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) -
callbacks/query.go
func BuildQuerySQL(db *gorm.DB) { if db.Statement.Schema != nil { for _, c := range db.Statement.Schema.QueryClauses { db.Statement.AddClause(c) } } if db.Statement.SQL.Len() == 0 { db.Statement.SQL.Grow(100) clauseSelect := clause.Select{Distinct: db.Statement.Distinct} if db.Statement.ReflectValue.Kind() == reflect.Struct && db.Statement.ReflectValue.Type() == db.Statement.Schema.ModelType { var conds []clause.Expression
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Jan 29 03:34:57 GMT 2024 - 9.9K bytes - Viewed (0) -
tests/sql_builder_test.go
}) assertEqualSQL(t, `UPDATE "users" SET "name"='Foo',"age"=100 WHERE id = 100 AND "users"."deleted_at" IS NULL`, sql) // after model changed if DB.Statement.DryRun || DB.DryRun { t.Fatal("Failed expect DB.DryRun and DB.Statement.ToSQL to be false") } // UpdateColumns sql = DB.ToSQL(func(tx *gorm.DB) *gorm.DB {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 16.7K bytes - Viewed (0) -
tests/associations_test.go
} member.Profile = Profile{} DB.Model(&member).Update("Refer", 100) var profile2 Profile if err := DB.First(&profile2, "id = ?", profile.ID).Error; err != nil { t.Fatalf("failed to find profile, got error: %v", err) } else if profile2.MemberID != 100 { t.Fatalf("member id is not equal: expects: %v, got: %v", 100, profile2.MemberID) }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Wed Feb 08 08:29:09 GMT 2023 - 10.9K bytes - Viewed (0) -
clause/expression_test.go
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Aug 10 05:34:33 GMT 2023 - 8.4K bytes - Viewed (0)