New and Improved: DBIx-NoSQL-Store-Manager
January 4th, 2018
New and Improved: DBIx-NoSQL-Store-Manager
A few years ago, I wanted some quick, no fuss way to serialize and persist data encapsulated as Moose objects -- a MooSQL database, if you will. In my research, I discovered and bolted my own on top of it.
A few seconds ago, a new release of that latter module has been punted to CPAN. This update adds relationships between those objects. Now, I'm very conscious that I'm slowly creeping toward , but I think (well, whimsically hope) that I managed to balance dwim comfort and dark sorcery.
This being said, let's an example speak for itself.
The store itself
The blog entry
Next we create the class that represents blog entries.
The authors
We also need an Author
class. Let's make it minimalistic: a name and an
optional bio.
The tags
Same deal with the tags.
We want to be able to have the same tag
associated with different blog entries, so we set the store key to be
based on both the tag and the blog's id, and we index on those two values.
Using it
Setting the store is dead easy. Yes, even if the database
didn't previously exist.
Love you, sqlite. Always did, always will.
Enjoy!
Seen a typo or an error? Submit an edit on GitHub!
First up, the main
Blog
store class. That part is wonderfully boring.