-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Description:
Currently, the QueryBuilder type requires a database connection (impl DatabaseConnection) to be provided during its construction. To improve usability and flexibility, we should refactor QueryBuilder so that the database connection is supplied at the time of query execution, rather than during initialization.
Tasks:
- Modify the QueryBuilder struct to remove the database connection from its fields.
- Update the query(...) method to accept a reference to a database connection (&impl DatabaseConnection) as a parameter.
- Ensure that the QueryBuilder remains trivially copyable and that instances can be reused without consuming the struct.
- Adjust existing code and macros that utilize QueryBuilder to align with this new design.
- Write or update unit tests to confirm that the refactored QueryBuilder behaves as expected with the deferred database connection.
Expected Outcome:
A refactored QueryBuilder that defers the database connection requirement to the query execution phase, resulting in a more flexible and reusable API.
Metadata
Metadata
Assignees
Labels
No labels