Feature Category
Developer experience
Problem Statement
The model does not update after a record is created in the database. The functionality of the Database class is inconvenient and limited.
Proposed Solution
Okay, for the model, within the save method, we can immediately retrieve the primary key or fully refresh the data right after saving; this needs to be implemented in the model itself. In the Database class, we need to add overloads for the queryMap and queryVector functions to make them easier to use, and these methods also need to be documented.
API Design
std::map<std::string, std::string> queryMap(const std::string& sql_template, const std::vector<std::string>& params);
//override
std::map<std::string, std::string> queryMap(const std::string& sql_template);
Alternative Solutions
There can be no alternative solution to this.
Use Case
No response
Impact and Scope
The versions will remain compatible.
Contribution
Feature Category
Developer experience
Problem Statement
The model does not update after a record is created in the database. The functionality of the
Databaseclass is inconvenient and limited.Proposed Solution
Okay, for the model, within the
savemethod, we can immediately retrieve the primary key or fully refresh the data right after saving; this needs to be implemented in the model itself. In theDatabaseclass, we need to add overloads for thequeryMapandqueryVectorfunctions to make them easier to use, and these methods also need to be documented.API Design
Alternative Solutions
There can be no alternative solution to this.
Use Case
No response
Impact and Scope
The versions will remain compatible.
Contribution