- Sort Score
- Result 10 results
- Languages All
Results 951 - 960 of 1,109 for Form (0.04 sec)
-
tests/table_test.go
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})
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Mar 09 09:31:28 UTC 2024 - 10.6K bytes - Viewed (0) -
model.go
package gorm import "time" // Model a basic GoLang struct which includes the following fields: ID, CreatedAt, UpdatedAt, DeletedAt // It may be embedded into your model or you may build your own model without it // // type User struct { // gorm.Model // } type Model struct { ID uint `gorm:"primarykey"` CreatedAt time.Time UpdatedAt time.Time DeletedAt DeletedAt `gorm:"index"`
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Feb 18 01:06:43 UTC 2023 - 396 bytes - Viewed (0) -
utils/utils_windows_test.go
}{ { file: `C:/Users/name/go/pkg/mod/gorm.io/gorm@v1.2.3/utils/utils.go`, want: `C:/Users/name/go/pkg/mod/gorm.io/`, }, { file: `C:/go/work/proj/gorm/utils/utils.go`, want: `C:/go/work/proj/gorm/`, }, { file: `C:/go/work/proj/gorm_alias/utils/utils.go`, want: `C:/go/work/proj/gorm_alias/`, }, { file: `C:/go/work/proj/my.gorm.io/gorm@v1.2.3/utils/utils.go`,
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Nov 21 02:48:13 UTC 2022 - 715 bytes - Viewed (0) -
schema/schema_test.go
package schema_test import ( "strings" "sync" "testing" "gorm.io/gorm" "gorm.io/gorm/schema" "gorm.io/gorm/utils/tests" ) func TestParseSchema(t *testing.T) { user, err := schema.Parse(&tests.User{}, &sync.Map{}, schema.NamingStrategy{}) if err != nil { t.Fatalf("failed to parse user, got error %v", err) } checkUserSchema(t, user) } func TestParseSchemaWithMap(t *testing.T) { type User struct {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jun 20 12:19:31 UTC 2024 - 13.3K bytes - Viewed (0) -
tests/customize_field_test.go
FieldAllowUpdate string `gorm:"<-:update"` FieldAllowSave string `gorm:"<-"` FieldAllowSave2 string `gorm:"<-:create,update"` FieldAllowSave3 string `gorm:"->:false;<-:create"` FieldReadonly string `gorm:"->"` FieldIgnore string `gorm:"-"` AutoUnixCreateTime int32 `gorm:"autocreatetime"` AutoUnixMilliCreateTime int `gorm:"autocreatetime:milli"`
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Sep 11 09:33:31 UTC 2020 - 6.9K bytes - Viewed (0) -
tests/migrate_test.go
"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) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Mar 18 11:24:16 UTC 2024 - 56.2K bytes - Viewed (0) -
migrator/migrator.go
package migrator import ( "context" "database/sql" "errors" "fmt" "reflect" "regexp" "strconv" "strings" "time" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/logger" "gorm.io/gorm/schema" ) // This regular expression seeks to find a sequence of digits (\d+) among zero or more non-digit characters (\D*), // with a possible trailing non-digit character (\D?).
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Apr 26 07:15:49 UTC 2024 - 29K bytes - Viewed (0) -
tests/prepared_stmt_test.go
package tests_test import ( "context" "errors" "sync" "sync/atomic" "testing" "time" "gorm.io/gorm" . "gorm.io/gorm/utils/tests" ) func TestPreparedStmt(t *testing.T) { tx := DB.Session(&gorm.Session{PrepareStmt: true}) if _, ok := tx.ConnPool.(*gorm.PreparedStmtDB); !ok { t.Fatalf("should assign PreparedStatement Manager back to database when using PrepareStmt mode") }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:02:05 UTC 2024 - 8.5K bytes - Viewed (0) -
tests/go.mod
module gorm.io/gorm/tests go 1.18 require ( github.com/google/uuid v1.6.0 github.com/jinzhu/now v1.1.5 github.com/lib/pq v1.10.9 github.com/stretchr/testify v1.9.0 gorm.io/driver/mysql v1.5.7 gorm.io/driver/postgres v1.5.9 gorm.io/driver/sqlite v1.5.6 gorm.io/driver/sqlserver v1.5.3 gorm.io/gorm v1.25.12 ) require ( filippo.io/edwards25519 v1.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Sep 18 12:03:35 UTC 2024 - 1.3K bytes - Viewed (0) -
tests/update_many2many_test.go
package tests_test import ( "testing" "gorm.io/gorm" . "gorm.io/gorm/utils/tests" ) func TestUpdateMany2ManyAssociations(t *testing.T) { user := *GetUser("update-many2many", Config{}) if err := DB.Create(&user).Error; err != nil { t.Fatalf("errors happened when create: %v", err) } user.Languages = []Language{{Code: "zh-CN", Name: "Chinese"}, {Code: "en", Name: "English"}} for _, lang := range user.Languages {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jan 06 07:02:53 UTC 2022 - 1.3K bytes - Viewed (0)