Skip to content

[FEATURE]: Database extension #94

Description

@lev2p1

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

  • I would like to implement this feature
  • I need guidance on implementation
  • I can help with testing

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions