0.6.4
0.6.4
- Updated
node_redis
dependency to 0.12.1.
0.6.3
- Added node.js 0.12 and io.js to the CI.
- Fixed a bug where modifying responses would "pollute" default values for other queries. See the pull request for more details.
0.6.2
- Added the
.as()
function for each key. When doing retrieval operations,.as(key_name)
can be used to note how we want the key name to be returned..as
takes a single parameter,key_name
, that declares what key we want the retrieved value to be placed at.key_name
can be nested. For example, you can use'first.name
to created a nested object:{first: {name: value}}
.
Example Usage:
user('1').name.as('first_name').get().exec (err, res) ->
expect(res.first_name).toEqual 'the user name'
user('1').name.as('name.first').get().exec (err, res) ->
expect(res.name.first).toEqual 'the user name'
0.6.1
- Added a test for
Orpheus.connect()
when the models are passed as an array instead of an object. - Added the
.raw()
query flag. Queries that run with this flag will return the raw response from Redis. .when()
and.only()
can now optionally receive a boolean flag as the first argument. Only if it's true the function passed to.when()
will run.
For example:
User('john')
.when ->
if the_sky_is_blue then @name.set('happy john')
.exec()
User('john')
.when the_sky_is_blue, ->
@name.set('happy john')
.exec()