Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Content Freeze

As of July 25th, 2023, there is a content freeze on this page.

This API is used to create a condition object to be used with other pjs.data APIs, such as get, update and delete.

Parameters

  1. (String) Database column name.
  2. (String) Criteria operator, such as: =, >, >=, <, is null, is not null
  3. Value - The value to that will be injected in the condition
    When using "is null", no value is needed
    when using "is not null", no value is needed
Examples
let c1 = pjs.data.createCondition("column1", "=", "abc");

let c2 = pjs.data.createCondition("column1", ">=", "aaa");

let c3 = pjs.data.createCondition("column1", "<=", "abc");

let c4 = pjs.data.createCondition("column1", "is not null");

let c5 = pjs.data.createCondition("column1", "is null");

let nowDate = new Date();
let beforeDate = new Date(nowDate .setFullYear(nowDate .getFullYear()-1));
let c6 = pjs.data.createCondition("coldate", "<=", beforeDate);



  • No labels