Skip to content

feat: adopt thinclient statement_executor (libxsql v1.0.8) - #15

Merged
0xeb merged 1 commit into
mainfrom
feat/adopt-statement-executor
Jun 23, 2026
Merged

feat: adopt thinclient statement_executor (libxsql v1.0.8)#15
0xeb merged 1 commit into
mainfrom
feat/adopt-statement-executor

Conversation

@0xeb

@0xeb 0xeb commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Converges ghidrasql's HTTP query path onto the shared libxsql thinclient executor (0xeb/libxsql#6, v1.0.8).

Change

  • HttpServer::QueryFn becomes a single-statement executor (sql -> ScriptStatementResult); http.cpp sets cfg.statement_executor (with the existing health-tracking wrapper) instead of cfg.query_fn.
  • cli/main.cpp's three http.start sites wrap engine.query() per statement (was engine.execute_script + script_results_to_json).
  • Pin libxsql v1.0.7 -> v1.0.8.

Effect

The thinclient now owns multi-statement orchestration + option parsing + formatting, so ghidrasql gains working ?continue_on_error=1 / ?include_sql=1 and a round-trip-free format=.

Behavior note: statement splitting for the HTTP path moves from engine.execute_script to libxsql's run_script (collect_statements). Non-HTTP code paths are unchanged.

Tested live (against t_linux.o)

format=csv correct + text/csv; fail-fast default skips stmt 2 after an error; ?continue_on_error=1 runs stmt 2; ?include_sql=1 echoes SQL.

Switch HttpServer's QueryFn from a script->JSON callback to a single-statement
executor (sql -> ScriptStatementResult), and set cfg.statement_executor instead
of cfg.query_fn. The thinclient now owns multi-statement orchestration, option
parsing (continue_on_error/include_sql), and output formatting (no JSON
round-trip for text/csv/tsv). cli/main.cpp's three http.start sites now wrap
engine.query() per statement. Pin libxsql v1.0.7 -> v1.0.8.

Behavior note: statement splitting moves from engine.execute_script to libxsql's
run_script (collect_statements) for the HTTP path; non-HTTP paths are unchanged.
@0xeb
0xeb merged commit 2a03615 into main Jun 23, 2026
0 of 6 checks passed
@0xeb
0xeb deleted the feat/adopt-statement-executor branch June 23, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant