Deletes an item from the collection identified by the given ID.
The unique identifier of the item to be deleted. Can be a number or a string.
A promise that resolves to true
if the deletion was successful, or false
otherwise.
Fetches all data entries from the collection that match the given query. Allows optional skipping of data sanitization.
The query string used to match entries in the collection.
An array of bindings to parameterize the query.
Optional
skipSanitization: boolean = falseDetermines whether to skip sanitization of the results.
A promise that resolves to an array of matching entries.
Finds a single record from the collection based on the provided query and bindings.
The query string used to locate the record in the collection.
An array of bindings to parameterize the query.
Optional
skipSanitization: boolean = falseIf true, skips sanitization of the returned data.
A promise that resolves to the found record. If no record is found, the promise resolves to undefined.
Retrieves all items from the collection and optionally applies sanitization.
Optional
skipSanitization: boolean = falseIf true, sanitization will be skipped; otherwise, all items will be sanitized.
A promise that resolves to an array of items, optionally sanitized.
Retrieves an entity by its unique identifier.
The unique identifier of the entity to retrieve.
Optional
skipSanitization: boolean = falseIf true, skips the sanitization of the retrieved data.
A promise that resolves to the retrieved entity.
Performs cleanup and de-initialization tasks when the component or service is being destroyed. Typically used to unsubscribe from observables, detach event listeners, or release resources to prevent memory leaks.
No return value.
Abstract class representing a generic data service with CRUD operations and sanitization capabilities.