diff options
| author | Soikk | 2022-08-07 15:41:19 +0200 |
|---|---|---|
| committer | Soikk | 2022-08-07 15:41:19 +0200 |
| commit | 5dd0d7700fa98197cdadaa2369d789e092cc0f49 (patch) | |
| tree | 99d2dd331eb4c887b7895c893b803e34a9c10a77 /include/database.h | |
| parent | f9a7d9cd8a7e603c89d4cc5d98d7f694cc217d85 (diff) | |
| download | soikk-DB-5dd0d7700fa98197cdadaa2369d789e092cc0f49.tar.xz soikk-DB-5dd0d7700fa98197cdadaa2369d789e092cc0f49.tar.zst | |
Added removing things from db. Ref counts update when removing things. Added changelog.
Diffstat (limited to 'include/database.h')
| -rw-r--r-- | include/database.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/database.h b/include/database.h index 5f2d99d..1ae65b6 100644 --- a/include/database.h +++ b/include/database.h @@ -15,10 +15,6 @@ typedef struct database{ database *newDatabase(char *name); -database *loadDatabase(const char* path); - -int storeDatabase(database *db, const char *path); - uint64_t addFile(database *db, char *file); uint64_t addTag(database *db, char *tag); @@ -27,10 +23,18 @@ int addFileTag(database *db, char *file, char *tag); int addFileTags(database *db, char *file, int ntags, ...); +int removeFile(database *db, char *file); + +int removeTag(database *db, char *tag); + int searchFile(database *db, char *file, uint64_t n, uint64_t **r, uint64_t *rl); int searchTag(database *db, char *tag, uint64_t n, uint64_t **r, uint64_t *rl); +int storeDatabase(database *db, const char *path); + +database *loadDatabase(const char* path); + void printDatabase(database *db); void debugAVLtree(node *n); |
