functions to connect to libpq (PostGres) More...
Go to the source code of this file.
Functions | |
struct GNUNET_PQ_PreparedStatement | GNUNET_PQ_make_prepare (const char *name, const char *sql) |
Create a struct GNUNET_PQ_PreparedStatement . More... | |
enum GNUNET_GenericReturnValue | GNUNET_PQ_prepare_once (struct GNUNET_PQ_Context *db, const struct GNUNET_PQ_PreparedStatement *ps) |
Request creation of prepared statements ps from Postgres, but do not automatically re-prepare the statement if we are disconnected from the database. More... | |
enum GNUNET_GenericReturnValue | GNUNET_PQ_prepare_statements (struct GNUNET_PQ_Context *db, const struct GNUNET_PQ_PreparedStatement *ps) |
Request creation of prepared statements ps from Postgres. More... | |
functions to connect to libpq (PostGres)
Definition in file pq_prepare.c.
struct GNUNET_PQ_PreparedStatement GNUNET_PQ_make_prepare | ( | const char * | name, |
const char * | sql | ||
) |
Create a struct GNUNET_PQ_PreparedStatement
.
name | name of the statement |
sql | actual SQL statement |
Definition at line 30 of file pq_prepare.c.
References name, ps, and GNUNET_PQ_PreparedStatement::sql.
Referenced by database_prepare(), database_setup(), and init_connection().
enum GNUNET_GenericReturnValue GNUNET_PQ_prepare_once | ( | struct GNUNET_PQ_Context * | db, |
const struct GNUNET_PQ_PreparedStatement * | ps | ||
) |
Request creation of prepared statements ps from Postgres, but do not automatically re-prepare the statement if we are disconnected from the database.
db | database to prepare the statements for |
ps | GNUNET_PQ_PREPARED_STATEMENT_END-terminated array of prepared statements. |
Definition at line 43 of file pq_prepare.c.
References db, GNUNET_ERROR_TYPE_BULK, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_log_from, GNUNET_OK, GNUNET_SYSERR, name, ps, ret, and GNUNET_PQ_PreparedStatement::sql.
Referenced by GNUNET_PQ_prepare_statements().
enum GNUNET_GenericReturnValue GNUNET_PQ_prepare_statements | ( | struct GNUNET_PQ_Context * | db, |
const struct GNUNET_PQ_PreparedStatement * | ps | ||
) |
Request creation of prepared statements ps from Postgres.
db | database to prepare the statements for |
ps | GNUNET_PQ_PREPARED_STATEMENT_END-terminated array of prepared statements. |
Definition at line 88 of file pq_prepare.c.
References db, GNUNET_free, GNUNET_new_array, GNUNET_PQ_prepare_once(), name, and ps.
Referenced by database_prepare(), and GNUNET_PQ_reconnect().