lib/models/posts.js
function archive(cb) {
  db.getClient(function(err, client, done) {
    client.query(qb.select() + ' WHERE published = true', function(err, r) {
      if(err) {
        cb(err);
        done(err);
      } else {
        cb(null, r.rows);
        done();
      }
    });
  });
}
function archive(cb) {
  db.getClient(function(err, client, done) {
    client.query(qb.select() + ' WHERE published = true', function(err, r) {
      if(err) {
        cb(err);
        done(err);
      } else {
        cb(null, r.rows);
        done();
      }
    });
  });
}
function archive ( cb ) { db . getClient ( function ( err , client , done ) { client . query ( qb . select ( ) + ' WHERE published = true' , function ( err , r ) { if ( err ) { cb ( err ) ; done ( err ) ; } else { cb ( null , r . rows ) ; done ( ) ; } } ) ; } ) ; }
Returns all published posts without pagination support

@param {Function} cb
Returns all published posts without pagination support