radagaisus / orpheus Goto Github PK
View Code? Open in Web Editor NEWA Small Object Model for Redis in CoffeeScript
Home Page: http://radagaisus.github.com/Orpheus/
License: MIT License
A Small Object Model for Redis in CoffeeScript
Home Page: http://radagaisus.github.com/Orpheus/
License: MIT License
User.command('zrem', 'key', arguments...)
User.zrem('key', arguments...)
Great for iterating over dynamic keys.
Assuming:
@zset 'books', key: (author) -> "books:#{author}"
Allow developers to query a books_keys
for all the dynamic keys that were generated. Or, .dynamic_keys_for('books')
, or .keys_for('books')
, or .keys('books')
, or other options.
The end-developers will manually need to remove items from these lists, as there's no easy (or necessary) way to automatically do this for them.
Currently using 0.12.1
of redis
package, which is a very old and obsolete version.
Furthermore: it poses a challenge as it cause bugs and instability with node version 4.0
and greater.
As the node-redis project came back to life, and is highly maintained, we can keep using it as the base driver and drop issue #21 to move to ioredis.
need support for the 'del' command across all types
Migrate the docs from CoffeeScript to Javascript
expire
, ttl
, etc.@str
and @num
attributes of the model.User(id).some_string_attribute.expire()
- will expire the entire hashUser(id).main.expire()
- use main
or another name to access the hashUser(id).expire()
- add it directly to the model, though expire()
here will only expire the hash and not all the model keys. It's possible for us to expire most of the model keys, but not dynamic keys.User(id).command()
- a slightly nicer @_commands.push []
Since Redis .multi()
allows it, so should we.
User('id').name.set('new-name', update_index).exec (err, res) ->
Support in Typescript could be useful, therefore Orpheus must have type definition.
An lpush (or any other list insertion) should simply be discarded on empty arrays as arguments. This saves annoying checks like activities.lpush(activities) if activities.length
throughout the code.
Give an overhaul improvement to the dynamic key syntax to make it easier to understand and more intuitive.
e.g: when changing a dynamic key value, it should be possible to send the key
in a string rather than be forced to send it as an array,
.when(callback)
used for conditional operations, it could be beneficial to have support in async operations
User(user_id).get('name').default('anonymous').exec()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.