.. Project Underverse documentation master file, created by sphinx-quickstart on Thu Jan 26 18:39:16 2012. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to Underverse! ====================== .. automodule:: underverse :members: Underverse, Verse, SubVerse, NecRow, KeyValue Querying ======== The search syntax is close to SQLAlchemy and the API is similar to MongoDB. During the early development phases, I decided to mimic the MongoDB query syntax. However, after the initial version I found it to be more verbose than SQL-Alchemy. At that time, I made a design change and converted everything to reflect the SQL-Alchemy filter functionality. This proved to be better in the end because it's both more readable and more concise. So it was a win on both fronts. Here's a list of all the currently supported conditional statements. .. autoclass:: underverse.model.Document :members: .. autoclass:: underverse.model.Join :members: .. autoclass:: underverse.model.QuasiDead :members: .. automodule:: underverse.predicates :members: Change Log ========== **0.4.1** * Fixed bug in grouping of objects **0.4.0** * Completely rewrote / refactored the object handling to use ``jsonpickle`` instead of the v0.3.0 home-grown solution * The result is much simpler and has more robust object handling * Changed JSON extension functionality to use ``jsonpickle`` * Added new package called *handlers* * Added AND / OR predicates for more complex queries * Test count increased to 86 * Fixed issue with paginate returning empty first page * MapReduce changes * Fixed critcal *mapreduce* bug in calling reduce * Renamed the ``Verse.reduce function`` to ``Verse.simple_reduce`` * This is to maintain compatibility and naming conventions between Verses and SubVerses * Added new *reduce* function to Verse objects which allows ``map`` results to be reduced several times without having re-run the ``map`` operation. * Fixed a few small bugs * Added more exceptions * Added documentation for ``map``, ``reduce`` and ``mapreduce`` functionality .. warning:: **v0.4.0 breaks backward compatibility**. This means that v0.4 might have problems loading/reading *dumps* or *sqlite databases* that were created with older versions. In-memory databases shouldn't see any differences. Now using ``jsonpickle`` to handle object encoding Also, I removed the need to call ``Underverse.create_mappers`` when decoding objects. As long as the object has been imported things should work automatically. **0.3.6** * Added Join capability * Added more robust object handling * Added built-in support for ``datetime.datetime``, ``datetime.date`` and ``datetime.time`` objects * Added more tests * Expanded documentation * Fixed iterator bugs **0.3.5** * Added Key-Value functionality (Including support for easy ENUMs) * Expanded query capability to include nested objects and complex object querys * Small fixes to object handling * Increased test count to 64 * Added ``VACUUM`` option to purging **0.3.1** * Tweaks to MapReduce functionality to make it actually useable * Added MapReduce tests **0.3a** * Small changes to ``setup.py`` **0.3** * Underverse is now officially **beta** * Greatly increased test coverage between v0.2.3 - v0.3 (current total: 45 tests) * Fully integrated ODM support * This means that Underverse can now actually be called an ODM. v0.3 offers full Object-to-Document functionality, including the auto-encoding of class instances into JSON objects, as well as easy decoding (a simple one-liner) of the JSON back into complete Python objects. And the kicker...all this is done without the need for a base class. * Added capability for user-defined encoding and decoding of classes. The built-in functionality should work for all but the most demanding of cases (classes defined in C/C++). * Added capability to 'export' to a Numpy recarray through a process I like to call 'purification'. This can be used to easily gain any additional functionality provided by the amazing NumPy. * Rewrote *ORDER BY* functionality * Added complete support of ascending and descending sorting by multiple document attributes * Simplified the usage and improved readability of *skip* and *limit* functions * Added alternate query method by overloading the *__call__* function for document collections (A.K.A. Verses) * Fixed bug in *find_one* function * Added initial, intelligent support for the storing of NumPy ndarrays * Fixed spelling errors in and increased breadth of documentation **0.2.3** * Added more documentation to the existing query methods * Added initial support for UDFs **0.2.1 - 0.2.2** * Removed remaining stream dependencies * Fixed bug in processing user defined predicates **0.2** * Completely rewrote find / query methods * Can now stack conditions successfully * Fixed initial *skip*, *limit*, *limskip* and *orderby* functionality * Added initial **reduce** and **mapreduce** functionality * Removed stream dependency **0.1.1** * fixed *critical* bug in inserting of Python dicts **0.1** * Project Start ToDo / Brain-storming ===================== **Top Priority** * Add more documentation for: * the QuasiDeads (ie. 'purify' functionality) * the adding and decoding of Python objects * the MapReduce functionality **On the list** * Add tests for *groupby*, *map* and *reduce* functionality * Add support for dynamic attribute naming (ie. naming predicates) * Possibly adding support for loading of delimited files * Customized data loading by using UDFs * Possible ENUM capability? * Through the use of preprocessors? (ie. UDFs / UDPs) * Data validation framework through an extension of ``unittest`` * RuleSets and Rules * RuleSet - parent class * has rules * rules can be applied to datasets which filter / flag conditional criterion * data attributes could be used to store rule results * rules -> RuleSet -> Rule * Is there a need for a @rule decorator? Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search`