- Sort Score
- Num 10 results
- Language All
Results 51 - 60 of 118 for GORM (0.02 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
schema/relationship_test.go
package schema_test import ( "sync" "testing" "time" "gorm.io/gorm" "gorm.io/gorm/schema" "gorm.io/gorm/utils/tests" ) func checkStructRelation(t *testing.T, data interface{}, relations ...Relation) { if s, err := schema.Parse(data, &sync.Map{}, schema.NamingStrategy{}); err != nil { t.Errorf("Failed to parse schema, got error %v", err) } else { for _, rel := range relations { checkSchemaRelation(t, s, rel) }
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Mon Aug 18 11:44:52 GMT 2025 - 26.5K bytes - Click Count (0) -
logger/slog_test.go
return "select count(*) from users", 0 }, nil) if strings.Contains(buf.String(), "gorm/logger/slog.go") { t.Error("Found internal slog.go reference in caller frame. Expected only test file references.") } if !strings.Contains(buf.String(), "gorm/logger/slog_test.go") { t.Error("Missing expected test file reference. 'gorm/logger/slog_test.go' should appear in caller frames.") }
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Thu Oct 30 10:56:26 GMT 2025 - 782 bytes - Click Count (0) -
tests/submodel_test.go
package tests_test import ( "testing" "gorm.io/gorm" ) type Man struct { ID int Age int Name string Detail string } // Panic-safe BeforeUpdate hook that checks for Changed("age") func (m *Man) BeforeUpdate(tx *gorm.DB) (err error) { if !tx.Statement.Changed("age") { return nil } return nil } func TestSubModel(t *testing.T) { man := Man{Age: 18, Name: "random-name"}
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Mon Sep 08 09:19:22 GMT 2025 - 947 bytes - Click Count (0) -
schema/utils.go
package schema import ( "context" "fmt" "reflect" "regexp" "strings" "gorm.io/gorm/clause" "gorm.io/gorm/utils" ) var embeddedCacheKey = "embedded_cache_store" func ParseTagSetting(str string, sep string) map[string]string { settings := map[string]string{} names := strings.Split(str, sep) var parsedNames []string for i := 0; i < len(names); i++ { s := names[i]
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Thu Oct 30 11:15:36 GMT 2025 - 5.9K bytes - Click Count (0) -
tests/migrate_test.go
"math/rand" "reflect" "strconv" "strings" "testing" "time" "github.com/stretchr/testify/assert" "gorm.io/driver/gaussdb" "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/migrator" "gorm.io/gorm/schema" "gorm.io/gorm/utils" . "gorm.io/gorm/utils/tests" ) func TestMigrate(t *testing.T) {
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Wed Aug 20 04:51:17 GMT 2025 - 65.2K bytes - Click Count (0) -
utils/tests/dummy_dialecter.go
package tests import ( "gorm.io/gorm" "gorm.io/gorm/callbacks" "gorm.io/gorm/clause" "gorm.io/gorm/logger" "gorm.io/gorm/schema" ) type DummyDialector struct { TranslatedErr error } func (DummyDialector) Name() string { return "dummy" } func (DummyDialector) Initialize(db *gorm.DB) error { callbacks.RegisterDefaultCallbacks(db, &callbacks.Config{Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Mon Mar 06 06:03:31 GMT 2023 - 2.2K bytes - Click Count (0) -
schema/model_test.go
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 Team []*User `gorm:"foreignkey:ManagerID"`
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 1.1K bytes - Click Count (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"`
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Fri Sep 11 09:33:31 GMT 2020 - 6.9K bytes - Click Count (0) -
clause/clause_test.go
package clause_test import ( "reflect" "strings" "sync" "testing" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/schema" "gorm.io/gorm/utils/tests" ) var db, _ = gorm.Open(tests.DummyDialector{}, nil) func checkBuildClauses(t *testing.T, clauses []clause.Interface, result string, vars []interface{}) { var ( buildNames []string buildNamesMap = map[string]bool{}
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Tue Jun 02 02:50:38 GMT 2020 - 1012 bytes - Click Count (0) -
.github/labels.json
"colour": "#43952A", "description": "feature request" }, "invalid_question": { "name": "type:invalid question", "colour": "#CF2E1F", "description": "invalid question (not related to GORM or described in document or not enough information provided)" }, "with_playground": { "name": "type:with reproduction steps", "colour": "#00ff00", "description": "with reproduction steps" },
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Mon Oct 19 03:49:03 GMT 2020 - 3.8K bytes - Click Count (0)