From d6b915a043f868611d49e814730ffc2f7c82a048 Mon Sep 17 00:00:00 2001 From: Hyder Hadi Date: Tue, 9 Jun 2026 16:33:38 +0300 Subject: Made a simple miniDB during the governmental job XD simple miniDB that has couple of commands, that uses my hashMap implementation to store (key,value) pairs. --- miniDB/HashMap.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 miniDB/HashMap.h (limited to 'miniDB/HashMap.h') diff --git a/miniDB/HashMap.h b/miniDB/HashMap.h new file mode 100644 index 0000000..0698d3b --- /dev/null +++ b/miniDB/HashMap.h @@ -0,0 +1,30 @@ +#ifndef HASHM_H +#define HASHM_H + +struct hashTable { + int __count; + int __buckets; + struct Entry *__items; + int __tombs; + + // public methods + + void (*insert)(struct hashTable *self, const char *key, int value); + void (*dump)(struct hashTable *self); + struct Entry *(*find)(struct hashTable *self, const char *key); + void (*destructor)(struct hashTable *self); + void (*pop)(struct hashTable *self, const char *key); + float (*factor)(struct hashTable *self); +}; + +struct Entry { + int __value; + char *__key; + int __state; +}; + +char *read_line(); +int intger_input(); +struct hashTable *createTable(); + +#endif \ No newline at end of file -- cgit v1.2.3