- Sort Score
- Result 10 results
- Languages All
Results 341 - 350 of 1,013 for schemat (0.14 sec)
-
callbacks/update.go
for _, field := range stmt.Schema.PrimaryFields { _, isZero = field.ValueOf(stmt.Context, stmt.ReflectValue.Index(i)) if !isZero { break } } } if !isZero { _, primaryValues := schema.GetIdentityFieldValuesMap(stmt.Context, stmt.ReflectValue, stmt.Schema.PrimaryFields) column, values := schema.ToQueryValues("", stmt.Schema.PrimaryFieldDBNames, primaryValues)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Mar 18 05:44:55 UTC 2024 - 9.4K bytes - Viewed (0) -
callbacks/create.go
"gorm.io/gorm/clause" "gorm.io/gorm/schema" "gorm.io/gorm/utils" ) // BeforeCreate before create hooks func BeforeCreate(db *gorm.DB) { if db.Error == nil && db.Statement.Schema != nil && !db.Statement.SkipHooks && (db.Statement.Schema.BeforeSave || db.Statement.Schema.BeforeCreate) { callMethod(db, func(value interface{}, tx *gorm.DB) (called bool) { if db.Statement.Schema.BeforeSave {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Apr 08 03:29:55 UTC 2024 - 12.5K bytes - Viewed (0) -
migrator/migrator.go
for _, rel := range dep.Schema.Relationships.Relations { if rel.Field.IgnoreMigration { continue } if c := rel.ParseConstraint(); c != nil && c.Schema == dep.Statement.Schema && c.Schema != c.ReferenceSchema { dep.Depends = append(dep.Depends, c.ReferenceSchema) } if rel.Type == schema.HasOne || rel.Type == schema.HasMany { beDependedOn[rel.FieldSchema] = true }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Apr 26 07:15:49 UTC 2024 - 29K bytes - Viewed (0) -
schema/constraint.go
} // ParseUniqueConstraints parse schema unique constraints func (schema *Schema) ParseUniqueConstraints() map[string]UniqueConstraint { uniques := make(map[string]UniqueConstraint) for _, field := range schema.Fields { if field.Unique { name := schema.namer.UniqueName(schema.Table, field.DBName) uniques[name] = UniqueConstraint{Name: name, Field: field} } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Mar 18 07:33:54 UTC 2024 - 1.9K bytes - Viewed (0) -
callbacks/preload.go
package callbacks import ( "fmt" "reflect" "sort" "strings" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/schema" "gorm.io/gorm/utils" ) // parsePreloadMap extracts nested preloads. e.g. // // // schema has a "k0" relation and a "k7.k8" embedded relation // parsePreloadMap(schema, map[string][]interface{}{ // clause.Associations: {"arg1"}, // "k1": {"arg2"}, // "k2.k3": {"arg3"},
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:52:33 UTC 2024 - 11.6K bytes - Viewed (0) -
schema/index.go
Length int priority int } // ParseIndexes parse schema indexes func (schema *Schema) ParseIndexes() map[string]Index { indexes := map[string]Index{} for _, field := range schema.Fields { if field.TagSettings["INDEX"] != "" || field.TagSettings["UNIQUEINDEX"] != "" { fieldIndexes, err := parseFieldIndexes(field) if err != nil { schema.err = err break } for _, index := range fieldIndexes {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sun Feb 04 07:49:19 UTC 2024 - 3.7K bytes - Viewed (0) -
schema/constraint_test.go
Name2 string `gorm:"uniqueIndex"` } user, err := schema.Parse(&UserUnique{}, &sync.Map{}, schema.NamingStrategy{}) if err != nil { t.Fatalf("failed to parse user unique, got error %v", err) } constraints := user.ParseUniqueConstraints() results := map[string]schema.UniqueConstraint{ "uni_user_uniques_name1": { Name: "uni_user_uniques_name1", Field: &schema.Field{Name: "Name1", Unique: true}, }, }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sun Feb 04 07:49:19 UTC 2024 - 2.2K bytes - Viewed (0) -
schema/schema_helper_test.go
if r.Name != relation.Name { t.Errorf("schema %v relation name expects %v, but got %v", s, r.Name, relation.Name) } if r.Type != relation.Type { t.Errorf("schema %v relation name expects %v, but got %v", s, r.Type, relation.Type) } if r.Schema.Name != relation.Schema { t.Errorf("schema %v relation's schema expects %v, but got %v", s, relation.Schema, r.Schema.Name) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Dec 15 08:31:23 UTC 2023 - 7.5K bytes - Viewed (0) -
scan.go
import ( "database/sql" "database/sql/driver" "reflect" "time" "gorm.io/gorm/schema" "gorm.io/gorm/utils" ) // prepareValues prepare values slice func prepareValues(values []interface{}, db *DB, columnTypes []*sql.ColumnType, columns []string) { if db.Statement.Schema != nil { for idx, name := range columns { if field := db.Statement.Schema.LookUpField(name); field != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 10.1K bytes - Viewed (0) -
docs/fr/docs/advanced/path-operation-advanced-configuration.md
Ainsi, vous pouvez ajouter des données supplémentaires au schéma généré automatiquement. Par exemple, vous pouvez décider de lire et de valider la requête avec votre propre code, sans utiliser les fonctionnalités automatiques de validation proposée par Pydantic, mais vous pouvez toujours définir la requête dans le schéma OpenAPI. Vous pouvez le faire avec `openapi_extra` :
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8K bytes - Viewed (0)