- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 29 for Jinzhu (0.16 sec)
-
logger/sql_test.go
NumericRegexp: nil, Vars: []interface{}{"jinzhu", 1, 999.99, true, []byte("12345"), tt, &tt, nil, "w@g.\"com", myrole, pwd}, Result: `create table users (name, age, height, actived, bytes, create_at, update_at, deleted_at, email, role, pass) values ("jinzhu", 1, 999.99, true, "12345", "2020-02-23 11:10:10", "2020-02-23 11:10:10", NULL, "w@g.""com", "admin", "pass")`, }, {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Mar 21 08:00:02 GMT 2024 - 8.4K bytes - Viewed (0) -
chainable_api.go
// // // Find the first user with name jinzhu // db.Where("name = ?", "jinzhu").First(&user) // // Find the first user with name jinzhu and age 20 // db.Where(&User{Name: "jinzhu", Age: 20}).First(&user) // // Find the first user with name jinzhu and age not equal to 20 // db.Where("name = ?", "jinzhu").Where("age <> ?", "20").First(&user) //
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) -
clause/where_test.go
}}, "SELECT * FROM `users` WHERE `users`.`id` = ? AND `age` > ? OR `name` <> ?", []interface{}{"1", 18, "jinzhu"}, }, { []clause.Interface{clause.Select{}, clause.From{}, clause.Where{
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Apr 25 12:22:53 GMT 2024 - 6.2K bytes - Viewed (0) -
tests/query_test.go
} result = dryDB.Where("name = ?", "jinzhu").Or(User{Name: "jinzhu 2", Age: 18}).Find(&User{}) if !regexp.MustCompile("SELECT \\* FROM .*users.* WHERE .*name.* = .+ OR \\(.*name.* AND .*age.*\\)").MatchString(result.Statement.SQL.String()) { t.Fatalf("Build OR condition, but got %v", result.Statement.SQL.String()) } result = dryDB.Where("name = ?", "jinzhu").Or(map[string]interface{}{"name": "jinzhu 2", "age": 18}).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) -
tests/prepared_stmt_test.go
sqlDB, _ := tx.DB() sqlDB.SetMaxOpenConns(1) tx = tx.Session(&gorm.Session{PrepareStmt: true}) wg := sync.WaitGroup{} for i := 0; i < 100; i++ { wg.Add(1) go func() { user := User{Name: "jinzhu"} tx.Create(&user) var result User tx.First(&result) wg.Done() }() } wg.Wait() conn, ok := tx.ConnPool.(*gorm.PreparedStmtDB) AssertEqual(t, ok, true)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Mar 21 07:55:43 GMT 2024 - 4K bytes - Viewed (0) -
tests/preload_test.go
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Apr 25 12:21:03 GMT 2024 - 14.9K bytes - Viewed (0) -
tests/create_test.go
package tests_test import ( "errors" "fmt" "regexp" "testing" "time" "github.com/jinzhu/now" "gorm.io/gorm" "gorm.io/gorm/clause" . "gorm.io/gorm/utils/tests" ) func TestCreate(t *testing.T) { user := *GetUser("create", Config{}) if results := DB.Create(&user); results.Error != nil { t.Fatalf("errors happened when create: %v", results.Error) } else if results.RowsAffected != 1 {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 19 03:50:28 GMT 2024 - 26.4K bytes - Viewed (0) -
schema/relationship.go
package schema import ( "context" "fmt" "reflect" "strings" "github.com/jinzhu/inflection" "gorm.io/gorm/clause" ) // RelationshipType relationship type type RelationshipType string const ( HasOne RelationshipType = "has_one" // HasOneRel has one relationship HasMany RelationshipType = "has_many" // HasManyRel has many relationship
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) -
schema/field.go
package schema import ( "context" "database/sql" "database/sql/driver" "fmt" "reflect" "strconv" "strings" "sync" "time" "github.com/jinzhu/now" "gorm.io/gorm/clause" "gorm.io/gorm/utils" ) // special types' reflect type var ( TimeReflectType = reflect.TypeOf(time.Time{}) TimePtrReflectType = reflect.TypeOf(&time.Time{}) ByteReflectType = reflect.TypeOf(uint8(0)) ) type (
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Apr 15 03:20:20 GMT 2024 - 32K bytes - Viewed (1) -
docs/de/docs/how-to/conditional-openapi.md
* Implementieren und verwenden Sie gängige kryptografische Tools wie Passlib und JWT-Tokens, usw. * Fügen Sie bei Bedarf detailliertere Berechtigungskontrollen mit OAuth2-Scopes hinzu. * ... usw.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 18:18:13 GMT 2024 - 2.8K bytes - Viewed (0)