Zoom v0.17.0 Release Notes

Release Date: 2016-05-15 // almost 8 years ago
  • ๐Ÿš€ This release features some bug fixes, API changes, and new features. It is not backwards compatible with previous versions.

    You can now run queries inside a transaction via the Transaction.Query method. It returns a TransactionQuery type which works similarly to a regular Query. The only real difference is how the queries are actually executed. Specifically, the finisher methods (e.g. Run, RunOne, Count, etc) do not return anything. Instead they accept arguments which are then mutated after the transaction is executed with Transaction.Exec.

    There is a new query finisher method called StoreIds on both Query and TransactionQuery. StoreIds allows you to store the ids of models that match the query criteria in a Redis list, which allows for more low-level operations.

    0๏ธโƒฃ Zoom now uses a different approach for both PoolOptions and CollectionOptions. In the past, Zoom has relied on zero types and nil to implicitly convey defaults. Now, Zoom explicitly provides values for DefaultPoolOptions and DefaultCollectionOptions. To modify the options, you can create a copy of the options and modify the fields directly. There are also helper methods (e.g. PoolOptions.WithPassword for modifying the default values without mutating.

    Full Changelog

    • โž• Added new StoreIds method to Query and TransactionQuery
    • โž• Added an explicit test for leaked temporary ids
    • Implemented TransactionQuery for running queries inside a transaction
    • Implemented Transaction.FindModelsByIdsKey for finding models by the ids in a Redis set
    • ๐Ÿ›  Fixed a bug which caused fields of type time.Duration to not be saved correctly
    • ๐Ÿ‘Œ Improved clarity of the ModelNotFoundError message
    • ๐Ÿ›  Fixed a bug where errors that occurred during a transaction were sometimes not returned
    • โšก๏ธ Renamed UpdateFields to SaveFields
    • ๐Ÿ”„ Changed the way PoolOptions and CollectionOptions work
    • โšก๏ธ Various README updates