Commit Graph

14 Commits

Author SHA1 Message Date
Anna Schumaker 81f3ef458f database: Each DatabaseEntry should know its id
This will let me set up a Track class that has pointers to the
corresponding artist, album and genre information without needing to
know their IDs directly.  Having this information available means I
won't need to keep a "join struct" when doing lookups - instead I can
return a pointer to a Track class that already knows everything.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:06 -04:00
Anna Schumaker 14879b03fd idle: Update design and unit test
I didn't have any changes to make to the IdleQueue itself, but I did
need to update the unit test and reword a few things in the design.

Signed-off-by: Anna Schuamker <schumaker.anna@gmail.com>
2014-04-06 19:57:06 -04:00
Anna Schumaker 58ed47b37c filter: Update design and rewrite the unit test
- filter :: add() now returns the lowercased text
- Don't cache lowercased strings
- Remove functions depending on CONFIG_TEST

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:06 -04:00
Anna Schumaker 7eddaac14e Remove some text from DESIGN
Because it is all in TODO already.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:06 -04:00
Anna Schumaker 1b34a9a8a0 index: Update the index design
I updated the design and rewrote the unit tests.  This creates something
more consistent with how I ended up using the index.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:05 -04:00
Anna Schumaker fc8dc9d55e database: Design and test updates
I add:
- Autosaving option
- Real iterators
- Better accessor functions

The new design and unit test also allows me to remove the 300,000+ line
"database.good" file that the old tests were based on.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:05 -04:00
Anna Schumaker b251f27bb5 file: Don't use throw / catch to report errors
Needing to use throw / catch was getting in the way.  Instead, check for
a boolean return value.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:05 -04:00
Anna Schumaker 959cac0fe1 Database: Update design for database entries
I changed primary_key() into a function since it is only called once,
and there is no point in using more mmemory than I need to.  I also
created a basic unit test for everything that database entries are
supposed to do.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:05 -04:00
Anna Schumaker f7d08724a3 design: Cleanups to each section
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:05 -04:00
Anna Schumaker 336024bae9 file: Update design and create a new unit test
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:05 -04:00
Anna Schumaker e2fd4773da Update design info for versions
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:05 -04:00
Anna Schumaker 73d3c68e9f error: Update design
To make sure all the info is up to date.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:05 -04:00
Anna Schumaker 0cf38aaf56 Introduce README
README has basic commands for building / cleaning
I also update the DESIGN file a bit.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker dd1db4645a Rename files
This matches how other projects do things.

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