Creates a new document within the specified collection using the provided data.
The name of the collection where the document will be created.
The data object representing the document to be created.
A promise that resolves to the created document.
Deletes a document or record from the specified collection using its unique identifier.
The name of the collection or table from which the item is to be deleted.
The unique identifier of the document or record to be deleted.
A promise that resolves to true if the deletion is successful, otherwise false.
Retrieves all records from the specified collection that match the given query.
The name of the collection to query.
The SQL or query string to execute.
Optional bindings to parameterize the query.
A promise that resolves to an array of matching records.
Finds a single record in the specified collection that matches the given query and bindings.
The name of the collection to search in.
The query string to filter the records.
Optional additional parameters to bind to the query.
A promise that resolves with the first record matching the query, or null if no match is found.
Retrieves all documents from the specified collection.
The name of the collection to retrieve documents from.
A promise that resolves to an array of documents from the collection.
Retrieves an item by its unique identifier from the specified collection.
The name of the collection from which to fetch the item.
The unique identifier of the item to retrieve. Can be a number or a string.
A promise that resolves to the item of type T if found, or rejects with an error.
Interface representing a generic data connector for performing CRUD operations and custom queries.