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
toID
, 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 toModel.ModelID
.Model.SetModelId
renamed toModel.SetModelID
.RandomId
renamed toRandomID
.Query.Ids
renamed toQuery.IDs
.Query.StoreIds
renamed toQuery.StoreIDs
.Transaction.ExtractIdsFromFieldIndex
renamed toTransaction.ExtractIDsFromFieldIndex
.Transaction.ExtractIdsFromStringIndex
renamed toTransaction.ExtractIDsFromStringIndex
.Transaction.DeleteModelsBySetIds
renamed toTransaction.DeleteModelsBySetIDs
.Transaction.Ids
renamed toTransaction.IDs
.Transaction.StoreIds
renamed toTransaction.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 onTransaction
:Watch
which expects aModel
, andWatchKey
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 onCollection
andTransaction
which allows you to easily check if a model with a specific key exists. The only way to do this previously was to callFind
and check for aModelNotFoundError
.๐ 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
andWatchKey
. - Implemented
Collection.Exists
andTransaction.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
, andscriptAction
as they were never really meant to be exported in the first place.
- Implemented optimistic locking via the new methods
-
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 aTransactionQuery
type which works similarly to a regularQuery
. 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 withTransaction.Exec
.There is a new query finisher method called
StoreIds
on bothQuery
andTransactionQuery
.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
andCollectionOptions
. In the past, Zoom has relied on zero types andnil
to implicitly convey defaults. Now, Zoom explicitly provides values forDefaultPoolOptions
andDefaultCollectionOptions
. 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 toQuery
andTransactionQuery
- โ 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
toSaveFields
- ๐ Changed the way
PoolOptions
andCollectionOptions
work - โก๏ธ Various README updates
- โ Added new
-
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 likefunc (*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 (astring
) 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
ReplyHandler
s (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.
- Exported useful Lua scripts in the form of a wrapper function (e.g.
- Exported commonly used
-
v0.15.1 Changes
March 01, 2016๐ This release fixes a bug that caused applications of the
Order
query modifier to sometimes returnnil
. If you chainedOrder
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.
- ๐ Fixed a bug in
-
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, 2015This 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
andglide 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