From 28578b192d0828a9820983b5624b9bcc3577cd18 Mon Sep 17 00:00:00 2001 From: Soikk Date: Sat, 23 Jul 2022 01:46:24 +0200 Subject: Improved the database storage system. Added persistency. --- include/tags.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'include/tags.h') diff --git a/include/tags.h b/include/tags.h index b8a62b5..0b7f5a9 100644 --- a/include/tags.h +++ b/include/tags.h @@ -2,16 +2,15 @@ #define TAGS_H /* - tags are stored in a big string, separated by semicolons (;) - tags can have namespaces, which should come before the tag - and be followed by a colon (:) - should a namespace store more than one tag, the following - tags will be separated by a comma (,) - spaces are only allowed inside tags or namespaces, as part - of themselves - semicolons, colons, and commas are not allowed inside tags - or namespaces - example: "person:ted kaczynsky;mood:serious;meta:jpg" + tags are stored in a big table (or their hashes are) ordered + by alphabetical order + tags can have namespaces which are a special tag that starts + with a ':' + all tags in a namespace are located between two occurrences + of the namespace within the list, + e.g [":people", "sam hyde", "hitler", ":people"] + maybe namespaces use another hashing function to prevent + collisions because of the lack of space because of the ':' */ #define MAXTAGS 4094 -- cgit v1.2.3