Commit Graph

7 Commits

Author SHA1 Message Date
Anna Schumaker acd8bd7b23 database: Implement updates to match my current design
- Force the primary key to be a string
- Throw error codes rather than 0

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:57 -04:00
Anna Schumaker a50d8f6e0a database: Allow templated keys to the database index
This allows me to have a std::pair<> as a key if needed.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:56 -04:00
Anna Schumaker 97d889531a index: Remove the index class
This patch updates the design so indexes are built upon databases using
a special IndexEntry.  I also updated the tests/index/ test to match
the new system, but I have not updated filter or group tests yet.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:56 -04:00
Anna Schumaker 629cbeb2e9 index: Add a print() function
This function is used in debug mode to print the current status of the
index.  I also created a print_keys() function to only list the keys.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:54 -04:00
Anna Schumaker 755785799b index: Make sure we can index into keys that don't exist
This should just return a set of size 0.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:53 -04:00
Anna Schumaker 379a96fe13 index: Add in save and load functionality
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:53 -04:00
Anna Schumaker be0d3f3da4 index: Implement most of the index
I have everything except for save() and load() written.  My unittest is
fairly comprehensive and tests everything implemented so far, so with
any luck putting in save() and load() features will go quickly.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:53 -04:00