functions to execute plain SQL statements (PostGres) More...
Go to the source code of this file.
Functions | |
struct GNUNET_PQ_ExecuteStatement | GNUNET_PQ_make_execute (const char *sql) |
Create a struct GNUNET_PQ_ExecuteStatement where errors are fatal. More... | |
struct GNUNET_PQ_ExecuteStatement | GNUNET_PQ_make_try_execute (const char *sql) |
Create a struct GNUNET_PQ_ExecuteStatement where errors should be tolerated. More... | |
enum GNUNET_GenericReturnValue | GNUNET_PQ_exec_statements (struct GNUNET_PQ_Context *db, const struct GNUNET_PQ_ExecuteStatement *es) |
Request execution of an array of statements es from Postgres. More... | |
functions to execute plain SQL statements (PostGres)
Definition in file pq_exec.c.
struct GNUNET_PQ_ExecuteStatement GNUNET_PQ_make_execute | ( | const char * | sql | ) |
Create a struct GNUNET_PQ_ExecuteStatement
where errors are fatal.
sql | actual SQL statement |
Definition at line 30 of file pq_exec.c.
References GNUNET_NO, and GNUNET_PQ_ExecuteStatement::sql.
Referenced by postgres_plugin_drop().
struct GNUNET_PQ_ExecuteStatement GNUNET_PQ_make_try_execute | ( | const char * | sql | ) |
Create a struct GNUNET_PQ_ExecuteStatement
where errors should be tolerated.
sql | actual SQL statement |
Definition at line 42 of file pq_exec.c.
References GNUNET_YES, and GNUNET_PQ_ExecuteStatement::sql.
Referenced by database_connect(), namestore_postgres_begin_tx(), namestore_postgres_commit_tx(), and namestore_postgres_rollback_tx().
enum GNUNET_GenericReturnValue GNUNET_PQ_exec_statements | ( | struct GNUNET_PQ_Context * | db, |
const struct GNUNET_PQ_ExecuteStatement * | es | ||
) |
Request execution of an array of statements es from Postgres.
db | database to execute the statements in |
es | GNUNET_PQ_PREPARED_STATEMENT_END-terminated array of prepared statements. |
Definition at line 54 of file pq_exec.c.
References db, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_log_from, GNUNET_NO, GNUNET_OK, GNUNET_SYSERR, GNUNET_PQ_ExecuteStatement::ignore_errors, result, and GNUNET_PQ_ExecuteStatement::sql.
Referenced by GNUNET_PQ_reconnect(), namestore_postgres_begin_tx(), namestore_postgres_commit_tx(), namestore_postgres_rollback_tx(), and postgres_plugin_drop().