|
|
int sqlite3_complete(const char *sql); int sqlite3_complete16(const void *sql);
These routines are useful for command-line input to determine if the currently entered text seems to form complete a SQL statement or if additional input is needed before sending the text into SQLite for parsing. These routines return true if the input string appears to be a complete SQL statement. A statement is judged to be complete if it ends with a semicolon token and is not a fragment of a CREATE TRIGGER statement. Semicolons that are embedded within string literals or quoted identifier names or comments are not independent tokens (they are part of the token in which they are embedded) and thus do not count as a statement terminator.
These routines do not parse the SQL and so will not detect syntactically incorrect SQL.
| F10511 | The sqlite3_complete() and sqlite3_complete16() functions return true (non-zero) if and only if the last non-whitespace token in their input is a semicolon that is not in between the BEGIN and END of a CREATE TRIGGER statement. |
| U10512 | The input to sqlite3_complete() must be a zero-terminated UTF-8 string. |
| U10513 | The input to sqlite3_complete16() must be a zero-terminated UTF-16 string in native byte order. |
See also lists of Objects, Constants, and Functions.