# ron

> Redis ORM for NodeJs.

Latest version **0.0.8** (published 2012-11-15) · 0 weekly downloads

## Install

```sh
npm install ron
pnpm add ron
yarn add ron
bun add ron
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2012-11-15 |
| First published | 2011-02-21 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.4.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 56 |
| Author | David Worms |
| Maintainers | david |
| Keywords | redis, orm, database, nosql |

## Links

- npm: https://www.npmjs.com/package/ron
- Repository: https://github.com/wdavidw/node-ron
- Homepage: http://www.adaltas.com/projects/node-ron
- Issues: http://github.com/wdavidw/node-ron/issues
- npm.io page: https://npm.io/package/ron

## Dependencies (1)

- [redis](https://npm.io/package/redis.md) latest

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.8 (latest) — 2012-11-15
- 0.0.7 — 2012-05-21
- 0.0.6 — 2012-03-30
- 0.0.5 — 2012-03-22
- 0.0.4 — 2012-02-19
- 0.0.3 — 2011-11-18
- 0.0.2 — 2011-03-04
- 0.0.1 — 2011-02-21

## README

[![Build Status](https://secure.travis-ci.org/wdavidw/node-ron.png)](http://travis-ci.org/wdavidw/node-ron)

Redis ORM for NodeJs
====================

Installation
------------

```bash
npm install ron
```

Usage
-----

```javascript
ron = require('ron');
// Client connection
client = ron({
  port: 6379
  host: '127.0.0.1'
  name: 'auth'
});
// Schema definition
Users = client.get('users');
Users.property('id', {identifier: true});
Users.property('username', {unique: true});
Users.property('email', {index: true, type: 'email'});
Users.property('name', {});
// Record manipulation
Users.create(
  {username: 'ron', email: 'ron@domain.com'},
  function(err, user){
    console.log(err, user.id);
  }
)
```

The library provide
-------------------

*	Documented and tested API
*   Records access with indexes and unique values
*   Records are pure object, no state, no magic

Client API
----------

*   [Client::constructor](http://www.adaltas.com/projects/node-ron/client.html#ron)
*   [Client::get](http://www.adaltas.com/projects/node-ron/client.html#get)
*   [Client::quit](http://www.adaltas.com/projects/node-ron/client.html#quit)

Schema API
----------

*   [Records::hash](http://www.adaltas.com/projects/node-ron/schema.html#hash)
*   [Records::identifier](http://www.adaltas.com/projects/node-ron/schema.html#identifier)
*   [Records::index](http://www.adaltas.com/projects/node-ron/schema.html#index)
*   [Records::property](schema.html#property)
*   [Records::name](http://www.adaltas.com/projects/node-ron/schema.html#name)
*   [Records::serialize](http://www.adaltas.com/projects/node-ron/schema.html#serialize)
*   [Records::temporal](http://www.adaltas.com/projects/node-ron/schema.html#temporal)
*   [Records::unique](http://www.adaltas.com/projects/node-ron/schema.html#unique)
*   [Records::unserialize](http://www.adaltas.com/projects/node-ron/schema.html#unserialize)
*   [Records::validate](http://www.adaltas.com/projects/node-ron/schema.html#validate)

Records API
-----------

*   [Records::all](http://www.adaltas.com/projects/node-ron/records.html#all)
*   [Records::clear](http://www.adaltas.com/projects/node-ron/records.html#clear)
*   [Records::count](http://www.adaltas.com/projects/node-ron/records.html#count)
*   [Records::create](http://www.adaltas.com/projects/node-ron/records.html#create)
*   [Records::exists](http://www.adaltas.com/projects/node-ron/records.html#exists)
*   [Records::get](http://www.adaltas.com/projects/node-ron/records.html#get)
*   [Records::id](http://www.adaltas.com/projects/node-ron/records.html#id)
*   [Records::list](http://www.adaltas.com/projects/node-ron/records.html#list)
*   [Records::remove](http://www.adaltas.com/projects/node-ron/records.html#remove)
*   [Records::update](http://www.adaltas.com/projects/node-ron/records.html#update)

Run tests
---------

Start a redis server on the default port
```bash
redis-server ./conf/redis.conf
```

Run the tests with mocha:
```bash
make test
```

---
_Source: https://npm.io/package/ron · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
