- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for Models (0.23 sec)
-
utils/tests/models.go
Active bool } type Account struct { gorm.Model UserID sql.NullInt64 Number string } type Pet struct { gorm.Model UserID *uint Name string Toy Toy `gorm:"polymorphic:Owner;"` } type Toy struct { gorm.Model Name string OwnerID string OwnerType string } type Tools struct { gorm.Model Name string CustomID string Type string }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Dec 15 08:36:08 GMT 2023 - 2.1K bytes - Viewed (0) -
tests/query_test.go
}) } } }) var models []User if err := DB.Where("name in (?)", []string{"find"}).Find(&models).Error; err != nil || len(models) != 3 { t.Errorf("errors happened when query find with in clause: %v, length: %v", err, len(models)) } else { for idx, user := range users { t.Run("FindWithInClause#"+strconv.Itoa(idx+1), func(t *testing.T) { CheckUser(t, models[idx], user) }) } }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Apr 25 12:22:53 GMT 2024 - 49.8K bytes - Viewed (0) -
internal/dsync/dsync_test.go
) // TestMain initializes the testing framework func TestMain(m *testing.M) { startLockServers() // Initialize locker clients for dsync. var clnts []NetLocker for i := 0; i < len(nodes); i++ { clnts = append(clnts, newClient(nodes[i].URL)) } ds = &Dsync{ GetLockers: func() ([]NetLocker, string) { return clnts, uuid.New().String() }, Timeouts: Timeouts{ Acquire: testDrwMutexAcquireTimeout,
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sat Dec 24 03:49:07 GMT 2022 - 11K bytes - Viewed (0) -
migrator.go
// apply scopes to migrator for len(tx.Statement.scopes) > 0 { tx = tx.executeScopes() } return tx.Dialector.Migrator(tx.Session(&Session{})) } // AutoMigrate run auto migration for given models func (db *DB) AutoMigrate(dst ...interface{}) error { return db.Migrator().AutoMigrate(dst...) } // ViewOption view option type ViewOption struct {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Oct 30 09:15:49 GMT 2023 - 3.1K bytes - Viewed (0) -
istioctl/pkg/kubeinject/kubeinject.go
r.AddKnownTypes(admissionv1beta1.SchemeGroupVersion, &admissionv1beta1.AdmissionReview{}) r.AddKnownTypes(admission.SchemeGroupVersion, &admission.AdmissionReview{}) return r }() codecs = serializer.NewCodecFactory(runtimeScheme) deserializer = codecs.UniversalDeserializer() ) // GetFirstPod returns a pod matching the namespace and label selector // and the number of all pods that match the label selector.
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Fri Mar 29 02:29:02 GMT 2024 - 21.6K bytes - Viewed (0) -
migrator/migrator.go
// // // CREATE VIEW `user_view` AS SELECT * FROM `users` WHERE age > 20 // q := DB.Model(&User{}).Where("age > ?", 20) // DB.Debug().Migrator().CreateView("user_view", gorm.ViewOption{Query: q}) // // // CREATE OR REPLACE VIEW `users_view` AS SELECT * FROM `users` WITH CHECK OPTION // q := DB.Model(&User{})
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Apr 26 07:15:49 GMT 2024 - 29K bytes - Viewed (0) -
schema/model_test.go
package schema_test import ( "database/sql" "time" "gorm.io/gorm" "gorm.io/gorm/utils/tests" ) type User struct { *gorm.Model Name *string Age *uint Birthday *time.Time Account *tests.Account Pets []*tests.Pet Toys []*tests.Toy `gorm:"polymorphic:Owner"` CompanyID *int Company *tests.Company ManagerID *uint Manager *User
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 1.1K bytes - Viewed (0) -
src/cmd/cgo/gcc.go
} needType := p.guessKinds(f) if len(needType) > 0 { p.loadDWARF(f, &conv, needType) } // In godefs mode we're OK with the typedefs, which // will presumably also be defined in the file, we // don't want to resolve them to their base types. if *godefs { break } } p.prepareNames(f) if p.rewriteCalls(f) { // Add `import _cgo_unsafe "unsafe"` after the package statement.
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Nov 02 16:43:23 GMT 2023 - 97K bytes - Viewed (0) -
src/cmd/cgo/ast.go
// and on exported functions, and we use ast2 for translating // and reprinting. // In cgo mode, we ignore ast2 and just apply edits directly // the text behind ast1. In godefs mode we modify and print ast2. ast1 := parse(abspath, src, parser.SkipObjectResolution|parser.ParseComments) ast2 := parse(abspath, src, parser.SkipObjectResolution) f.Package = ast1.Name.Name
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Jun 07 16:54:27 GMT 2023 - 14.3K bytes - Viewed (0) -
src/cmd/cgo/doc.go
-gccgopkgpath path The -fgo-pkgpath option to be used with gccgo. -gccgo_define_cgoincomplete Define cgo.Incomplete locally rather than importing it from the "runtime/cgo" package. Used for old gccgo versions. -godefs Write out input file in Go syntax replacing C package names with real values. Used to generate files in the syscall package when bootstrapping a new target. -objdir directory
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Sun Mar 31 09:02:45 GMT 2024 - 42.1K bytes - Viewed (0)