- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for myself (0.16 sec)
-
tests/docker-compose.yml
version: '3' services: mysql: image: 'mysql/mysql-server:latest' ports: - "9910:3306" environment: - MYSQL_DATABASE=gorm - MYSQL_USER=gorm - MYSQL_PASSWORD=gorm - MYSQL_RANDOM_ROOT_PASSWORD="yes" postgres: image: 'postgres:latest' ports: - "9920:5432" environment: - TZ=Asia/Shanghai - POSTGRES_DB=gorm - POSTGRES_USER=gorm
Others - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 18 08:28:46 GMT 2024 - 862 bytes - Viewed (0) -
tests/connpool_test.go
} func TestConnPoolWrapper(t *testing.T) { dialect := os.Getenv("GORM_DIALECT") if dialect != "mysql" { t.SkipNow() } dbDSN := os.Getenv("GORM_DSN") if dbDSN == "" { dbDSN = "gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True&loc=Local" } nativeDB, err := sql.Open("mysql", dbDSN) if err != nil { t.Fatalf("Should open db success, but got %v", err) } conn := &wrapperConnPool{
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Feb 06 02:54:40 GMT 2024 - 5.5K bytes - Viewed (0) -
tests/create_test.go
AssertEqual(t, u2.Mobile, "133xxxx") } func TestCreateFromMapWithoutPK(t *testing.T) { if !isMysql() { t.Skipf("This test case skipped, because of only supporting for mysql") } // case 1: one record, create from map[string]interface{} mapValue1 := map[string]interface{}{"name": "create_from_map_with_schema1", "age": 1} if err := DB.Model(&User{}).Create(mapValue1).Error; err != nil {
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) -
finisher_api.go
func (db *DB) SavePoint(name string) *DB { if savePointer, ok := db.Dialector.(SavePointerDialectorInterface); ok { // close prepared statement, because SavePoint not support prepared statement. // e.g. mysql8.0 doc: https://dev.mysql.com/doc/refman/8.0/en/sql-prepared-statements.html var ( preparedStmtTx *PreparedStmtTX isPreparedStmtTx bool ) // close prepared statement, because SavePoint not support prepared statement.
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) -
.github/workflows/tests.yml
Others - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Jan 29 02:34:20 GMT 2024 - 6.6K bytes - Viewed (0) -
tests/gorm_test.go
package tests_test import ( "testing" "gorm.io/driver/mysql" "gorm.io/gorm" ) func TestOpen(t *testing.T) { dsn := "gorm:gorm@tcp(localhost:9910)/gorm?loc=Asia%2FHongKong" // invalid loc _, err := gorm.Open(mysql.Open(dsn), &gorm.Config{}) if err == nil { t.Fatalf("should returns error but got nil") } } func TestReturningWithNullToZeroValues(t *testing.T) { dialect := DB.Dialector.Name() switch dialect {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Jun 01 07:22:21 GMT 2023 - 3.3K bytes - Viewed (0) -
tests/migrate_test.go
t.Fatal("should not found dropped table") } } func TestMigrateWithQuotedIndex(t *testing.T) { if DB.Dialector.Name() != "mysql" { t.Skip() } type QuotedIndexStruct struct { gorm.Model Name string `gorm:"size:255;index:AS"` // AS is one of MySQL reserved words } if err := DB.Migrator().DropTable(&QuotedIndexStruct{}); err != nil { t.Fatalf("Failed to drop table, got error %v", err)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 18 11:24:16 GMT 2024 - 56.2K bytes - Viewed (0) -
tests/helper_test.go
t.Skipf("This test case skipped, because of TiDB '%s'", reason) } } func isTiDB() bool { return os.Getenv("GORM_DIALECT") == "tidb" } func isMysql() bool { return os.Getenv("GORM_DIALECT") == "mysql" } func isSqlite() bool { return os.Getenv("GORM_DIALECT") == "sqlite" } func db(unscoped bool) *gorm.DB { if unscoped { return DB.Unscoped() } else { return DB }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 19 03:50:28 GMT 2024 - 8K bytes - Viewed (0) -
tests/scanner_valuer_test.go
nullTime := sql.NullTime{} err := nullTime.Scan(v) t.Time = nullTime.Time return err } func (t EmptyTime) Value() (driver.Value, error) { return time.Now() /* pass tests, mysql 8 doesn't support 0000-00-00 by default */, nil } type NullString struct { sql.NullString } type Point struct { X, Y int } func (point Point) GormDataType() string { return "geo"
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Jun 07 07:02:07 GMT 2023 - 10.6K bytes - Viewed (0) -
tests/error_translator_test.go
} db, err := OpenTestConnection(&gorm.Config{TranslateError: true}) if err != nil { t.Fatalf("failed to connect database, got error %v", err) } dialectors := map[string]bool{"sqlite": true, "postgres": true, "mysql": true, "sqlserver": true} if supported, found := dialectors[db.Dialector.Name()]; !(found && supported) { return } DB.Migrator().DropTable(&City{}) if err = db.AutoMigrate(&City{}); err != nil {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Jul 12 13:21:22 GMT 2023 - 3.1K bytes - Viewed (0)