- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for dialectors (0.08 sec)
-
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 {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jul 12 13:21:22 UTC 2023 - 3.1K bytes - Viewed (0) -
tests/gorm_test.go
if err == nil { t.Fatalf("should returns error but got nil") } } func TestReturningWithNullToZeroValues(t *testing.T) { dialect := DB.Dialector.Name() switch dialect { case "mysql", "sqlserver": // these dialects do not support the "returning" clause return default: // This user struct will leverage the existing users table, but override // the Name field to default to null.
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jun 01 07:22:21 UTC 2023 - 3.3K bytes - Viewed (0) -
interfaces.go
package gorm import ( "context" "database/sql" "gorm.io/gorm/clause" "gorm.io/gorm/schema" ) // Dialector GORM database dialector type Dialector interface { Name() string Initialize(*DB) error Migrator(db *DB) Migrator DataTypeOf(*schema.Field) string DefaultValueOf(*schema.Field) clause.Expression BindVarTo(writer clause.Writer, stmt *Statement, v interface{}) QuoteTo(clause.Writer, string)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Aug 19 13:33:31 UTC 2023 - 2.2K bytes - Viewed (0) -
tests/postgres_test.go
"time" "github.com/google/uuid" "github.com/lib/pq" "gorm.io/gorm" "gorm.io/gorm/clause" . "gorm.io/gorm/utils/tests" ) func TestPostgresReturningIDWhichHasStringType(t *testing.T) { if DB.Dialector.Name() != "postgres" { t.Skip() } type Yasuo struct { ID string `gorm:"default:gen_random_uuid()"` Name string CreatedAt time.Time `gorm:"type:TIMESTAMP WITHOUT TIME ZONE"`
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Oct 08 09:16:32 UTC 2022 - 6.4K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb1/com/SmbComNegotiate.java
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 3.3K bytes - Viewed (0) -
tests/connection_test.go
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 }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Jan 28 14:16:42 UTC 2022 - 963 bytes - Viewed (0) -
tests/delete_test.go
} } } // only sqlite, postgres, sqlserver support returning func TestSoftDeleteReturning(t *testing.T) { if DB.Dialector.Name() != "sqlite" && DB.Dialector.Name() != "postgres" && DB.Dialector.Name() != "sqlserver" { return } users := []*User{ GetUser("delete-returning-1", Config{}), GetUser("delete-returning-2", Config{}),
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Oct 10 07:03:34 UTC 2023 - 9.4K bytes - Viewed (0) -
src/main/java/jcifs/smb1/smb1/SmbComNegotiate.java
} catch( UnsupportedEncodingException uee ) { return 0; } System.arraycopy( dialects, 0, dst, dstIndex, dialects.length ); return dialects.length; } int readParameterWordsWireFormat( byte[] buffer, int bufferIndex ) { return 0; } int readBytesWireFormat( byte[] buffer, int bufferIndex ) { return 0; } public String toString() {
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Fri Mar 22 21:10:40 UTC 2019 - 1.9K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb2/ioctl/ValidateNegotiateInfoRequest.java
private byte[] clientGuid; private int securityMode; private int dialects[]; /** * @param capabilities * @param clientGuid * @param securityMode * @param dialects * */ public ValidateNegotiateInfoRequest ( int capabilities, byte[] clientGuid, int securityMode, int[] dialects ) { this.capabilities = capabilities; this.clientGuid = clientGuid;
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 2.3K bytes - Viewed (0) -
tests/main_test.go
package tests_test import ( "testing" . "gorm.io/gorm/utils/tests" ) func TestExceptionsWithInvalidSql(t *testing.T) { if name := DB.Dialector.Name(); name == "sqlserver" { t.Skip("skip sqlserver due to it will raise data race for invalid sql") } var columns []string if DB.Where("sdsd.zaaa = ?", "sd;;;aa").Pluck("aaa", &columns).Error == nil { t.Errorf("Should got error with invalid SQL") }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Mar 24 01:31:58 UTC 2022 - 1.4K bytes - Viewed (0)