Functions | |
int | csync_get_statedb_exists (CSYNC *ctx) |
void | csync_set_statedb_exists (CSYNC *ctx, int val) |
int | csync_statedb_close (CSYNC *ctx, const char *statedb, int jwritten) |
int | csync_statedb_create_tables (CSYNC *ctx) |
int | csync_statedb_drop_tables (CSYNC *ctx) |
csync_file_stat_t * | csync_statedb_get_stat_by_hash (CSYNC *ctx, uint64_t phash) |
csync_file_stat_t * | csync_statedb_get_stat_by_inode (CSYNC *ctx, ino_t inode) |
int | csync_statedb_insert (CSYNC *ctx, const char *statement) |
int | csync_statedb_insert_metadata (CSYNC *ctx) |
int | csync_statedb_load (CSYNC *ctx, const char *statedb) |
c_strlist_t * | csync_statedb_query (CSYNC *ctx, const char *statement) |
int | csync_statedb_write (CSYNC *ctx) |
int csync_get_statedb_exists | ( | CSYNC * | ctx | ) |
void csync_set_statedb_exists | ( | CSYNC * | ctx, | |
int | val | |||
) |
int csync_statedb_close | ( | CSYNC * | ctx, | |
const char * | statedb, | |||
int | jwritten | |||
) |
int csync_statedb_create_tables | ( | CSYNC * | ctx | ) |
int csync_statedb_drop_tables | ( | CSYNC * | ctx | ) |
csync_file_stat_t* csync_statedb_get_stat_by_hash | ( | CSYNC * | ctx, | |
uint64_t | phash | |||
) |
csync_file_stat_t* csync_statedb_get_stat_by_inode | ( | CSYNC * | ctx, | |
ino_t | inode | |||
) |
int csync_statedb_insert | ( | CSYNC * | ctx, | |
const char * | statement | |||
) |
Insert function for the statedb.
ctx | The csync context. | |
statement | The SQL statement to insert into the statedb. |
int csync_statedb_insert_metadata | ( | CSYNC * | ctx | ) |
int csync_statedb_load | ( | CSYNC * | ctx, | |
const char * | statedb | |||
) |
Load the statedb.
This function tries to load the statedb. If it doesn't exists it creates the sqlite3 database, but doesn't create the tables. This will be done when csync gets destroyed.
ctx | The csync context. | |
statedb | Path to the statedb file (sqlite3 db). |
c_strlist_t* csync_statedb_query | ( | CSYNC * | ctx, | |
const char * | statement | |||
) |
A generic statedb query.
ctx | The csync context. | |
statement | The SQL statement to execute |
int csync_statedb_write | ( | CSYNC * | ctx | ) |