-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Description
Description:
To enhance the modularity and testability of our SQL generation process, we need to develop a concrete type named InsertQueryBuilder. This type will be responsible for constructing SQL INSERT statements, providing a structured and reusable approach to handle insert operations.
Tasks:
Design the InsertQueryBuilder struct with fields to capture necessary components of an INSERT statement, such as table name, columns, and values.
Implement methods for:
- Specifying the target table.
- Adding columns and corresponding values.
- Building the final SQL INSERT statement as a string.
- Ensure that the InsertQueryBuilder integrates seamlessly with the existing QueryBuilder infrastructure.
- Write unit tests to validate the correctness of the InsertQueryBuilder functionality.
Expected Outcome:
A fully functional InsertQueryBuilder that allows for the programmatic construction of SQL INSERT statements, improving code maintainability and enabling easier testing of insert operations.