helper functions for executing SQL statements More...
Go to the source code of this file.
Functions | |
struct GNUNET_SQ_ExecuteStatement | GNUNET_SQ_make_execute (const char *sql) |
Create a struct GNUNET_SQ_ExecuteStatement where errors are fatal. More... | |
struct GNUNET_SQ_ExecuteStatement | GNUNET_SQ_make_try_execute (const char *sql) |
Create a struct GNUNET_SQ_ExecuteStatement where errors should be tolerated. More... | |
enum GNUNET_GenericReturnValue | GNUNET_SQ_exec_statements (sqlite3 *dbh, const struct GNUNET_SQ_ExecuteStatement *es) |
Request execution of an array of statements es from Postgres. More... | |
helper functions for executing SQL statements
Definition in file sq_exec.c.
struct GNUNET_SQ_ExecuteStatement GNUNET_SQ_make_execute | ( | const char * | sql | ) |
Create a struct GNUNET_SQ_ExecuteStatement
where errors are fatal.
sql | actual SQL statement |
Definition at line 36 of file sq_exec.c.
References GNUNET_NO, and GNUNET_SQ_ExecuteStatement::sql.
Referenced by database_setup(), namestore_sqlite_begin_tx(), namestore_sqlite_commit_tx(), namestore_sqlite_create_tables(), namestore_sqlite_drop_tables(), and namestore_sqlite_rollback_tx().
struct GNUNET_SQ_ExecuteStatement GNUNET_SQ_make_try_execute | ( | const char * | sql | ) |
Create a struct GNUNET_SQ_ExecuteStatement
where errors should be tolerated.
sql | actual SQL statement |
Definition at line 55 of file sq_exec.c.
References GNUNET_YES, and GNUNET_SQ_ExecuteStatement::sql.
Referenced by database_prepare(), database_setup(), and namestore_sqlite_create_tables().
enum GNUNET_GenericReturnValue GNUNET_SQ_exec_statements | ( | sqlite3 * | dbh, |
const struct GNUNET_SQ_ExecuteStatement * | es | ||
) |
Request execution of an array of statements es from Postgres.
dbh | database to execute the statements over |
es | GNUNET_PQ_PREPARED_STATEMENT_END-terminated array of prepared statements. |
Definition at line 76 of file sq_exec.c.
References GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_OK, GNUNET_SYSERR, GNUNET_SQ_ExecuteStatement::ignore_errors, and GNUNET_SQ_ExecuteStatement::sql.
Referenced by database_prepare(), database_setup(), namestore_sqlite_begin_tx(), namestore_sqlite_commit_tx(), namestore_sqlite_create_tables(), namestore_sqlite_drop_tables(), and namestore_sqlite_rollback_tx().