Name
sqlite3_complete() — Determine if an SQL statement is complete
Definition
int sqlite3_complete( const char* sql ); int sqlite3_complete16( const void* sql );
-
sql An SQL statement.
- Returns
Zero (
0) if the statement is incomplete,SQLITE_NOMEMif a memory allocation failed, or a nonzero value to indicate the statement is complete.
Description
This function determines if an SQL statement is complete. This
function will return a nonzero result if the given string ends
in a semicolon that is not part of an identifier, string
literal, or CREATE TRIGGER
statement. Although the statement is scanned, it is not fully
parsed and cannot detect syntactically incorrect
statements.
The function sqlite3_initialize() should be called before
using this function. If the SQLite library has not been
initialized, this function will do so automatically. This may
result in additional nonzero result codes if the initialization
fails.
See Also
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access