- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 27 for Writer (0.13 sec)
-
migrator/column_type.go
} return ct.SQLColumnType.Name() } // DatabaseTypeName returns the database system name of the column type. If an empty // string is returned, then the driver type name is not supported. // Consult your driver documentation for a list of driver data types. Length specifiers // are not included. // Common type names include "VARCHAR", "TEXT", "NVARCHAR", "DECIMAL", "BOOL", // "INT", and "BIGINT".
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Mar 24 01:31:58 GMT 2022 - 3.3K bytes - Viewed (0) -
utils/tests/utils.go
t.Errorf("%v: expect: %+v, got %+v", utils.FileWithLineNum(), expect, got) return } if valuer, ok := got.(driver.Valuer); ok { got, _ = valuer.Value() } if valuer, ok := expect.(driver.Valuer); ok { expect, _ = valuer.Value() } if got != nil { got = reflect.Indirect(reflect.ValueOf(got)).Interface() } if expect != nil {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Mar 10 09:21:56 GMT 2023 - 3.9K bytes - Viewed (0) -
errors.go
ErrSubQueryRequired = errors.New("sub query required") // ErrInvalidData unsupported data ErrInvalidData = errors.New("unsupported data") // ErrUnsupportedDriver unsupported driver ErrUnsupportedDriver = errors.New("unsupported driver") // ErrRegistered registered ErrRegistered = errors.New("registered") // ErrInvalidField invalid field ErrInvalidField = errors.New("invalid field") // ErrEmptySlice empty slice found
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Apr 26 02:53:17 GMT 2024 - 2.5K bytes - Viewed (0) -
logger/sql_test.go
package logger_test import ( "database/sql/driver" "encoding/json" "fmt" "regexp" "strings" "testing" "github.com/jinzhu/now" "gorm.io/gorm/logger" ) type JSON json.RawMessage func (j JSON) Value() (driver.Value, error) { if len(j) == 0 { return nil, nil } return json.RawMessage(j).MarshalJSON() } type ExampleStruct struct { Name string Val string }
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) -
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/table_test.go
package tests_test import ( "regexp" "sync" "testing" "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/schema" "gorm.io/gorm/utils/tests" . "gorm.io/gorm/utils/tests" ) type UserWithTable struct { gorm.Model Name string } func (UserWithTable) TableName() string { return "gorm.user" } func TestTable(t *testing.T) { dryDB := DB.Session(&gorm.Session{DryRun: true})
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sat Mar 09 09:31:28 GMT 2024 - 10.6K bytes - Viewed (0) -
tests/migrate_test.go
package tests_test import ( "context" "database/sql" "fmt" "math/rand" "os" "reflect" "strconv" "strings" "testing" "time" "github.com/stretchr/testify/assert" "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/logger" "gorm.io/gorm/migrator" "gorm.io/gorm/schema" "gorm.io/gorm/utils" . "gorm.io/gorm/utils/tests" ) func TestMigrate(t *testing.T) {
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) -
statement.go
writer.WriteByte('(') for idx, d := range v { if idx > 0 { writer.WriteByte(',') } stmt.QuoteTo(writer, d) } writer.WriteByte(')') case clause.Expr: v.Build(stmt) case string: stmt.DB.Dialector.QuoteTo(writer, v) case []string: writer.WriteByte('(') for idx, d := range v { if idx > 0 { writer.WriteByte(',') } stmt.DB.Dialector.QuoteTo(writer, d)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 19.8K bytes - Viewed (0) -
utils/tests/dummy_dialecter.go
return clause.Expr{SQL: "DEFAULT"} } func (DummyDialector) Migrator(*gorm.DB) gorm.Migrator { return nil } func (DummyDialector) BindVarTo(writer clause.Writer, stmt *gorm.Statement, v interface{}) { writer.WriteByte('?') } func (DummyDialector) QuoteTo(writer clause.Writer, str string) { var ( underQuoted, selfQuoted bool continuousBacktick int8 shiftDelimiter int8 )
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 06 06:03:31 GMT 2023 - 2.2K bytes - Viewed (0) -
interfaces.go
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) Explain(sql string, vars ...interface{}) string } // Plugin GORM plugin interface type Plugin interface { Name() string Initialize(*DB) error }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sat Aug 19 13:33:31 GMT 2023 - 2.2K bytes - Viewed (0)