The Storm team is proud to announce Storm 0.17! The new release includes a number of new features:
* Optimized any and is_empty ResultSet methods * String-based order by on ReferenceSet * Improved safety checks to help prevent bugs and aid debugging * Get a Select expression for a ResultSet * SQLite reserved words are correctly handled This release includes official packages for all supported releases of Ubuntu. They are available in the Storm team's PPA: https://edge.launchpad.net/~storm/+archive/ppa You can find the release files at: https://launchpad.net/storm/+download You can always get the latest source code from Launchpad: bzr branch lp:storm Finally, you can join us in the #storm channel on irc.freenode.net and on the Storm mailing list: https://lists.canonical.com/mailman/listinfo/storm Read on for more... Optimized any and is_empty ResultSet methods -------------------------------------------- The ResultSet.any, ResultSet.is_empty and the equivalents on ReferenceSet strip ORDER BY clauses before running queries. This will provide a performance boost for queries that would match a large number of rows. String-based order by on ReferenceSet ------------------------------------- When the Storm metaclass is used as the base for Storm model classes, strings can be used to define ReferenceSets, for example: class Library(Storm): books = ReferenceSet(library_id, "Book.library_id") This makes it easy to workaround circular import issues. The default ORDER BY clause can now be defined using a string: class Library(Storm): books = ReferenceSet(library_id, "Book.library_id", order_by="Book.title") Improved safety checks to help prevent bugs and aid debugging ------------------------------------------------------------- Store and Connection objects have new block_access and unblock_access methods, designed to prevent access to the database during unexpected times, such as between web requests. If an attempt to access the database is made while a connection is blocked a ConnectionBlockedError will be raised. Finally, if a ZStorm-managed store is accessed in a different thread from the one in which it was created a ZStormError will be raised. Get a Select expression for a ResultSet --------------------------------------- ResultSet has a new get_select_expr that can be used to get a Select expression, useful when building a subselect, configured with the same settings as the ResultSet. A list of columns must be provided: result = store.find(Book, Library.id.is_in([1,2,3])) select = result.get_select_expr(Book.title, Book.author) SQLite reserved words are correctly handled ------------------------------------------- In addition to the standard SQL92 reserved words, SQLite has it's own set reserved words. Storm is now aware of them and will perform escaping correctly, making it easier for users that have table and column names that conflict with this list. Detailed changelog ------------------ Improvements: - The order_by parameter defined on ReferenceSet can now be specified as a string, to workaround circular dependency issues. The order by property column will be resolved after import time (bug #580037). - The Store and Connection classes have block_access() and unblock_access() methods that can be used to block access to the database connection. This can be used to ensure that an application doesn't access the database at unexpected times. - When using stores managed by ZStorm, a ZStormError will be raised on attempts to use a per-thread store from the wrong thread (bug #348815). - ResultSet.is_empty strips the ORDER BY clause, when present, to provide a performance boost for queries that would match a large number of rows (bug #246200). - A new ResultSet.get_select_expr method returns a Select expression built for a specified set of columns, based on the settings of the result set (bug #337494). - ResultSet.any and ReferenceSet.any strips the ORDER BY clause, when present, to provide a performance boost for queries that would match a large number of rows (bug #608825). - SQLObjectResultSet has a new is_empty method which should be used in preference to __nonzero__, because it is compatible with ResultSet. Bug fixes: - SQLite reserved words are handled properly (bug #593633). - A bug in change checkpointing logic has been fixed to detect changes in mutable objects correctly and to prevent useless (or potentially harmful!) columns to be specified in updates (bug #553334). -- storm mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/storm
