13 if (0 == strcmp(inbuf->
buffer,
".exit")) {
17 return META_COMMAND_UNRECOGNISED_CMD;
24 if (0 == strncmp(inbuf->
buffer,
"insert", 6)) {
25 stmt->type = STATEMENT_INSERT;
26 return PREPARE_SUCCESS;
28 if (0 == strcmp(inbuf->
buffer,
"select")) {
29 stmt->type = STATEMENT_SELECT;
30 return PREPARE_SUCCESS;
33 return PREPARE_UNRECOGNIZED_STATEMENT;
MetaCmdRes do_meta_cmd(InputBuffer *inbuf)
Parses and executes non-SQL meta-commands (commands starting with '.').
PrepareRes prepare_statement(InputBuffer *inbuf, Statement *stmt)
The "Compiler": parses raw string input into an executable Statement.
SQL text parsing and meta-command routing.
PrepareRes
Result codes for the SQL statement compiler.
MetaCmdRes
Result codes for meta-command execution.
A parsed SQL statement ready for execution by the VM.