UNPKG

valence-connect

Version:

Connect to Valence for requests coming from applications running in the Valence Portal

30 lines (26 loc) 774 B
'use strict'; const valenceConnect = require('valence-connect'); /** * Customers */ class Customers { /** * A promise for the Db Query that when fulfilled will contain * json object results. * * @promise DbQueryPromise * @fulfill {object} Root/Array of results * @reject {TypeError} Call Failure */ /** * Get all customer records out of democmast table * @param {object} params * @return {DbQueryPromise} when fulfilled will contain json object results. */ queryAll(params) { const statement = 'select cusno as NUMBER, cname as NAME,' + ' ccity as CITY, cstate as STATE from DEMOCMAST'; return valenceConnect.dbQuery(params, null, statement); } }; module.exports = new Customers;