Shared repository implementation that normalizes options and delegates
data operations to a DataSource.
Subclassing is intentional here: adapter-specific repositories extend
this class and provide their own DataSource wire-up.
BaseRepository(_dataSource: DataSource)
Creates a new repository instance.
_dataSource: DataSource
count(options?: CountOptions): Promise<number>
Count entities with optional filtering.
Check whether an entity with the given primary key exists.
findAll(options?: FindOptions): Promise<Entity[]>
Fetch entities with optional filtering, sorting, and pagination.
findOne(options?: FindOptions): Promise<Entity | null>
Find the first entity that matches the supplied query options.
findPage(options: PageOptions): Promise<Page<Entity>>
Find a page of entities by cursor pagination.
Refuses by name with UnsupportedQueryFeatureError when the
bound data source does not expose a findPage member — which is true for
every shipped adapter until the milestone that implements cursor paging
on that backend. Absence means "cannot page by cursor", never "there are
no more rows".
Cast a raw row to the typed Entity.