Note |
---|
|
As of July 25th, 2023, there is a content freeze on this page. |
The pjs.data APIs allows for interaction with database objects without having to write pure SQL syntax. Which make using them simpler and more robust.
...
Code Block |
---|
language | js |
---|
title | Compare pjs.query and pjs.data.get |
---|
|
// These 2 lines will return the exact same results
let rcds1 = pjs.query("select * from customers");
let rcds2 = pjs.data.get("customers");
// Here you can see some differences on how to get records with criteria. Both will return the exact same result.
const parm1 = "USA";
const strName = "B"
let rcds3 = pjs.query("select * from customers where country = ? and customerName > ?", [parm1, strName]);
let filter = [
pjs.data.createCondition("country", "=", parm1),
pjs.data.createCondition("customerName", ">", strName)
];
let rcds4 = pjs.data.get("customers", filter);
|
Child pages (Children Display) |
---|
|