Releases: albrow/zoom
Version 0.4 – Indexes and Filters
This release adds performance benefits, API changes, and greatly improved querying capabilities. The biggest changes are support for indexes using struct tags and range and equality filters using the new Filter method.
WARNING: There are currently some bugs around using multiple query modifiers at the same time. The bugs are noted clearly in the documentation. A patch is coming to fix the bugs soon.
CHANGELOG:
- Added support for declarative indexing on all primitive types and pointers to primitive types by using a struct tag. Indexes use Redis's sorted sets behind the scenes.
- Added support for filters: =, !=, <, >, <=, and <= for any type which has an index.
- Conversion strategy has been completely rewritten, and relies less on redigo. The only unsupported types are functions inside of structs and cyclical structures. (However cyclical structures can be represented with relationships if properly set up!)
- Now using encoding/gob as a fallback for encoding arbitrary types.
- Split the old Register function into a Register and RegisterName function. RegisterName allows you to provide a custom name which will be used in Redis keys. Register uses a sensible default name.
- Created explicit MSave, MDelete, MFindById, etc. instead of the variadic versions of those functions. This lets you do the same operation on different types in a single transaction.
- Added a KeyNotFoundError type, which is returned whenever a model with a given name and id cannot be found.
- Disambiguated error messages in some cases
- Removed dependence on customized redigo code. Now imports redigo package without changing it. Updated LICENSE accordingly.
- Changed to a flat package structure.
- Fixed a bug where multiple pointers to a model with the same id where being created in one-to-many relationships.
- Fixed some bugs in the tests having to do with set comparisons. May have been causing tests to fail randomly.
- Rewrote errors.go using Sprintf instead of string concatenation
- Improved performance by avoiding redundant checks for a model/id existence.
- Updated and improved benchmarking code
Version 0.3.1
This release is mostly backwards compatible with versions >= 0.3.0. The exception is that some (mistakenly) exported methods and constants are now unexported. See below.
- General refactoring
- Rename modelSpec.relations to modelSpec.relationships. Update language in README accordingly.
- Made GetId and SetId unexported. getId has a non-pointer receiver.
- Made ONE_TO_MANY and ONE_TO_ONE constants unexported.
Version 0.3 – Queries and Transactions
This release adds performance benefits and API changes. It is not backwards compatible with previous releases.
CHANGELOG:
- A new Query interface can be used to perform sorting and simple SQL-like queries. Supported query modifiers: Include, Exclude, SortBy, Order, Limit, and Offset.
- Transactions are used whenever possible, reducing the number of round trips.
- Relationships are not automatically saved. They need an Id before being assigned.
- Changed the required *zoom.Model field to zoom.DefaultData. It's not a pointer, so it no longer needs to be instantiated in your model constructors.
- Added support for variadic Save and Delete operations. Multiple models can easily be saved or deleted using a transaction.
- Removed app-level cache because it had the potential to abuse memory (a pointer counted as 16 bytes regardless of the size of the data structure it points to). It will be added again when I can figure out a way to properly implement it.
- Added a ScanAll function which works like ScanById but for one or more Models.
- Added a "zoom: " prefix to all errors.
- Added godoc comments for proper documentation.
- Moved all of redigo into the redis folder. Very few changes were made to it.
- Reversed order of the ScanById function arguments to conform with conventions.
- Changed the ":index" suffix for keeping track of the ids of all models of a given type to ":all"
- Renamed ModelInterface to Model
- Refactoring across the board
Version 0.1.0 New Network/Connectivity Options
Changelog:
- Change default connection to tcp localhost:6379 (the default for redis).
- However, benchmarks force a unix socket connection on /tmp/unix.sock (to reflect maximum possible performance).
- Update README accordingly.
Version 0.0.1 – Pre Pre Pre Alpha
All the tests pass but there are likely undiscovered bugs. The API will likely change dramatically before the final release, so don't use this for anything other than experimenting/exploring.