Comparing version 0.0.2 to 0.0.3
@@ -1,14 +0,23 @@ | ||
{ "name": "ron" | ||
, "version": "0.0.2" | ||
, "description": "Redis ORM for NodeJs" | ||
, "author": "David Worms <david@adaltas.com>" | ||
, "contributors": | ||
[ ] | ||
, "main": "./lib/ron" | ||
, "engines": { "node": ">= 0.3.0" } | ||
, "keywords": ["redis", "orm", "database", "nosql"] | ||
, "repository": | ||
{ "type" : "git" | ||
, "url" : "https://github.com/wdavidw/node-redis-orm.git" | ||
} | ||
} | ||
{ | ||
"name": "ron", | ||
"version": "0.0.3", | ||
"description": "Redis ORM for NodeJs", | ||
"author": "David Worms <david@adaltas.com>", | ||
"contributors": [ | ||
{ "name": "David Worms", "email": "david@adaltas.com" } | ||
], | ||
"dependencies": { | ||
"redis": "latest" | ||
}, | ||
"devDependencies": { | ||
"expresso": "latest" | ||
}, | ||
"engines": { | ||
"node": ">= 0.3.0" | ||
}, | ||
"keywords": ["redis", "orm", "database", "nosql"], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/wdavidw/node-redis-orm.git" | ||
} | ||
} |
@@ -5,3 +5,3 @@ | ||
Be carefull, this project is experimental. | ||
Ad-lib, be carefull, this project is experimental. | ||
@@ -12,3 +12,5 @@ The library provide | ||
* Simple & tested API | ||
* Unique index keys | ||
* Sortable indexes and unique values | ||
* Records are pure object, no extended class, no magic properties | ||
* Code, tests and readme written in coffescript, samples written in javascript | ||
@@ -18,48 +20,58 @@ Quick exemple | ||
var ron = require('ron'); | ||
ron = require 'ron' | ||
app = ron | ||
host: '' | ||
port: '' | ||
name: 'auth' | ||
var Users = ron.create('Users') | ||
// A unique property identifier, default to id | ||
.identify('id_user') | ||
// Create a unique index | ||
.unique('username') | ||
// Create an index | ||
.index('lastname'); | ||
Users.put({ | ||
username: 'my_username', | ||
lastname: 'My Lastname' | ||
}, function(err, user){ | ||
Users.get(user.id_user, function(err, user){ | ||
Users.delete(user.id_user, function(err){ | ||
console.log(user.id_user + ' created and then removed'); | ||
}) | ||
}) | ||
}) | ||
User = app.create 'users' | ||
User.property 'id', | ||
identifier: true | ||
# Use a hash index | ||
User.property 'username', | ||
type: 'string' | ||
unique: true | ||
# Use a sorted set index | ||
User.property 'email', | ||
type: 'string' | ||
index: true | ||
Implementation | ||
-------------- | ||
Client API | ||
---------- | ||
Unique identifiers are incremented from a string: | ||
* Client::constructor | ||
* Client::quit | ||
* Client::create | ||
count:{Model} | ||
Schema API | ||
---------- | ||
Model identifiers are indexed in a set: | ||
* Records::property | ||
* Records::identifier | ||
* Records::unique | ||
* Records::index | ||
* Records::email | ||
index:{model} | ||
Record API | ||
---------- | ||
Unique indexes are stored in a hash with keys as identifier: | ||
* Records::all | ||
* Records::count | ||
* Records::create | ||
* Records::exists | ||
* Records::get | ||
* Records::id | ||
* Records::list | ||
* Records::remove | ||
* Records::update | ||
index:{model}:{property} | ||
Object data are stored in a hash | ||
obj:{model}:{id} | ||
Run tests | ||
--------- | ||
The test suite is integrated with *expresso* and should be run synchronously since they share the same redis client. | ||
Start a redis server (tested against version 2.9.0) on the default port | ||
redis-server ./conf/redis.conf | ||
To run the tests, simply start redis `redis-server ./conf/redis.conf` and type `expresso -s` inside the project folder. | ||
Run the test suite with *expresso*: | ||
expresso -s | ||
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 3 instances in 1 package
52804
75
0
1
1
19
8
+ Addedredis@latest
+ Added@redis/bloom@1.2.0(transitive)
+ Added@redis/client@1.6.0(transitive)
+ Added@redis/graph@1.1.1(transitive)
+ Added@redis/json@1.0.7(transitive)
+ Added@redis/search@1.2.0(transitive)
+ Added@redis/time-series@1.1.0(transitive)
+ Addedcluster-key-slot@1.1.2(transitive)
+ Addedgeneric-pool@3.9.0(transitive)
+ Addedredis@4.7.0(transitive)
+ Addedyallist@4.0.0(transitive)