jrf0110/dirac — pull request #1 by jrf0110 (2013-09-13 22:59:28+00:00)
Title: Add View Support

Will be just like registering a table only we need to indicate that it's a view:

```javascript
var dirac = require('dirac');

dirac.register({
name: 'users_with_groups'
, type: 'view'
, query: {
type: 'select'
, table: 'users'
, columns: ['*', 'array_agg( users_groups.group ) ) as groups']
, joins: {
users_groups: {
type: 'left'
, target: { id: '$users.id$' }
}
}
}
});

dirac.users_with_groups.find( { id: { $in: [1,2,3,4,5,6] } }, function( error, users ){
/* ... */
});
```