This repository has been archived by the owner. It is now read-only.
crom-redis.cr
crom-redis
Redis backend for CROM ( CRystal Object Mapper)
Installation
Add this to your application's shard.yml
:
dependencies:
crom-redis:
github: TechMagister/crom-redis.cr
Features
- Insert Basic Object
- Update Basic Object
- Delete Basic Object
- Fetch by Id
- Aggregation support
Usage
require "crom-redis"
class User
CROM.mapping(:redis, {
name: String,
age: Int32,
})
end
class Users < CROM::Redis::Repository(User)
end
crom = CROM.container("redis://") # eq redis://localhost:6379
# user_repo = Users.new crom
# or
# CROM.register_repository Users.new crom
# if repo = Users.repo
# ... do stuff ...
# end
Development
To run spec, run a redis server and configure the URI in ./spec/spec_helper.cr
Contributing
- Fork it ( https://github.com/TechMagister/crom-redis.cr/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- TechMagister Arnaud Fernandés - creator, maintainer
Repository
crom-redis.cr
Owner
Statistic
- 2
- 0
- 0
- 0
- 2
- about 8 years ago
- November 5, 2016
License
MIT License
Links
Synced at
Thu, 07 Nov 2024 02:59:25 GMT
Languages