helper functions for executing SQL statements More...
Go to the source code of this file.
Functions | |
struct GNUNET_SQ_PrepareStatement | GNUNET_SQ_make_prepare (const char *sql, sqlite3_stmt **pstmt) |
Create a struct GNUNET_SQ_PrepareStatement More... | |
enum GNUNET_GenericReturnValue | GNUNET_SQ_prepare (sqlite3 *dbh, const struct GNUNET_SQ_PrepareStatement *ps) |
Prepare all statements given in the (NULL,NULL)-terminated array at ps. More... | |
helper functions for executing SQL statements
Definition in file sq_prepare.c.
struct GNUNET_SQ_PrepareStatement GNUNET_SQ_make_prepare | ( | const char * | sql, |
sqlite3_stmt ** | pstmt | ||
) |
Create a struct GNUNET_SQ_PrepareStatement
sql | actual SQL statement |
pstmt | where to store the handle |
Definition at line 37 of file sq_prepare.c.
References ps, GNUNET_SQ_PrepareStatement::pstmt, and GNUNET_SQ_PrepareStatement::sql.
Referenced by database_prepare(), and database_setup().
enum GNUNET_GenericReturnValue GNUNET_SQ_prepare | ( | sqlite3 * | dbh, |
const struct GNUNET_SQ_PrepareStatement * | ps | ||
) |
Prepare all statements given in the (NULL,NULL)-terminated array at ps.
dbh | database handle |
ps | array of statements to prepare |
Definition at line 50 of file sq_prepare.c.
References GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_OK, GNUNET_SYSERR, ps, GNUNET_SQ_PrepareStatement::pstmt, ret, and GNUNET_SQ_PrepareStatement::sql.
Referenced by database_prepare(), and database_setup().