Name
sqlite3_prepare_xxx() — Convert an SQL string into a prepared statement
Definition
int sqlite3_prepare( sqlite3* db, const char* sql, int sql_len,
sqlite3_stmt** stmt_ref, const char** tail );
int sqlite3_prepare16( sqlite3* db, const void* sql, int sql_len,
sqlite3_stmt** stmt_ref, const char** tail );
int sqlite3_prepare_v2( sqlite3* db, const char* sql, int sql_len,
sqlite3_stmt** stmt_ref, const char** tail );
int sqlite3_prepare16_v2( sqlite3* db, const void* sql, int sql_len,
sqlite3_stmt** stmt_ref, const char** tail );-
db A database connection.
-
sql One or more SQL statements in a UTF-8 or UTF-16 encoded string. If the string contains more than one SQL statement, the statements must be separated by a semicolon. If the string contains only one SQL statement, no trailing semicolon is required.
-
sql_len The length of the
sqlbuffer in bytes. If thesqlstring is null-terminated, the length should include the termination character. If thesqlstring is null-terminated but the length is not known, a negative value will cause SQLite to compute the buffer length.-
stmt_ref A reference to a prepared statement. SQLite will allocate and pass back the prepared statement.
-
tail If the
sqlbuffer contains more than one SQL statement, only the first complete statement is used. If additional statements exist, this reference will be used to pass back a pointer to the next SQL statement in thesqlbuffer. This reference may be set to NULL.- Returns
An SQLite result code.
Description
These functions ...
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