KSQL_STMT_STEP(3)

NAME
ksql_stmt_cstep, ksql_stmt_step - get the next result of a statement

LIBRARY
ksql

SYNOPSIS
#include <stdint.h>
#include <ksql.h>
enum ksqlc
ksql_stmt_step(struct ksql_stmt *stmt);
enum ksqlc
ksql_stmt_cstep(struct ksql_stmt *stmt);

DESCRIPTION
The ksql_stmt_step and ksql_stmt_cstep functions query the next results of a statement opened with ksql_stmt_open(3). The two functions differ in that ksql_stmt_cstep allows constraint conditions not to return as errors.

These functions handles a locked database (specifically, SQLITE_BUSY, SQLITE_LOCKED, or SQLITE_PROTOCOL) by sleeping for a random interval, then trying again infinitely.

RETURN VALUES
These functions return KSQL_NOTOPEN if the database connection has not been opeend, KSQL_ROW if a row is available for examining, KSQL_DONE if no more rows are available, KSQL_CONSTRAINT if ksql_stmt_cstep was used and a constraint was violated, KSQL_DB on database errors (including constraints, if those are not explicitly alllowed), or KSQL_OK otherwise.

SEE ALSO
sqlite3_step(3)