KSQL_TRANS_OPEN(3)

NAME
ksql_trans_exclopen, ksql_trans_open - open a database transaction

LIBRARY
ksql

SYNOPSIS
#include <ksql.h>
enum ksqlc
ksql_trans_exclopen(struct ksql *sql, size_t id);
enum ksqlc
ksql_trans_open(struct ksql *sql, size_t id);

DESCRIPTION
The ksql_trans_exclopen and ksql_trans_open functions open an exclusive (“immediate”) or regular transaction, respectively. Recursive transactions are disallowed. The id value is used in error reporting and in making sure that transaction calls are symmetric. This follows the same underlying execution logic of ksql_exec(3). They must be followed by ksql_trans_commit(3).

RETURN VALUES
This returns KSQL_NOTOPEN if the database connection is not open, KSQL_TRANS if a transaction is already open, KSQL_DB if errors occurred on the database, or KSQL_OK on success.

SEE ALSO
sqlite3_exec(3)