Open jrf0110 opened 9 years ago
Arbitrary query composition:
var q1 = dirac.query();
q1.table('orders')
.where({ status: 'submitted' })
.order(['id desc'])
.limit(30);
db.users.find()
.where.({ id: 10 })
.many( q1 )
dirac.query()
would simply return a fancy mosql object with setters/getters. If it's just called from the base dirac
namespace, no connection string or middleware will be associated to it
Place a bigger emphasis on the Relationships helpers
Stream support with https://github.com/brianc/node-pg-query-stream
db.orders().find()
.where({ ... })
.many({ table: 'order_items', alias: 'items' })
.pipe( res );
Where .pipe
would automatically execute the query with a streaming client.
Easily composable factory based API: