Longevity 0.15.0 - Query Enhancements

Longevity - a persistence framework for Scala and NoSQL - is now up to version 0.15.0! The latest release focuses on query enhancements. We have added orderBy, offset, and limit clauses to our queries and query DSL.

I'm very excited to have a query language that now supports orderBy, offset, and limit clauses. My feeling is this brings a level of completeness to longevity queries that is suitable for a 1.0 release. Check out the chapter on querying in the user manual to see if you agree!

The major thing missing from queries at this point is the ability to construct queries involving collection-based properties: Options, Sets and Lists. Options seem like the most important collection type to me, since it is probably quite common for users to want to query on optional fields. I anticipate starting work on this towards the end of the year. Another missing query feature is an IN operator, (e.g., username in Set("username1", "username2")), which should be pretty easy to write.

Unfortunately, due to the limitations of the Cassandra query language, I was only able to implement the limit clause for the Cassandra back end. Cassandra does not support offset clauses at all, and supports a very limit syntax for ordered queries. Cassandra only handles ORDER BY clauses for a single column, and it has to be the second column of a compound primary key. The next major feature I will be working on in longevity is partition keys, and as part of that work, I will expand the Cassandra support for longevity queries to allow orderBy clauses where possible.

Please give longevity a try! Check out the Getting Started Guide to get an overview of how it works. We also have Activator Tutorials for using longevity with Play and Akka HTTP front ends. And please let me know what you think on the longevity discussion board! I really, really want to hear about any questions you have, bugs you encounter, and features you would like to see added.

No comments:

Post a Comment