Sick of ORM and schemas? select gets right to the point!
Supported databases:
MongoDB:
MySQL:
Testing:
npm install select
// Set the database connection string
select.db = 'mysql://root@localhost/select-test';
// Find some items and iterate
select('users')
.find({ name: 'Alex' })
.limit(3)
.offset(8)
.each(function(index) {
console.log(this);
});
// Update an attribute
select('users')
.find(17)
.attr({ name: 'Yuka' });
// Create
select('users')
.add({
name: 'Bob',
email: 'bob@example.com'
});
// Delete
select('users')
.find(1)
.del();
// Selector language
select('users[name="Alex", email="alex@example.com"]').
values(function(values) {});
The MIT License
Alex R. Young
You can download this project in either zip or tar formats.
You can also clone the project with Git by running:
$ git clone git://github.com/alexyoung/select