LibSQL+SQLServer+SQLStudio+sql: Allocate per-statement-execution IDs

In order to execute a prepared statement multiple times, and track each
execution's results, clients will need to be provided an execution ID.
This will create a monotonically increasing ID each time a prepared
statement is executed for this purpose.
This commit is contained in:
Timothy Flynn 2022-12-02 17:14:56 -05:00 committed by Andreas Kling
parent e2f71d2808
commit aec75d749a
Notes: sideshowbarker 2024-07-17 03:40:55 +09:00
10 changed files with 66 additions and 51 deletions

View file

@ -214,13 +214,13 @@ MainWidget::MainWidget()
m_statusbar->segment(2).set_fixed_width(font().width("Ln 0000, Col 000"sv) + font().max_glyph_width());
m_sql_client = SQL::SQLClient::try_create().release_value_but_fixme_should_propagate_errors();
m_sql_client->on_execution_success = [this](auto, auto, auto, auto, auto) {
m_sql_client->on_execution_success = [this](auto, auto, auto, auto, auto, auto) {
read_next_sql_statement_of_editor();
};
m_sql_client->on_next_result = [this](auto, auto const& row) {
m_sql_client->on_next_result = [this](auto, auto, auto const& row) {
m_results.append(row);
};
m_sql_client->on_results_exhausted = [this](auto, auto) {
m_sql_client->on_results_exhausted = [this](auto, auto, auto) {
if (m_results.size() == 0)
return;
if (m_results[0].size() == 0)