Skip to content

[FEATURE]: Database extension #19

Closed

Description

@NikSimDev

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.

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

Activity

  1. self-assigned this
    on Oct 11, 2026
  2. linked a pull request that will close this issuefix: added default value for params #23on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions