Repositories#
A Repository binds to a single SQLAlchemy model and provides typed synchronous or asynchronous methods (add, get, get_many, get_many_and_count, upsert_many, delete) for CRUD, filtering, pagination, and dialect-translated error handling.
Repository Basics
Add, fetch, update, bulk-upsert, and delete records with async or sync repositories.
Filtering & Pagination
Search text, filter by IDs or dates, and return paginated results with total counts.
Cursor Pagination
Page large or changing tables by position, with signed tokens and stable ordering.
Advanced Patterns
Work with composite primary keys, row-level locks, and bulk conditional deletes.