From 4b721332d570f53719894af922c22b7cba146b18 Mon Sep 17 00:00:00 2001 From: Soikk Date: Sat, 13 Aug 2022 18:49:30 +0200 Subject: Added primitive repl, delete functions for database and remove tag from file function. --- include/database.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'include/database.h') 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 -- cgit v1.2.3