pjs.setOptions()



This API is used to set various options to be in effect for the current Profound.js session.

Parameters
  1. Options (Object)

Options object

An options object. The following option properties are available:

Property name

Property type

Description

Property name

Property type

Description

keepColNameCase

Boolean

Specifies that pjs.query() and other SQL APIs should keep the case of the column names in the result set as is, as resulted from the SQL statement; that is, do not lowercase the column names. Default value is false.

Note: to enable this behavior for the entire instance, you can use configuration setting "keepColNameCase".



Example: to keep case of column names by using pjs.setOptions()
To 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 }