repo static method
Creates a Repository for $OrmMigrationRecord.
CRUD helpers for a single model type.
Reads delegate to the Query builder. Writes build MutationPlan objects
that are executed by the active driver.
Obtain a repository from DataSource.repo<T>(),
QueryContext.repository<T>(), or Model.repository<T>().
final repo = dataSource.repo<$User>();
final inserted = await repo.insert(
$UserInsertDto(email: 'john@example.com'),
);
final updated = await repo.update(
$UserUpdateDto(name: 'John'),
where: {'id': inserted.id},
);
final exists = await repo.exists(where: {'email': 'john@example.com'});
Implementation
static Repository<$OrmMigrationRecord> repo([String? connection]) =>
Model.repository<$OrmMigrationRecord>(connection: connection);