1602/jugglingdb — pull request #408 by jvskelton (2014-07-01 19:20:57+00:00)
Title: Created ability to return specific column data

Create new core method to return specified columns in an adapter independent manner.

Example 1:

model.select({where : {name: 'bill'}, attributes: 'id'}}, callback)
OR
model.select({attributes: 'id'}}, callback)

returns array of ids (e.g. [ 1, 2 ])

Example 2 :

model.select({where : {name: 'bill'}, attributes: ['id']}}, callback)
OR
model.select({attributes: ['id']}}, callback)

returns array of objects(e.g. [{id: 1}, {id: 2}])

Example 3:

model.select({where: {address: '123'}, attributes: ['id', 'name']},callback)
OR
model.select({, attributes: ['id', 'name']},callback)

returns [{id: 1, name: 'bill'}, {id: 2. name: 'alice'}]