- Sort Score
- Result 10 results
- Languages All
Results 611 - 620 of 1,053 for scheme (0.06 sec)
-
docs/zh/docs/tutorial/sql-databases.md
## 创建 Pydantic 模型 现在让我们查看一下文件`sql_app/schemas.py`。 /// tip 为了避免 SQLAlchemy*模型*和 Pydantic*模型*之间的混淆,我们将有`models.py`(SQLAlchemy 模型的文件)和`schemas.py`( Pydantic 模型的文件)。 这些 Pydantic 模型或多或少地定义了一个“schema”(一个有效的数据形状)。 因此,这将帮助我们在使用两者时避免混淆。 /// ### 创建初始 Pydantic*模型*/模式 创建一个`ItemBase`和`UserBase`Pydantic*模型*(或者我们说“schema”),他们拥有创建或读取数据时具有的共同属性。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 27.1K 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) -
association.go
} } switch rel.Type { case schema.BelongsTo: associationDB := association.DB.Session(&Session{}) tx := associationDB.Model(reflect.New(rel.Schema.ModelType).Interface()) _, pvs := schema.GetIdentityFieldValuesMap(association.DB.Statement.Context, reflectValue, rel.Schema.PrimaryFields) if pcolumn, pvalues := schema.ToQueryValues(rel.Schema.Table, rel.Schema.PrimaryFieldDBNames, pvs); len(pvalues) > 0 {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 21.5K bytes - Viewed (0) -
schema/field_test.go
} func TestParseFieldWithPermission(t *testing.T) { user, err := schema.Parse(&UserWithPermissionControl{}, &sync.Map{}, schema.NamingStrategy{}) if err != nil { t.Fatalf("Failed to parse user with permission, got error %v", err) } fields := []*schema.Field{
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Feb 19 09:02:53 UTC 2022 - 12.7K bytes - Viewed (0) -
soft_delete.go
stmt.SetColumn(sd.Field.DBName, curTime, true) if stmt.Schema != nil { _, queryValues := schema.GetIdentityFieldValuesMap(stmt.Context, stmt.ReflectValue, stmt.Schema.PrimaryFields) column, values := schema.ToQueryValues(stmt.Table, stmt.Schema.PrimaryFieldDBNames, queryValues) if len(values) > 0 {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Feb 01 06:40:55 UTC 2023 - 4.5K bytes - Viewed (1) -
fastapi/param_functions.py
OpenAPI-specific examples than the JSON Schema `examples`, that's the main use case for this. Read more about it in the [FastAPI docs for Declare Request Example Data](https://fastapi.tiangolo.com/tutorial/schema-extra-example/#using-the-openapi_examples-parameter). """ ), ] = None,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 23 18:30:18 UTC 2024 - 62.5K bytes - Viewed (0) -
tests/serializer_test.go
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Apr 21 14:09:38 UTC 2023 - 7.6K bytes - Viewed (0)