reldb 0.1.0
Recreational SQLite
Loading...
Searching...
No Matches
compiler.h File Reference

SQL text parsing and meta-command routing. More...

#include "inputbuffer.h"
#include "statement.h"
Include dependency graph for compiler.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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.

Detailed Description

SQL text parsing and meta-command routing.

Definition in file compiler.h.

Function Documentation

◆ do_meta_cmd()

MetaCmdRes do_meta_cmd ( InputBuffer * inbuf)

Parses and executes non-SQL meta-commands (commands starting with '.').

Parameters
[in]inbufThe input buffer containing the user's command.
Return values
META_CMD_SUCCESSIf the command was valid and executed.
META_COMMAND_UNRECOGNISED_CMDIf the command does not exist.

Definition at line 11 of file compiler.c.

Here is the call graph for this function:

◆ prepare_statement()

PrepareRes prepare_statement ( InputBuffer * inbuf,
Statement * stmt )

The "Compiler": parses raw string input into an executable Statement.

Parameters
[in]inbufThe raw text input from the user.
[out]stmtPointer to the Statement struct to be populated.
Return values
PREPARE_SUCCESSIf parsing succeeded.
PREPARE_UNRECOGNIZED_STATEMENTIf the SQL syntax is invalid.

Definition at line 22 of file compiler.c.