...
...
As of July 25th, 2023, there is a content freeze on this page. | ||||||||||||||||||||||||||||||||||
Section | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Warning | ||
---|---|---|
| ||
When using an IBM i database, this API requires the Profound.js Connector module. |
...
- If parameter 4 is specified, the API does not return a value.
- If 1 record is requested, the API returns a JavaScript object that represents the fetched record or null if no record was found.
- If more than 1 record is requested, the API returns an array of JavaScript objects, where each Object represents a record. If no records were fetched, an empty array is returned.
Info | ||
---|---|---|
| ||
16MB of data is the limit for the whole result from a pjs.query() request with the IBM i Connector. (The limit is not 16MB per column). |
Examples
Load a Grid
Code Block | ||||
---|---|---|---|---|
| ||||
pjs.defineDisplay("display", "mydisplay.json"); var records = pjs.query("SELECT * FROM ORDERS"); display.grid1.replaceRecords(records); |
...
For IBMi database, prior to Profound.js release 5.7.0, the names of the columns in the result set returned by pjs.query() and other Profound.js APIs are always in lowercase. Since Profound.js release 5.7.0, you can use either configuration keepColNameCase (in effect for the entire instance ) or API pjs.setOptions() (in effect for the current Profound.js session) to instruct pjs.query() and other SQL APIs to keep the case of the columns names as is, as resulted from the SQL statement. For backward compatibility and to avoid breaking current user code, the default behavior is the "old" behavior; that is, the column names are always in lowercase.
...