Fork me on GitHub

select by alexyoung

A JavaScript database library

Sick of ORM and schemas? select gets right to the point!

Supported databases:

Dependencies

MongoDB:

MySQL:

Testing:

Install

npm install select

Examples

  // 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) {});
    

Documentation

API Documentation

License

The MIT License

Authors

Alex R. Young

Contact

Contact form.

Download

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