Definice maker | |
#define | cr_open_primary_db(PATH, ERR) cr_open_db(PATH, CR_DB_PRIMARY, ERR) |
#define | cr_open_filelists_db(PATH, ERR) cr_open_db(PATH, CR_DB_FILELISTS, ERR) |
#define | cr_open_other_db(PATH, ERR) cr_open_db(PATH, CR_DB_OTHER, ERR) |
#define | cr_close_primary_db(DB, ERR) cr_close_db(DB, CR_DB_PRIMARY, ERR) |
#define | cr_close_filelists_db(DB, ERR) cr_close_db(DB, CR_DB_FILELISTS, ERR) |
#define | cr_close_other_db(DB, ERR) cr_close_db(DB, CR_DB_OTHER, ERR) |
Výčty | |
enum | cr_DatabaseType { CR_DB_PRIMARY, CR_DB_FILELISTS, CR_DB_OTHER } |
Funkce | |
sqlite3 * | cr_open_db (const char *path, cr_DatabaseType db_type, GError **err) |
cr_DbPrimaryStatements | cr_prepare_primary_db_statements (sqlite3 *db, GError **err) |
cr_DbFilelistsStatements | cr_prepare_filelists_db_statements (sqlite3 *db, GError **err) |
cr_DbOtherStatements | cr_prepare_other_db_statements (sqlite3 *db, GError **err) |
void | cr_destroy_primary_db_statements (cr_DbPrimaryStatements stmts) |
void | cr_destroy_filelists_db_statements (cr_DbFilelistsStatements stmts) |
void | cr_destroy_other_db_statements (cr_DbOtherStatements stmts) |
void | cr_add_primary_pkg_db (cr_DbPrimaryStatements stmts, cr_Package *pkg) |
void | cr_add_filelists_pkg_db (cr_DbFilelistsStatements stmts, cr_Package *pkg) |
void | cr_add_other_pkg_db (cr_DbOtherStatements stmts, cr_Package *pkg) |
void | cr_dbinfo_update (sqlite3 *db, const char *checksum, GError **err) |
void | cr_close_db (sqlite3 *db, cr_DatabaseType db_type, GError **err) |
#define cr_close_filelists_db | ( | DB, | |||
ERR | ) | cr_close_db(DB, CR_DB_FILELISTS, ERR) |
#define cr_close_other_db | ( | DB, | |||
ERR | ) | cr_close_db(DB, CR_DB_OTHER, ERR) |
#define cr_close_primary_db | ( | DB, | |||
ERR | ) | cr_close_db(DB, CR_DB_PRIMARY, ERR) |
#define cr_open_filelists_db | ( | PATH, | |||
ERR | ) | cr_open_db(PATH, CR_DB_FILELISTS, ERR) |
#define cr_open_other_db | ( | PATH, | |||
ERR | ) | cr_open_db(PATH, CR_DB_OTHER, ERR) |
Macro over cr_open_db function. Open (create new) other sqlite sqlite db.
PATH | Path to the db file. | |
ERR | **GError |
#define cr_open_primary_db | ( | PATH, | |||
ERR | ) | cr_open_db(PATH, CR_DB_PRIMARY, ERR) |
enum cr_DatabaseType |
void cr_add_filelists_pkg_db | ( | cr_DbFilelistsStatements | stmts, | |
cr_Package * | pkg | |||
) |
Add package into the database.
stmts | object with compiled statements | |
pkg | package object |
void cr_add_other_pkg_db | ( | cr_DbOtherStatements | stmts, | |
cr_Package * | pkg | |||
) |
Add package into the database.
stmts | object with compiled statements | |
pkg | package object |
void cr_add_primary_pkg_db | ( | cr_DbPrimaryStatements | stmts, | |
cr_Package * | pkg | |||
) |
Add package into the database.
stmts | object with compiled statements | |
pkg | package object |
void cr_close_db | ( | sqlite3 * | db, | |
cr_DatabaseType | db_type, | |||
GError ** | err | |||
) |
Close db.
db | open db connection | |
db_type | Type of database (primary, filelists, other) | |
err | **GError |
void cr_dbinfo_update | ( | sqlite3 * | db, | |
const char * | checksum, | |||
GError ** | err | |||
) |
Insert record into the updateinfo table
db | open db connection | |
checksum | compressed xml file checksum | |
err | **GError |
void cr_destroy_filelists_db_statements | ( | cr_DbFilelistsStatements | stmts | ) |
Frees cr_DbFilelistsStatements object.
stmts | statements object |
void cr_destroy_other_db_statements | ( | cr_DbOtherStatements | stmts | ) |
Frees cr_DbOtherStatements object.
stmts | statements object |
void cr_destroy_primary_db_statements | ( | cr_DbPrimaryStatements | stmts | ) |
Frees cr_DbPrimaryStatements object.
stmts | statements object |
sqlite3* cr_open_db | ( | const char * | path, | |
cr_DatabaseType | db_type, | |||
GError ** | err | |||
) |
Open (create new) other sqlite sqlite db.
path | Path to the db file. | |
db_type | Type of database (primary, filelists, other) | |
err | **GError |
cr_DbFilelistsStatements cr_prepare_filelists_db_statements | ( | sqlite3 * | db, | |
GError ** | err | |||
) |
Prepare compiled statements for use in the cr_add_filelists_pkg_db function.
db | Open db connection | |
err | **GError |
cr_DbOtherStatements cr_prepare_other_db_statements | ( | sqlite3 * | db, | |
GError ** | err | |||
) |
Prepare compiled statements for use in the cr_add_other_pkg_db function.
db | Open db connection | |
err | **GError |
cr_DbPrimaryStatements cr_prepare_primary_db_statements | ( | sqlite3 * | db, | |
GError ** | err | |||
) |
Prepare compiled statements for use in the cr_add_primary_pkg_db function.
db | Open db connection | |
err | **GError |