tessl install tessl/pypi-sqlmodel@0.0.0SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness.
Agent Success
Agent success rate when using this tile
85%
Improvement
Agent success rate improvement when using this tile compared to baseline
1x
Baseline
Agent success rate without this tile
85%
{
"context": "This criteria evaluates how well the engineer uses SQLModel's Field() function to properly configure database columns with constraints, validation rules, foreign keys, and default values. It focuses specifically on correct usage of Field parameters for database schema definition.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Primary Key Configuration",
"description": "Uses Field(primary_key=True) for id fields in both Product and Category models with appropriate Optional[int] type annotation and default=None",
"max_score": 10
},
{
"name": "Unique Constraints",
"description": "Uses Field(unique=True) for the sku field in Product model and name field in Category model to enforce uniqueness at database level",
"max_score": 15
},
{
"name": "String Length Constraints",
"description": "Uses Field(max_length=N) to specify maximum string lengths for sku (50), product name (200), and category name (100) fields",
"max_score": 10
},
{
"name": "Numeric Validation",
"description": "Uses Field(gt=0) or Field(ge=0) to validate price (greater than 0) and stock_quantity (greater than or equal to 0) constraints",
"max_score": 15
},
{
"name": "Decimal Precision",
"description": "Uses Field(max_digits=..., decimal_places=2) to configure price field with exactly 2 decimal places precision",
"max_score": 15
},
{
"name": "Foreign Key Definition",
"description": "Uses Field(foreign_key=\"category.id\") to define category_id as a foreign key reference to the Category table",
"max_score": 10
},
{
"name": "Cascade Deletion",
"description": "Uses Field(ondelete=\"CASCADE\") on the category_id foreign key field to enable cascade deletion when a category is deleted",
"max_score": 10
},
{
"name": "Default Values",
"description": "Uses Field(default=0) for stock_quantity and Field(default=True) for is_active to set appropriate default values",
"max_score": 10
},
{
"name": "Relationship Configuration",
"description": "Uses Relationship(back_populates=\"...\") to establish bidirectional relationship between Category and Product models with correct back_populates references",
"max_score": 5
}
]
}