- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for geturl (0.2 sec)
-
callbacks.go
} func (cs *callbacks) Create() *processor { return cs.processors["create"] } func (cs *callbacks) Query() *processor { return cs.processors["query"] } func (cs *callbacks) Update() *processor { return cs.processors["update"] } func (cs *callbacks) Delete() *processor { return cs.processors["delete"] } func (cs *callbacks) Row() *processor { return cs.processors["row"] }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 26 03:33:36 GMT 2024 - 8.6K bytes - Viewed (1) -
schema/serializer.go
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 18 08:28:46 GMT 2024 - 4.6K bytes - Viewed (0) -
schema/constraint.go
checks[name] = CheckConstraint{Name: name, Constraint: chk, Field: field} } } } return checks } type UniqueConstraint struct { Name string Field *Field } func (uni *UniqueConstraint) GetName() string { return uni.Name } func (uni *UniqueConstraint) Build() (sql string, vars []interface{}) { return "CONSTRAINT ? UNIQUE (?)", []interface{}{clause.Column{Name: uni.Name}, clause.Column{Name: uni.Field.DBName}}
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 18 07:33:54 GMT 2024 - 1.9K bytes - Viewed (0) -
tests/prepared_stmt_test.go
} func TestPreparedStmtInTransaction(t *testing.T) { user := User{Name: "jinzhu"} if err := DB.Transaction(func(tx *gorm.DB) error { tx.Session(&gorm.Session{PrepareStmt: true}).Create(&user) return errors.New("test") }); err == nil { t.Error(err) } var result User if err := DB.First(&result, user.ID).Error; err == nil { t.Errorf("Failed, got error: %v", err) } }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Mar 21 07:55:43 GMT 2024 - 4K bytes - Viewed (0) -
scan.go
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Apr 26 09:53:11 GMT 2024 - 9.8K bytes - Viewed (0) -
schema/relationship_test.go
}) } type Author struct { gorm.Model } type Book struct { gorm.Model Author Author AuthorID uint } func (Book) TableName() string { return "my_schema.a_very_very_very_very_very_very_very_very_long_table_name" } func TestParseConstraintNameWithSchemaQualifiedLongTableName(t *testing.T) { s, err := schema.Parse( &Book{}, &sync.Map{},
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Apr 15 03:20:20 GMT 2024 - 25.5K bytes - Viewed (0) -
tests/create_test.go
func TestCreateWithNowFuncOverride(t *testing.T) { user := User{Name: "CreateUserTimestampOverride"} curTime := now.MustParse("2016-01-01") NEW := DB.Session(&gorm.Session{ NowFunc: func() time.Time { return curTime }, }) NEW.Save(&user) AssertEqual(t, user.CreatedAt, curTime) AssertEqual(t, user.UpdatedAt, curTime) var newUser User NEW.First(&newUser, user.ID)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 19 03:50:28 GMT 2024 - 26.4K bytes - Viewed (0) -
callbacks/create.go
called = true db.AddError(i.BeforeCreate(tx)) } } return called }) } } // Create create hook func Create(config *Config) func(db *gorm.DB) { supportReturning := utils.Contains(config.CreateClauses, "RETURNING") return func(db *gorm.DB) { if db.Error != nil { return } if db.Statement.Schema != nil { if !db.Statement.Unscoped {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Apr 08 03:29:55 GMT 2024 - 12.5K bytes - Viewed (0) -
tests/table_test.go
} func (UserWithTableNamer) TableName(namer schema.Namer) string { return namer.TableName("user") } func TestTableWithNamer(t *testing.T) { db, _ := gorm.Open(tests.DummyDialector{}, &gorm.Config{ NamingStrategy: schema.NamingStrategy{ TablePrefix: "t_", }, }) sql := db.ToSQL(func(tx *gorm.DB) *gorm.DB { return tx.Model(&UserWithTableNamer{}).Find(&UserWithTableNamer{}) })
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) -
logger/sql_test.go
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 } func (s ExampleStruct) Value() (driver.Value, error) { return json.Marshal(s) } func format(v []byte, escaper string) string { return escaper + strings.ReplaceAll(string(v), escaper, escaper+escaper) + escaper }
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)