- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for myself (0.17 sec)
-
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 Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 22.7K bytes - Viewed (0) -
.github/workflows/tests.yml
Others - Registered: Sun Apr 28 09:35:09 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 Apr 28 09:35:09 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 Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Mar 18 11:24:16 GMT 2024 - 56.2K bytes - Viewed (0) -
tests/group_by_test.go
} if name != "groupby" || active != true || total != 40 { t.Errorf("group by two columns, name %v, age %v, active: %v", name, total, active) } if DB.Dialector.Name() == "mysql" { if err := DB.Model(&User{}).Select("name, age as total").Where("name LIKE ?", "groupby%").Having("total > ?", 300).Scan(&result).Error; err != nil { t.Errorf("no error should happen, but got %v", err) }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 3.3K 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 Apr 28 09:35:09 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 Apr 28 09:35:09 GMT 2024 - Last Modified: Wed Jun 07 07:02:07 GMT 2023 - 10.6K bytes - Viewed (0) -
tests/connection_test.go
package tests_test import ( "fmt" "testing" "gorm.io/driver/mysql" "gorm.io/gorm" ) func TestWithSingleConnection(t *testing.T) { expectedName := "test" var actualName string setSQL, getSQL := getSetSQL(DB.Dialector.Name()) if len(setSQL) == 0 || len(getSQL) == 0 { return } err := DB.Connection(func(tx *gorm.DB) error { if err := tx.Exec(setSQL, expectedName).Error; err != nil { return err
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Jan 28 14:16:42 GMT 2022 - 963 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 Apr 28 09:35:09 GMT 2024 - Last Modified: Wed Jul 12 13:21:22 GMT 2023 - 3.1K bytes - Viewed (0) -
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 Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Mar 18 08:28:46 GMT 2024 - 862 bytes - Viewed (0)