Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleTo keep case of column names by using pjs.setOptions()
// Example web service
function app(req, res) {
  pjs.setOptions({keepColNameCase: true});			// to keep case of column names as is; in effect for this session
  let result = pjs.query(`select  name as "custName", custno as "custNumber" 
                            from  custadrp 
                            where custno = 1234`);
  res.json(result[0]);
}
exports.run = app;
// data returned: 
{
  "custName": "My Company",
  "custNumber": 1234
}


To keep case of column names, for entire instance
Code Block
titleTo keep case of column names, for entire instance
// Set configuration setting "keepColNameCase" in config.js to "true", to enable that behavior for entire instance
keepColNameCase: true