Versions Compared

Key

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


Profound.js Connector provides much of the same Record Level Access support when working with non IBM i database objects.  Below is a list of the functions that are not supported with these other database:

...

js provides simple apis to access your data on any of the supported databases, without having to write a lot of sql.

Some of the capabilities include:

  • Read/Write/Update/Delete capabilities
  • Fetching records sequentially in either direction
  • Fetching records by key
  • Multi-part keys
  • Use of data structures to fetch and update data
  • Use of global record format fields to fetch and update data
  • Options for qualified and non-qualified access
  • Key data structures
  • Updating fields selectively
  • Top-down transactional I/O without requiring callbacks
  • Access to INFDS (Information Data Structure) values are available
  • Prepared statements
  • Immediately executed statements
  • Parameter binding
  • Custom connection attributes
  • Remote connections

For more information about RLA capabilities, see Record Level Access API.

 

To begin using RLA/SQL functions within your pjs programs:

Create the DbDefn module which enables you to use RLA functions in lieu of writing a lot of sql

 

 

To create a module we need to be able to name and describe some key parts of that table.

...

  1. Important notes:
    1. The file name must end with .DbDefn.js
    2. The first part of the name is how your pjs program will reference it :: "product"

 

Below is a simple table named PRODUCT that is keyed/ordered by a field called PRID.

 

 

is a file named: product.DbDefn.js and put it anywhere under the modules folder.  You will likely want to further organize these.

Code Block
module.exports = {
  useSQL: true,
  dbObject: "product",
  format: "product",
  uniqueKey: [
    { field: "prid", ascending: true }
  ]
}

 

 

 

 

If you have an existing pjs program you don't have to do anything to it, as long as it does not use any of the non supported functions.

Here is a simple pjs program that reads all the records of a table.

...


...

Below are not supported:

  • Override database file is not supported
  • Using files with level checking is not supported
  • QTEMP library/schema is not supported
  • Record Locking is not supported
  • Fetching records by relative record number is not supported
  • Commit and Rollback is not supported
  • Some of the INFDS (Information Data Structure) fields are not supported


Child pages (Children Display)