KSQL_STMT_DOUBLE(3) Library Functions Manual KSQL_STMT_DOUBLE(3)

ksql_stmt_blob, ksql_stmt_bytes, ksql_stmt_double, ksql_stmt_int, ksql_stmt_isnull, ksql_stmt_str
get the result columns of a statement

library “ksql”

#include <sys/types.h>
#include <stdint.h>
#include <ksql.h>
const void *
ksql_stmt_blob(struct ksqlstmt *stmt, size_t column);
size_t
ksql_stmt_bytes(struct ksqlstmt *stmt, size_t column);
double
ksql_stmt_double(struct ksqlstmt *stmt, size_t column);
int64_t
ksql_stmt_int(struct ksqlstmt *stmt, size_t column);
int
ksql_stmt_isnull(struct ksqlstmt *stmt, size_t column);
const char *
ksql_stmt_str(struct ksqlstmt *stmt, size_t column);

All of these functions will soon be deprecated. See ksql_result_double(3) for replacements.
These functions functions return results following ksql_stmt_step(3). They all accept stmt, the statement allocated with ksql_stmt_alloc(3); and the column to query, which starts at zero. The results are not defined for a statement without a resulting row or for columns beyond the prepared statement.
The ksql_stmt_str() and ksql_stmt_blob() functions return memory tha tmust be copied prior to subsequent ksql_stmt_step(3), ksql_stmt_reset(3), or ksql_stmt_free(3).

sqlite3_column_blob(3)
May 9, 2018 OpenBSD 6.4