close
QueryBuildRange qbr;
 
---To set the value we usually follow as below mentioned code
qbr.value(“Our Value”);
qbr.value(queryValue(“Our Value”));
 
--We can set the value using SysQuery methods like mentioned below
qbr.value(SysQuery::value(“Our Value”));
qbr.value(SysQuery::valueLike(“Our Value”));
qbr.value(SysQuery::valueNot(“Our Value”));
 
---For logical NOT
qbr.value(SysQuery::valueNot(“Our Value”));
 
---To retrive all records
in usual way we can give like empty (” “) but using sysquery class
qbr.value(SysQuery::valueUnlimited());
 
---To retrive Null records
qbr.value(SysQuery::valueEmptyString());
 
---To retrive Not Null records
qbr.value(SysQuery::valueNotEmptyString());
 
---To give range
usually we add qbr.value(fromDate,toDate)  but using sysQuery
qbr.value(SysQuery::range(fromDate,toDate);
The method will add the dots (‘..’)  like this
 
---To find total number of records available in the resulting query
info(strFmt(“%1”,SysQuery::countTotal(queryRun)));
 
---To find total number of Datasource available in the resulting query
info(strFmt(“%1”,SysQuery::countLoops(queryRun)));
 
--- For Datasource and Range creation
SysQuery::findOrCreateRange(parameter);
SysQuery::findOrCreateDataSource(parameter);
SysQuery::findOrCreateDataSourceByName(parameter);
 
Example:
 public void init()
        {
            super();
            TableId inventTableId =  tableNum(InventTable);
           // FieldId shortageFieldId = fieldNum(InventTable, THK_Shortage);
            this.queryBuildDataSource().addRange(fieldNum(DGS_LogsTable, FieldTableId)).value(int2Str(inventTableId));
            this.queryBuildDataSource().addRange(fieldNum(DGS_LogsTable, FieldId)).value(SysQuery::valueLike('shortage'));
            this.queryBuildDataSource().addSortField(fieldnum(DGS_LogsTable, ModifiedDT),SortOrder::Descending);
        }
arrow
arrow
    全站熱搜

    lionlionchopper 發表在 痞客邦 留言(0) 人氣()