diff options
| author | Soikk | 2022-08-13 18:49:30 +0200 |
|---|---|---|
| committer | Soikk | 2022-08-13 18:49:30 +0200 |
| commit | 4b721332d570f53719894af922c22b7cba146b18 (patch) | |
| tree | 9c5b8f75345310cd7f2479fca0ebaf20c7ca47dc /include/database.h | |
| parent | 32dd785f881cf3ba6c1c6806cd3af3cbf56437c4 (diff) | |
| download | soikk-DB-4b721332d570f53719894af922c22b7cba146b18.tar.xz soikk-DB-4b721332d570f53719894af922c22b7cba146b18.tar.zst | |
Added primitive repl, delete functions for database and remove tag from file function.
Diffstat (limited to 'include/database.h')
| -rw-r--r-- | include/database.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/database.h b/include/database.h index bd60e72..d5ad8e9 100644 --- a/include/database.h +++ b/include/database.h @@ -15,19 +15,25 @@ typedef struct database{ database *newDatabase(char *name); +int freeDatabase(database **db); + +int deleteDatabase(database **db); + uint64_t addFile(database *db, char *file); uint64_t addTag(database *db, char *tag); +int removeFile(database *db, char *file); + +int removeTag(database *db, char *tag); + int addFileTag(database *db, char *file, char *tag); int addFileTags(database *db, char *file, int ntags, ...); int addTagFiles(database *db, char *tag, int nfiles, ...); -int removeFile(database *db, char *file); - -int removeTag(database *db, char *tag); +int removeFileTag(database *db, char *file, char *tag); int searchFile(database *db, char *file, uint64_t n, uint64_t **r, uint64_t *rl); @@ -39,8 +45,6 @@ database *loadDatabase(const char* path); void printDatabase(database *db); -void debugAVLtree(node *n); - void debugDatabase(database *db); #endif |
