Ctrl + k

or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/sqlmodel@0.0.x
tile.json

tessl/pypi-sqlmodel

tessl install tessl/pypi-sqlmodel@0.0.0

SQLModel, 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%

rubric.jsonevals/scenario-6/

{
  "context": "This evaluation assesses how well the engineer uses SQLModel's relationship definition features to build a library management system. The focus is on proper use of the Relationship() function, foreign key configuration with Field(), link models for many-to-many relationships, and cascade behavior configuration.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Relationship() Usage",
      "description": "Uses Relationship() function from SQLModel to define bidirectional relationships between models (Author.books, Book.author, Patron.borrow_records, BorrowRecord.patron, BorrowRecord.book, Book.categories, Category.books)",
      "max_score": 25
    },
    {
      "name": "back_populates Configuration",
      "description": "Correctly uses back_populates parameter in Relationship() to establish bidirectional navigation (e.g., Author.books back_populates with Book.author, Patron.borrow_records with BorrowRecord.patron, etc.)",
      "max_score": 20
    },
    {
      "name": "Foreign Key Definition",
      "description": "Uses Field() with foreign_key parameter to define foreign key relationships (author_id with foreign_key='author.id', patron_id with foreign_key='patron.id', book_id with foreign_key='book.id')",
      "max_score": 15
    },
    {
      "name": "Many-to-Many Link Model",
      "description": "Uses link_model parameter in Relationship() for the many-to-many relationship between Book and Category, referencing the BookCategory link table",
      "max_score": 15
    },
    {
      "name": "Cascade Delete Configuration",
      "description": "Configures cascade_delete=True for Patron-BorrowRecord relationship using Relationship() to ensure borrow records are deleted when patron is deleted",
      "max_score": 10
    },
    {
      "name": "SET NULL Behavior",
      "description": "Configures foreign key with ondelete='SET NULL' in Field() for Book.author_id, or uses passive_deletes=True in Relationship(), to keep books when author is deleted",
      "max_score": 10
    },
    {
      "name": "Link Table Structure",
      "description": "BookCategory link model has two foreign key fields (book_id and category_id) with both set as primary_key=True to create a composite primary key",
      "max_score": 5
    }
  ]
}