feat: adopt thinclient statement_executor (libxsql v1.0.8) - #15
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Converges ghidrasql's HTTP query path onto the shared libxsql thinclient executor (0xeb/libxsql#6, v1.0.8).
Change
HttpServer::QueryFnbecomes a single-statement executor (sql -> ScriptStatementResult);http.cppsetscfg.statement_executor(with the existing health-tracking wrapper) instead ofcfg.query_fn.cli/main.cpp's threehttp.startsites wrapengine.query()per statement (wasengine.execute_script+script_results_to_json).Effect
The thinclient now owns multi-statement orchestration + option parsing + formatting, so ghidrasql gains working
?continue_on_error=1/?include_sql=1and a round-trip-freeformat=.Behavior note: statement splitting for the HTTP path moves from
engine.execute_scriptto libxsql'srun_script(collect_statements). Non-HTTP code paths are unchanged.Tested live (against
t_linux.o)format=csvcorrect +text/csv; fail-fast default skips stmt 2 after an error;?continue_on_error=1runs stmt 2;?include_sql=1echoes SQL.