aboutsummaryrefslogtreecommitdiff
path: root/include/tags.h
diff options
context:
space:
mode:
authorSoikk2022-07-23 01:46:24 +0200
committerSoikk2022-07-23 01:46:24 +0200
commit28578b192d0828a9820983b5624b9bcc3577cd18 (patch)
tree2f30b1730f30a7eeee80995ee3984c10f5bdc2ff /include/tags.h
parent377dc104be127291ede5b32640c23eea0ba6791a (diff)
downloadsoikk-DB-28578b192d0828a9820983b5624b9bcc3577cd18.tar.xz
soikk-DB-28578b192d0828a9820983b5624b9bcc3577cd18.tar.zst
Improved the database storage system. Added persistency.
Diffstat (limited to 'include/tags.h')
-rw-r--r--include/tags.h19
1 files changed, 9 insertions, 10 deletions
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