Child pages
  • QBFunctions

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Div
styledisplay:none

DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.

Div
iddescription



HTML Table
id
classservoy sSummary
Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Property Summary
Table Row (tr)
Table Cell (td)
QBSelect
Table Cell (td)
parent
Get query builder parent table clause, this may be a query or a join clause.
Table Row (tr)
Table Cell (td)
QBSelect
Table Cell (td)
root
Get query builder parent.



HTML Table
id
classservoy sSummary
Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
abs(value)
Create abs(column) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
bit_length(value)
Create bit_length(column) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
cast(value, type)
Cast using type name.
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
ceil(arg)
Create ceil(column) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
coalesce(args)
Create year(date) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
concat(arg1, arg2)
Create concat(args, arg2) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
day(arg)
Create day(date) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
divide(arg1, arg2)
Create divide(args, arg2) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
floor(arg)
Create floor(column) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
hour(arg)
Create hour(date) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
len(value)
Create length(column) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
locate(string1, string2)
Create locate(str1, str2) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
locate(string1, string2, start)
Create locate(str1, str2, start) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
lower(value)
Create lower(column) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
minus(arg1, arg2)
Create minus(args, arg2) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
minute(arg)
Create minute(date) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
mod(dividend, divisor)
Create mod(dividend, divisor) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
month(arg)
Create month(date) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
multiply(arg1, arg2)
Create multiply(args, arg2) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
nullif(arg1)
Create nullif(arg1, arg2) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
plus(arg1, arg2)
Create plus(args, arg2) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
round(arg)
Create round(column) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
second(arg)
Create second(date) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
sqrt(value)
Create sqrt(column) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
substring(arg, pos)
Create substring(column, pos) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
substring(arg, pos, len)
Create substring(column, pos, len) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
trim(value)
Create trim(column) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
upper(value)
Create upper(column) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
year(arg)
Create year(date) expression



HTML Table
idproperty
classservoy sDetail
Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Property Details
Table Body (tbody)
idparent
Table Row (tr)
idname
Table Cell (td)

parent

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get query builder parent table clause, this may be a query or a join clause.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBSelect
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/person>} */
	var query = databaseManager.createSelect('db:/example_data/person')
	query.where.add(query.joins.person_to_parent.joins.person_to_parent.columns.name.eq('john'))
	foundset.loadRecords(query)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idroot
Table Row (tr)
idname
Table Cell (td)

root

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get query builder parent.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBSelect
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/order_details>} */
	var subquery = databaseManager.createSelect('db:/example_data/order_details')

 /** @type {QBSelect<db:/example_data/orders>} */
	var query = databaseManager.createSelect('db:/example_data/orders')
	query.where.add(query
		.or
			.add(query.columns.order_id.not.isin([1, 2, 3]))

			.add(query.exists(
					subquery.where.add(subquery.columns.orderid.eq(query.columns.order_id)).root
			))
		)

	foundset.loadRecords(query)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 



HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Details
Table Body (tbody)
idabs-Object
Table Row (tr)
idname
Table Cell (td)

abs

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
abs
Span
(value)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create abs(column) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} value
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.mynum.abs.eq(query.functions.abs(myval)))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idbit_length-Object
Table Row (tr)
idname
Table Cell (td)

bit_length

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
bit_length
Span
(value)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create bit_length(column) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} value
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.shipname.bit_length.eq(query.functions.bit_length('Sample')))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idcast-Object_String
Table Row (tr)
idname
Table Cell (td)

cast

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
cast
Span
(value, type)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Cast using type name.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} value - object to cast
{String} type - type see QUERY_COLUMN_TYPES
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
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())
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idceil-Object
Table Row (tr)
idname
Table Cell (td)

ceil

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
ceil
Span
(arg)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create ceil(column) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg - number object
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.mynumcol.ceil.eq(query.functions.ceil(myvar))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idcoalesce-ObjectArray
Table Row (tr)
idname
Table Cell (td)

coalesce

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
coalesce
Span
(args)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create year(date) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object...} args - arguments to coalesce
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.mycol.coalesce('defval').eq(query.functions.coalesce(myvar, 'defval'))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idconcat-Object_Object
Table Row (tr)
idname
Table Cell (td)

concat

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
concat
Span
(arg1, arg2)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create concat(args, arg2) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg1
{Object} arg2
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/udm/contacts>} */
	var query = databaseManager.createSelect('db:/udm/contacts') //$NON-NLS-1$
	query.result.add(query.columns.name_first.concat(' ').concat(query.columns.name_last))
	var ds = databaseManager.getDataSetByQuery(query, -1)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idday-Object
Table Row (tr)
idname
Table Cell (td)

day

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
day
Span
(arg)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create day(date) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg - date object
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.mydatecol.day.eq(query.functions.day(mydatevar))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
iddivide-Object_Object
Table Row (tr)
idname
Table Cell (td)

divide

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
divide
Span
(arg1, arg2)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create divide(args, arg2) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg1
{Object} arg2
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.mynumcol.divide(2).eq(query.functions.divide(myvar, 2))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idfloor-Object
Table Row (tr)
idname
Table Cell (td)

floor

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
floor
Span
(arg)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create floor(column) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg - number object
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.mynumcol.floor.eq(query.functions.floor(myvar))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idhour-Object
Table Row (tr)
idname
Table Cell (td)

hour

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
hour
Span
(arg)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create hour(date) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg - date object
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.mydatecol.hour.eq(query.functions.hour(mydatevar))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idlen-Object
Table Row (tr)
idname
Table Cell (td)

len

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
len
Span
(value)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create length(column) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} value
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.shipname.len.eq(query.functions.len('Sample')))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idlocate-Object_Object
Table Row (tr)
idname
Table Cell (td)

locate

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
locate
Span
(string1, string2)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create locate(str1, str2) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} string1 - string to locate
{Object} string2 - string to search in
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.shipname.locate('amp').eq(query.functions.locate('Sample', 'amp')))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idlocate-Object_Object_Number
Table Row (tr)
idname
Table Cell (td)

locate

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
locate
Span
(string1, string2, start)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create locate(str1, str2, start) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} string1 - string to locate
{Object} string2 - string to search in
{Number} start - start pos
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.shipname.locate('amp', 1).eq(query.functions.locate('Sample', 'amp', 1)))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idlower-Object
Table Row (tr)
idname
Table Cell (td)

lower

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
lower
Span
(value)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create lower(column) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} value
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.shipname.lower.eq(query.functions.lower('Sample')))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idminus-Object_Object
Table Row (tr)
idname
Table Cell (td)

minus

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
minus
Span
(arg1, arg2)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create minus(args, arg2) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg1
{Object} arg2
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.mynumcol.minus(2).eq(query.functions.minus(myvar, 2))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idminute-Object
Table Row (tr)
idname
Table Cell (td)

minute

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
minute
Span
(arg)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create minute(date) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg - date object
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.mydatecol.minute.eq(query.functions.minute(mydatevar))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idmod-Object_Object
Table Row (tr)
idname
Table Cell (td)

mod

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
mod
Span
(dividend, divisor)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create mod(dividend, divisor) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} dividend
{Object} divisor
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.mynumcol.mod(2).eq(query.functions.mod(myvar, 2))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idmonth-Object
Table Row (tr)
idname
Table Cell (td)

month

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
month
Span
(arg)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create month(date) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg - date object
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.mydatecol.month.eq(query.functions.month(mydatevar))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idmultiply-Object_Object
Table Row (tr)
idname
Table Cell (td)

multiply

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
multiply
Span
(arg1, arg2)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create multiply(args, arg2) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg1
{Object} arg2
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.mynumcol.multiply(2).eq(query.functions.multiply(myvar, 2))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idnullif-Object
Table Row (tr)
idname
Table Cell (td)

nullif

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
nullif
Span
(arg1)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create nullif(arg1, arg2) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg1
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.shipname.nullif('none').eq(query.functions.nullif('Sample', 'none')))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idplus-Object_Object
Table Row (tr)
idname
Table Cell (td)

plus

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
plus
Span
(arg1, arg2)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create plus(args, arg2) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg1
{Object} arg2
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.mynumcol.plus(2).eq(query.functions.plus(myvar, 2))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idround-Object
Table Row (tr)
idname
Table Cell (td)

round

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
round
Span
(arg)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create round(column) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg - number object
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.mynumcol.round.eq(query.functions.round(myvar))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idsecond-Object
Table Row (tr)
idname
Table Cell (td)

second

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
second
Span
(arg)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create second(date) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg - date object
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.mydatecol.second.eq(query.functions.second(mydatevar))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idsqrt-Object
Table Row (tr)
idname
Table Cell (td)

sqrt

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
sqrt
Span
(value)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create sqrt(column) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} value
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.mynum.sqrt.eq(query.functions.sqrt(myval)))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idsubstring-Object_Number
Table Row (tr)
idname
Table Cell (td)

substring

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
substring
Span
(arg, pos)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create substring(column, pos) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg - column name
{Number} pos - position
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.shipname.substring(3).eq(query.functions.substring('Sample', 3)))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idsubstring-Object_Number_Number
Table Row (tr)
idname
Table Cell (td)

substring

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
substring
Span
(arg, pos, len)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create substring(column, pos, len) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg - column name
{Number} pos - position
{Number} len - length
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.shipname.substring(3, 2).eq(query.functions.substring('Sample', 3, 2)))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idtrim-Object
Table Row (tr)
idname
Table Cell (td)

trim

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
trim
Span
(value)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create trim(column) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} value
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.shipname.trim.eq(query.functions.trim('Sample')))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idupper-Object
Table Row (tr)
idname
Table Cell (td)

upper

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
upper
Span
(value)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create upper(column) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} value
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.shipname.upper.eq(query.functions.upper('Sample')))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idyear-Object
Table Row (tr)
idname
Table Cell (td)

year

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBFunction
Span
stylefont-weight: bold;
year
Span
(arg)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create year(date) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg - date object
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunction
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.mydatecol.year.eq(query.functions.year(mydatevar))
foundset.loadRecords(query);
Table Row (tr)
classlastDetailRow
Table Cell (td)