pjs.data.get()
This API is used to retrieve records from a database object.
Parameters
Database Connection Definition:
(Object / Optional / Omittable) - A database connection definition object returned from pjs.getDB(). If not passed, the default database connection will be used.Query options
(Object / Optional / Omittable) - Pass an object with statement attributes to set before running the query.Database Object:
(String) Database object name. The name can be qualified with a library/schema. If not qualified the pathlist will be used to resolve the object.
--or--
(String) DbDefn file name (with the extension). The file can be qualified with a directory. If not qualified the pathlist will be used to resolve the object.
--or--
(Object) DbDefn instance.Filter:
Single condition - created using pjs.data.createCondition API
--or--
Array of conditions - created using pjs.data.createCondition API
--or--
(String) – SQL syntax, because pjs.data.createCondition does support every possible way of conditioningLimit: (Integer)
The maximum number of records to retrieve (pass null to include all records)Skip: (Integer)
The number of records to skip (pass null to not skip any records). Using Limit and Skip are useful when loading a page of records at a timeOrder By:
(Array of string) - An array of strings that will override the default order by, which is based on the tables primary key.
--or--
(String) - SQL syntax that will be used as the order by clause.Select fields:
(Array of Strings) - An array of all the columns to be returned. The default is to select all columns.