function countItemsInSection(section) {
   return db.result('SELECT * FROM groceries.items WHERE section = $1', section)
    .then(function(result) {
      return result.rowCount;
    })
}
//Testing function to get count of items in a specific section:
Testing function to get count of items in a specific section.
Testing function to get count of items in a specific section .
function countItemsInSection(section) {
   return db.result('SELECT * FROM groceries.items WHERE section = $1', section)
    .then(function(result) {
      return result.rowCount;
    })
}
function countItemsInSection ( section ) { return db . result ( 'SELECT * FROM groceries.items WHERE section = $1' , section ) . then ( function ( result ) { return result . rowCount ; } ) }
Testing function to get count of items in a specific section:
Testing function to get count of items in a specific section :