All Versions
10
Latest Version
Avg Release Cycle
89 days
Latest Release
2434 days ago

Changelog History

  • v0.19.1 Changes

    March 14, 2018

    ๐Ÿ“š This release fixes a small error in the README documentation. Thanks @ozburo for noticing the error and submitting a PR.

  • v0.19.0 Changes

    January 12, 2018

    ๐Ÿš€ The main purpose of this release is to address #27, but there are also many other small changes to improve code quality and satisfy gometalinter.

    โฌ†๏ธ Because the linter requires changing some exported identifiers from Id to ID, this is a breaking change and is not backwards-compatible. However, there are no behavior changes and upgrading should be pretty straightforward.

    Full Changelog

    • Model.ModelId renamed to Model.ModelID.
    • Model.SetModelId renamed to Model.SetModelID.
    • RandomId renamed to RandomID.
    • Query.Ids renamed to Query.IDs.
    • Query.StoreIds renamed to Query.StoreIDs.
    • Transaction.ExtractIdsFromFieldIndex renamed to Transaction.ExtractIDsFromFieldIndex.
    • Transaction.ExtractIdsFromStringIndex renamed to Transaction.ExtractIDsFromStringIndex.
    • Transaction.DeleteModelsBySetIds renamed to Transaction.DeleteModelsBySetIDs.
    • Transaction.Ids renamed to Transaction.IDs.
    • Transaction.StoreIds renamed to Transaction.StoreIDs.
    • Updated CONTRIBUTING.md with simplified instructions for pull requests.
    • ๐Ÿ’… Various other typo fixes and code style improvements which do not affect exported identifiers.
  • v0.18.0 Changes

    May 31, 2016

    ๐Ÿ“š This release introduces one major feature (optimistic locking!), as well as a few smaller features and documentation improvements.

    ๐Ÿ“š Optimistic locking has finally been implemented :) We use the Redis WATCH command under the hood for a solution that is simple and performs well. There are two functionally similar methods on Transaction: Watch which expects a Model, and WatchKey which expects a Redis key. You can learn more about how it works by reading the examples in the README and the documentation.

    One other small feature that's been introduced is the Exists method on Collection and Transaction which allows you to easily check if a model with a specific key exists. The only way to do this previously was to call Find and check for a ModelNotFoundError.

    ๐Ÿš€ This release is mostly backwards compatible with version 0.17.0. The only exception is that your code may break if you were relying on some methods and types which were removed or unexported (see below).

    Full Changelog

    • Implemented optimistic locking via the new methods Watch and WatchKey.
    • Implemented Collection.Exists and Transaction.Exists for quickly determining whether a model with a specific id exists.
    • ๐Ÿ›  Fixed some small typos in README and doc comments.
    • โœ‚ Removed the Transaction.FindModelsByIdsKey as I believe it is too complicated and unlikely to be used. We can always add it back later.
    • Unexported actionKind, commandAction, and scriptAction as they were never really meant to be exported in the first place.
  • v0.17.0 Changes

    May 15, 2016

    ๐Ÿš€ 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
  • v0.16.0 Changes

    March 01, 2016

    ๐Ÿ“š This release focuses on improving flexibility and enabling more advanced usage. A number of methods, functions, and other identifiers which were previously unexported are now exported and documented. For a complete description of the new functions and methods, check the full documentation at godoc.org/albrow/zoom.

    ๐Ÿš€ This release is not backwards compatible with previous releases due to a small change to the Collection.ModelKey method. Previously, the method had a signature like func (*Collection) ModelKey(id string) (string, error) would return an error if you passed in an empty string. The new implementation has only one return value (a string) and returns an empty string if you pass in an empty string. However this change is not expected to affect many users.

    Full Changelog:

    • Exported commonly used ReplyHandlers (e.g. NewScanIntHandler, which will scan the reply value into an integer).
      • Exported useful Lua scripts in the form of a wrapper function (e.g. Transaction.ExtractIdsFromFieldIndex).
      • Added link to a new people repository which serves as an example of how to use Zoom in an HTTP/JSON API.
      • Removed the error return value from Collection.ModelKey.
      • Removed glide.lock and glide.yaml due to complications arising from checking in the vendor folder and the possibility of duplicated vendored packages. The recommended strategy for users of Zoom is now to vendor dependencies yourself.
  • v0.15.1 Changes

    March 01, 2016

    ๐Ÿš€ This release fixes a bug that caused applications of the Order query modifier to sometimes return nil. If you chained Order together with other query modifiers, this could lead to an error:

    panic: runtime error: invalid memory address or nil pointer dereference [recovered]
    

    This fix is 100% backwards compatible with version 0.15.0.

    Full Changelog

    • ๐Ÿ›  Fixed a bug in Order that could sometimes cause nil pointers.
  • v0.15.0 Changes

    January 23, 2016

    ๐Ÿš€ This version updates the usage of reflect to be compatible with the upcoming go 1.6 release. All the tests pass both with go 1.5.3 and go 1.6-beta-2. This release also includes changes in the README and comments in the source code to disambiguate on the treatment of unexported embedded structs with exported fields.

    ๐Ÿš€ This release is not backwards compatible with any previous versions, because it does not attempt to save unexported embedded structs with exported fields. However, as far as I know, previous versions would always return an error if you tried to do this. In practice, I would be surprised if this release breaks any code that was using the previous versions.

    Full Changelog

    • ๐Ÿš€ Verified compatibility with the upcoming go 1.6 release.
    • ๐Ÿš€ Unexported embedded structs with exported fields are now ignored, not saved. (Previous releases may have returned an error).
    • ๐Ÿ‘Œ Improved README regarding unexported embedded structs with exported fields.
    • โž• Added tests for unexported embedded structs with exported fields.
  • v0.14.2 Changes

    December 31, 2015

    This release effectively reverts version 0.14.1. I discovered another problem that caused go get to fail. Vendoring does not currently work, but the library should still work okay as long as none of the dependencies introduce incompatible changes.

    Full Changelog

    • โœ‚ Remove vendor folder from version control
  • v0.14.1 Changes

    December 31, 2015

    ๐Ÿš€ This release fixes a bug introduced by 0.14.0 which prevented vendoring from working correctly. Vendored dependencies are now committed to version control using submodules and are still managed by Glide. Zoom should now work correctly with git and the go get command.

    Git submodules can be confusing and come with their own set of commands. I initially tried to avoid using them. However, it is the only way I could figure out how to get the vendored dependencies to install and work as expected. Fortunately, you should not ever need to know anything about git submodules in order to use Zoom effectively. Even if you contribute, the glide get and glide install commands will be used to manage versions and you should not need to interact with submodules directly.

    ๐Ÿ”„ Changelog

    • ๐Ÿ›  Fix a bug which caused vendoring to not work correctly
    • Elaborate on vendoring in CONTRIBUTING.md
  • v0.14.0 Changes

    December 31, 2015

    ๐Ÿš€ This release contains a few very minor code changes to improve error messages. This is also the first release which uses Glide to manage dependencies and install them to the vendor folder. Additionally, the benchmark results were updated for the hardware I currently have available. Unfortunately, I will be unable to run the benchmarks on my old hardware for comparison in the future.

    NOTE : this release actually contains a bug which prevents vendoring from working correctly and is fixed in version 0.14.1.

    Full Changelog

    • Zoom now uses Glide and the Go vendor experiment to manage dependencies
    • โšก๏ธ Updated benchmark results in README
    • ๐Ÿ‘Œ Improved error message when attempting to call a method on a nil Collection