var query =datasources.db.example_data.person.createSelect();query.where.add(query.joins.person_to_parent.joins.person_to_parent.columns.name.eq('john'))foundset.loadRecords(query)
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.mynum.abs.eq(query.functions.abs(myval)))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.shipname.bit_length.eq(query.functions.bit_length('Sample')))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.result.add(query.functions.cast("22",QUERY_COLUMN_TYPES.TYPE_INTEGER)).add(query.columns.amt_discount.cast(QUERY_COLUMN_TYPES.TYPE_STRING));
application.output(databaseManager.getDataSetByQuery(query,1).getAsHTML())
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.mynumcol.ceil.eq(query.functions.ceil(myvar))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.mycol.coalesce('defval').eq(query.functions.coalesce(myvar,'defval'))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.mydatecol.day.eq(query.functions.day(mydatevar))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.mynumcol.divide(2).eq(query.functions.divide(myvar,2))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.mynumcol.floor.eq(query.functions.floor(myvar))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.mydatecol.hour.eq(query.functions.hour(mydatevar))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.shipname.len.eq(query.functions.len('Sample')))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.shipname.locate('amp').eq(query.functions.locate('amp','Sample')))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.shipname.locate('amp',1).eq(query.functions.locate('amp','Sample',1)))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.shipname.lower.eq(query.functions.lower('Sample')))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.mynumcol.minus(2).eq(query.functions.minus(myvar,2))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.mydatecol.minute.eq(query.functions.minute(mydatevar))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.mynumcol.mod(2).eq(query.functions.mod(myvar,2))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.mydatecol.month.eq(query.functions.month(mydatevar))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.mynumcol.multiply(2).eq(query.functions.multiply(myvar,2))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.shipname.nullif('none').eq(query.functions.nullif('Sample','none')))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.mynumcol.plus(2).eq(query.functions.plus(myvar,2))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.mynumcol.round.eq(query.functions.round(myvar))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.mynumcol.round.eq(query.functions.round(myvar,1))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.mydatecol.second.eq(query.functions.second(mydatevar))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.mynum.sqrt.eq(query.functions.sqrt(myval)))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.shipname.substring(3).eq(query.functions.substring('Sample',3)))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.shipname.substring(3,2).eq(query.functions.substring('Sample',3,2)))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.shipname.trim.eq(query.functions.trim('Sample')))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();// show shipname but remove trailing spacequery.result.add(query.functions.trim('trailing',' ','from',query.columns.shipname));foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.shipname.upper.eq(query.functions.upper('Sample')))foundset.loadRecords(query);
var query =datasources.db.example_data.orders.createSelect();query.where.add(query.columns.mydatecol.year.eq(query.functions.year(mydatevar))foundset.loadRecords(query);