- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 70 for tool (0.24 sec)
-
schema/pool.go
package schema import ( "reflect" "sync" ) // sync pools var ( normalPool sync.Map poolInitializer = func(reflectType reflect.Type) FieldNewValuePool { v, _ := normalPool.LoadOrStore(reflectType, &sync.Pool{ New: func() interface{} { return reflect.New(reflectType).Interface() }, }) return v.(FieldNewValuePool) }
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Apr 11 13:37:44 UTC 2022 - 345 bytes - Viewed (0) -
gorm.go
type Session struct { DryRun bool PrepareStmt bool NewDB bool Initialized bool SkipHooks bool SkipDefaultTransaction bool DisableNestedTransaction bool AllowGlobalUpdate bool FullSaveAssociations bool QueryFields bool Context context.Context
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Sun Aug 20 11:46:56 UTC 2023 - 11.6K bytes - Viewed (0) -
migrator.go
ColumnType() (columnType string, ok bool) // varchar(64) PrimaryKey() (isPrimaryKey bool, ok bool) AutoIncrement() (isAutoIncrement bool, ok bool) Length() (length int64, ok bool) DecimalSize() (precision int64, scale int64, ok bool) Nullable() (nullable bool, ok bool) Unique() (unique bool, ok bool) ScanType() reflect.Type Comment() (value string, ok bool) DefaultValue() (value string, ok bool) }
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Oct 30 09:15:49 UTC 2023 - 3.1K bytes - Viewed (0) -
callbacks/callbacks.go
deleteClauses = []string{"DELETE", "FROM", "WHERE"} ) type Config struct { LastInsertIDReversed bool CreateClauses []string QueryClauses []string UpdateClauses []string DeleteClauses []string } func RegisterDefaultCallbacks(db *gorm.DB, config *Config) { enableTransaction := func(db *gorm.DB) bool { return !db.SkipDefaultTransaction } if len(config.CreateClauses) == 0 {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Wed Oct 27 23:56:55 UTC 2021 - 3.3K bytes - Viewed (0) -
tests/error_translator_test.go
Name string `gorm:"unique"` } db, err := OpenTestConnection(&gorm.Config{TranslateError: true}) if err != nil { t.Fatalf("failed to connect database, got error %v", err) } dialectors := map[string]bool{"sqlite": true, "postgres": true, "mysql": true, "sqlserver": true} if supported, found := dialectors[db.Dialector.Name()]; !(found && supported) { return } DB.Migrator().DropTable(&City{})
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Wed Jul 12 13:21:22 UTC 2023 - 3.1K bytes - Viewed (0) -
callbacks/delete.go
"gorm.io/gorm/utils" ) func BeforeDelete(db *gorm.DB) { if db.Error == nil && db.Statement.Schema != nil && !db.Statement.SkipHooks && db.Statement.Schema.BeforeDelete { callMethod(db, func(value interface{}, tx *gorm.DB) bool { if i, ok := value.(BeforeDeleteInterface); ok { db.AddError(i.BeforeDelete(tx)) return true } return false }) } } func DeleteBeforeAssociations(db *gorm.DB) {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Feb 25 02:48:23 UTC 2022 - 5.6K bytes - Viewed (0) -
finisher_api.go
} Scan(rows, tx, ScanInitialized) return tx.Error } // Connection uses a db connection to execute an arbitrary number of commands in fc. When finished, the connection is // returned to the connection pool. func (db *DB) Connection(fc func(tx *DB) error) (err error) { if db.Error != nil { return db.Error } tx := db.getInstance() sqlDB, err := tx.DB() if err != nil { return }
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Jan 12 08:42:21 UTC 2024 - 22.7K bytes - Viewed (0) -
callbacks/query.go
} } specifiedRelationsName := make(map[string]interface{}) for _, join := range db.Statement.Joins { if db.Statement.Schema != nil { var isRelations bool // is relations or raw sql var relations []*schema.Relationship relation, ok := db.Statement.Schema.Relationships.Relations[join.Name] if ok { isRelations = true
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Wed Jun 12 09:51:44 UTC 2024 - 10.1K bytes - Viewed (0) -
schema/relationship.go
type Polymorphic struct { PolymorphicID *Field PolymorphicType *Field Value string } type Reference struct { PrimaryKey *Field PrimaryValue string ForeignKey *Field OwnPrimaryKey bool } func (schema *Schema) parseRelation(field *Field) *Relationship { var ( err error fieldValue = reflect.New(field.IndirectFieldType).Interface() relation = &Relationship{
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Wed Jun 12 03:46:59 UTC 2024 - 22.7K bytes - Viewed (0) -
tests/preload_test.go
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Wed Jun 12 10:00:47 UTC 2024 - 15.9K bytes - Viewed (0)