From 098fa9897fb0ee6c6609e36a1d8942fd61a2bada Mon Sep 17 00:00:00 2001 From: Anatoliy Chakkaev Date: Thu, 6 Oct 2011 11:26:26 +0400 Subject: [PATCH 1/2] Edited README.md via GitHub --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d956f33..af5f13a3 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,10 @@ var Post = schema.define('Post', { date: { type: Date, detault: Date.now }, published: { type: Boolean, default: false } }); +// simplier way to describe model var User = schema.define('User', { name: String, - bio: Text, + bio: Schema.Text, approved: Boolean, joinedAt: Date, age: Number @@ -118,6 +119,7 @@ If you have found a bug please write unit test, and make sure all other tests st ### Common: ++ transparent interface to APIs + validations + -before and -after hooks on save, update, destroy + default values From 40b346d326bea58e201007d990c0107f8f630a39 Mon Sep 17 00:00:00 2001 From: 1602 Date: Fri, 7 Oct 2011 00:21:27 +0400 Subject: [PATCH 2/2] Edited README.md via GitHub --- README.md | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index af5f13a3..25fcf442 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ ## About -JugglingDB -- cross-db ORM, providing **common interface** to access most popular database formats. Currently supported: mysql, mongodb, redis, neo4j and js-memory-storage (yep, self-written engine for test-usage only). You can add your favorite database adapter, checkout one of existing adapters to learn how, it's super-easy, I guarantee. +JugglingDB is cross-db ORM, providing **common interface** to access most popular database formats. +Currently supported are: mysql, mongodb, redis, neo4j and js-memory-storage (yep, +self-written engine for test-usage only). You can add your favorite database adapter, checkout one of the +existing adapters to learn how, it's super-easy, I guarantee. ## Installation @@ -79,7 +82,7 @@ Read the tests for usage examples: ./test/common_test.js ## Your own database adapter -To use custom adapter, pass it package name as first argument to Schema constructor: +To use custom adapter, pass it's package name as first argument to `Schema` constructor: mySchema = new Schema('couch-db-adapter', {host:.., port:...}); @@ -89,11 +92,12 @@ Make sure, your adapter can be required (just put it into ./node_modules): ## Running tests -All tests written using nodeunit: +All tests are written using nodeunit: nodeunit test/common_test.js -If you run this line, of course it will fall, because it requres different databases to be up and running, but you can use js-memory-engine out of box! Specify ONLY env var: +If you run this line, of course it will fall, because it requres different databases to be up and running, +but you can use js-memory-engine out of box! Specify ONLY env var: ONLY=memory nodeunit test/common_test.js @@ -103,13 +107,17 @@ of course, if you have redis running, you can run ## Package structure -Now all common logic desribed in ./index.js, and database-specific stuff in ./lib/*.js. It super-tiny, yep? +Now all common logic described in ./index.js, and database-specific stuff in ./lib/*.js. It's super-tiny, right? ## Project status -This project written in one weekend (1,2 oct 2011), and of course it not pretend to be preduction-ready, but I plan to use this project as default ORM for RailwayJS in nearest future. So, if you familiar with some database engines - please help me to improve adapter for that database. +This project was written in one weekend (1,2 oct 2011), and of course does not claim to be production-ready, +but I plan to use this project as default ORM for RailwayJS in nearest future. +So, if you are familiar with some database engines - please help me to improve adapter for that database. -For example, I know, mysql implementation sucks now, 'cause I'm not digging too deep into SequelizeJS code, and I think would be better to replace sequelize with something low-level in nearest future, such as `mysql` package from npm. +For example, I know, mysql implementation sucks now, 'cause I'm not digging too deep into SequelizeJS code, +and I think it would be better to replace sequelize with something low-level in nearest future, such +as `mysql` package from npm. ## Contributing