Prepared SQL statement.
Objects of this type represent prepared SQL statements destined to be executed on an SQLite database.
Prepared SQL statements can have placeholders (written as question marks '
?' in the SQL request) which can be bound to real values (see bind) before being executed (see step).
Values can be extracted from the query results using operator>>().
int Sqlite::Statement::step |
( |
| ) |
|
|
inline |
Execute the statement or fetch the next result row.
Execute the SQL statement, after all placeholders have been bound. If no results are produced by the statement, return SQLITE_OK
. Otherwise, fetch the first result row and return SQLITE_ROW
.
Fetch a new row and return SQLITE_ROW
for all subsequent calls. When no more rows are available, return SQLITE_DONE
.
Values can be extracted from the current result row using operator>>().
- Returns
SQLITE_OK
, SQLITE_ROW
or SQLITE_DONE
- Exceptions
-