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_NOMEM if 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

sqlite3_prepare_xxx()