The data source that this repository is connected to.
Creates a new entity from the given data.
The create data.
Optionaloptions: CreateOptionsAdditional options, like a transaction etc.
The newly created entity.
Creates all entities from the provided data array.
An array of create data, which each creates a new entity.
Optionaloptions: CreateAllOptionsAdditional options, eg. A transaction.
All newly created entities.
Deletes all entities that match the provided where filter.
The where filter to find the entities that should be deleted.
Optionaloptions: SoftDeleteAllOptionsAdditional options, like a transaction.
An array of all the deleted entities.
Deletes an entity with the provided id.
The id of the entity to deleted.
Optionaloptions: SoftDeleteByIdOptionsAdditional options, like a transaction.
The deleted entity.
Finds all entities with the given options.
Optionaloptions: SoftDeleteFindAllOptions<T>The options, including the where filter etc.
An array of found entities.
Finds all entities with the given options, in paginated form.
The page for which the entities should be found.
The limit of entities to receive for that page.
Optionaloptions: SoftDeleteFindAllPaginatedOptions<T>Additional options including where filter etc.
A paginated result of the found entities.
Finds an entity by the given id.
The id of the entity to find.
Optionaloptions: SoftDeleteFindByIdOptions<T>Additional options, eg. Transaction.
The found entity.
Finds a single entity with the given options.
The options, including the where filter etc.
Optionalrequired: BWhether or not a result is required. Defaults to true.
The found result. If required is set to false, also undefined.
Resets the changes of a single change set on the given entity to the state before the change set. This DOES preserve any changes that happened after the change set. The given change set gets deleted afterwards.
The entity that should be reset.
The id of the changeSet to reset.
Whether or not a change set should be created.
Whether or not create change sets should be preserved. In that case the entity gets reset to the state after the create change set. Also, the change set isn't deleted.
Optionaloptions: BaseRepositoryOptionsAdditional options, eg. Transaction.
The updated entity.
Resets the changes of a single change set on the entity with the given id to the state before the oldest change set. This DOES preserve any changes that happened after the change set. The given change set gets deleted afterwards.
The id of the entity that should be reset.
The id of the changeSet to reset.
Whether or not a change set should be created.
Whether or not create change sets should be preserved. In that case the entity gets reset to the state after the create change set. Also, the create change set isn't deleted.
Optionaloptions: BaseRepositoryOptionsAdditional options, eg. Transaction.
The updated entity.
Rolls back all changes on the entities found with the given where filter to the state of the given timestamp. This DOES NOT preserve any changes that happened after the timestamp. Any change sets after the given timestamp will be deleted in the end.
The timestamp to which the rollback should happen with nanosecond precision.
Optionalwhere: Where<T>A filter to only rollback some entities.
Whether or not a change set should be created.
Whether or not create change sets should be preserved. In that case the entity gets reset to the state after the create change set. Also, the create change set isn't deleted.
Optionaloptions: BaseRepositoryOptionsAdditional options, eg. Transaction.
The updated entity.
Rolls back all changes on the given entity that have happened since the given change set. This DOES NOT preserve any changes that happened after the change set. The given change set and any change sets after that will be deleted in the end. Calls rollbackToTimestamp on the change set timestamp internally.
The entity to rollback.
The id of the changeSet to rollback to.
Whether or not a change set should be created.
Whether or not create change sets should be preserved. In that case the entity gets reset to the state after the create change set. Also, the create change set isn't deleted.
Optionaloptions: BaseRepositoryOptionsAdditional options, eg. Transaction.
The updated entity.
Rolls back all changes on the entity with the given id that have happened since the given change set. This DOES NOT preserve any changes that happened after the change set. The given change set and any change sets after that will be deleted in the end. Calls rollbackToTimestampById on the change set timestamp internally.
The id of the entity to rollback.
The id of the changeSet to rollback to.
Whether or not a change set should be created.
Whether or not create change sets should be preserved. In that case the entity gets reset to the state after the create change set. Also, the create change set isn't deleted.
Optionaloptions: BaseRepositoryOptionsAdditional options, eg. Transaction.
The updated entity.
Rolls back all changes on the given entity that have happened since the given timestamp. This DOES NOT preserve any changes that happened after the timestamp. Any change sets after the given timestamp will be deleted in the end.
The entity to rollback.
The timestamp to which the rollback should happen with nanosecond precision.
Whether or not a change set should be created.
Whether or not create change sets should be preserved. In that case the entity gets reset to the state after the create change set. Also, the create change set isn't deleted.
Optionaloptions: BaseRepositoryOptionsAdditional options, eg. Transaction.
The updated entity.
Rolls back all changes on the entity with the given id that have happened since the given timestamp. This DOES NOT preserve any changes that happened after the timestamp. Any change sets after the given timestamp will be deleted in the end.
The id of the entity to rollback.
The timestamp to which the rollback should happen with nanosecond precision.
Whether or not a change set should be created.
Whether or not create change sets should be preserved. In that case the entity gets reset to the state after the create change set. Also, the create change set isn't deleted.
Optionaloptions: BaseRepositoryOptionsAdditional options, eg. Transaction.
The updated entity.
Updates all entities that match the provided where filter.
The where filter to find the entities that should be updated.
The data to update the entities with.
Optionaloptions: SoftDeleteUpdateAllOptionsAdditional options, like a transaction.
An array of all the updated entities.
Updates all entities that match the provided where filter.
The where filter to find the entities that should be updated.
The data to update the entities with.
Optionaloptions: BaseRepositoryOptionsAdditional options, like a transaction.
An array of all the updated entities.
Updates an entity with the provided id.
The id of the entity to update.
The data to update the entity with.
Optionaloptions: SoftDeleteUpdateByIdOptionsAdditional options, like a transaction.
The updated entity.
Update an entity by id with property/value pairs in the data object.
Value for the entity id.
Data attributes to be updated.
Optionaloptions: SoftDeleteUpdateByIdOptionsOptions for the operations.
A promise that will be resolve if the operation succeeded or will be rejected if the entity was not found.
A base crud repository that automatically handles creation of change sets and offers the option to "soft" delete entities (Meaning they are flagged as deleted but still kept for restoration).