/
pjs.data.get()

pjs.data.get()

 

This API is used to retrieve records from a database object.

Parameters

  1. 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.

  2. Query options
    (Object / Optional / Omittable) - Pass an object with statement attributes to set before running the query.

  3. 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.


  4. 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 conditioning


  5. Limit: (Integer)
    The maximum number of records to retrieve (pass null to include all records)


  6. 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 time


  7. Order 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. 


  8. Select fields:
    (Array of Strings) - An array of all the columns to be returned.  The default is to select all columns.