Child pages
  • QBColumn

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)
QBFunction
Table Cell (td)
abs
Create abs(column) expression
Table Row (tr)
Table Cell (td)
QBSort
Table Cell (td)
asc
Create an ascending sort expression
Table Row (tr)
Table Cell (td)
QBAggregate
Table Cell (td)
avg
Create an aggregate expression.
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
bit_length
Create bit_length(column) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
ceil
Create ceil(column) expression
Table Row (tr)
Table Cell (td)
QBAggregate
Table Cell (td)
count
Create an aggregate expression.
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
day
Extract day from date
Table Row (tr)
Table Cell (td)
QBSort
Table Cell (td)
desc
Create an descending sort expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
floor
Create floor(column) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
hour
Extract hour from date
Table Row (tr)
Table Cell (td)
QBCondition
Table Cell (td)
isNull
Compare column with null.
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
len
Create length(column) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
lower
Create lower(column) expression
Table Row (tr)
Table Cell (td)
QBAggregate
Table Cell (td)
max
Create an aggregate expression.
Table Row (tr)
Table Cell (td)
QBAggregate
Table Cell (td)
min
Create an aggregate expression.
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
minute
Extract minute from date
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
month
Extract month from date
Table Row (tr)
Table Cell (td)
QBColumn
Table Cell (td)
not
Create a negated condition.
Table Row (tr)
Table Cell (td)
QBTableClause
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.
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
round
Create round(column) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
second
Extract second from date
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
sqrt
Create sqrt(column) expression
Table Row (tr)
Table Cell (td)
QBAggregate
Table Cell (td)
sum
Create an aggregate expression.
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
trim
Create trim(column) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
upper
Create upper(column) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
year
Extract year from date



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)
QBCondition
Table Cell (td)
between(value1, value2)
Compare column to a range of 2 values or other columns.
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
cast(type)
Create cast(column, type) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
concat(arg)
Concatename with value
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
divide(arg)
Divide by value
Table Row (tr)
Table Cell (td)
QBCondition
Table Cell (td)
eq(value)
Compare column with a value or another column.
Table Row (tr)
Table Cell (td)
QBCondition
Table Cell (td)
ge(value)
Compare column with a value or another column.
Table Row (tr)
Table Cell (td)
QBCondition
Table Cell (td)
gt(value)
Compare column with a value or another column.
Table Row (tr)
Table Cell (td)
QBCondition
Table Cell (td)
isin(query)
Compare column with subquery result.
Table Row (tr)
Table Cell (td)
QBCondition
Table Cell (td)
isin(values)
Compare column with values.
Table Row (tr)
Table Cell (td)
QBCondition
Table Cell (td)
le(value)
Compare column with a value or another column.
Table Row (tr)
Table Cell (td)
QBCondition
Table Cell (td)
like(pattern)
Compare column with a value or another column.
Table Row (tr)
Table Cell (td)
QBCondition
Table Cell (td)
like(pattern, escape)
Compare column with a value or another column.
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
locate(arg)
Create locate(arg) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
locate(arg, start)
Create locate(arg, start) expression
Table Row (tr)
Table Cell (td)
QBCondition
Table Cell (td)
lt(value)
Compare column with a value or another column.
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
minus(arg)
Subtract value
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
mod(arg)
Create mod(arg) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
multiply(arg)
Multiply with value
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
nullif(arg)
Create nullif(arg) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
plus(arg)
Add up value
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
substring(pos)
Create substring(pos) expression
Table Row (tr)
Table Cell (td)
QBFunction
Table Cell (td)
substring(pos, len)
Create substring(pos, len) 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)
idabs
Table Row (tr)
idname
Table Cell (td)

abs

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create abs(column) expression
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.custname.abs)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idasc
Table Row (tr)
idname
Table Cell (td)

asc

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create an ascending sort expression
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBSort
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')
query.sort
.add(query.joins.orders_to_order_details.columns.quantity.asc)
.add(query.columns.companyid)
foundset.loadRecords(query)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idavg
Table Row (tr)
idname
Table Cell (td)

avg

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create an aggregate expression.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBAggregate
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')
	query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries
	.root.having.add(query.joins.orders_to_order_details.columns.quantity.avg.eq(1))
	foundset.loadRecords(query)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idbit_length
Table Row (tr)
idname
Table Cell (td)

bit_length

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create bit_length(column) expression
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.custname.bit_length)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idceil
Table Row (tr)
idname
Table Cell (td)

ceil

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create ceil(column) expression
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.mycol.ceil)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idcount
Table Row (tr)
idname
Table Cell (td)

count

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create an aggregate expression.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBAggregate
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')
	query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries
	.root.having.add(query.joins.orders_to_order_details.columns.quantity.count.eq(0))
	foundset.loadRecords(query)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idday
Table Row (tr)
idname
Table Cell (td)

day

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Extract day from date
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.mydatecol.day)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
iddesc
Table Row (tr)
idname
Table Cell (td)

desc

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create an descending sort expression
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBSort
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')
query.sort
.add(query.joins.orders_to_order_details.columns.quantity.desc)
.add(query.columns.companyid)
foundset.loadRecords(query)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idfloor
Table Row (tr)
idname
Table Cell (td)

floor

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create floor(column) expression
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.mycol.floor)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idhour
Table Row (tr)
idname
Table Cell (td)

hour

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Extract hour from date
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.mydatecol.hour)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idisNull
Table Row (tr)
idname
Table Cell (td)

isNull

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Compare column with null.
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.where.add(query.columns.flag.isNull)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idlen
Table Row (tr)
idname
Table Cell (td)

len

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create length(column) expression
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.custname.len)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idlower
Table Row (tr)
idname
Table Cell (td)

lower

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create lower(column) expression
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.custname.lower)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idmax
Table Row (tr)
idname
Table Cell (td)

max

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create an aggregate expression.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBAggregate
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')
	query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries
	.root.having.add(query.joins.orders_to_order_details.columns.quantity.count.max(10))
	foundset.loadRecords(query)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idmin
Table Row (tr)
idname
Table Cell (td)

min

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create an aggregate expression.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBAggregate
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')
	query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries
	.root.having.add(query.joins.orders_to_order_details.columns.quantity.count.min(10))
	foundset.loadRecords(query)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idminute
Table Row (tr)
idname
Table Cell (td)

minute

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Extract minute from date
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.mydatecol.minute)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idmonth
Table Row (tr)
idname
Table Cell (td)

month

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Extract month from date
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.mydatecol.month)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idnot
Table Row (tr)
idname
Table Cell (td)

not

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create a negated condition.
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.where.add(query.columns.flag.not.eq(1))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
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
QBTableClause
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)
 
Table Body (tbody)
idround
Table Row (tr)
idname
Table Cell (td)

round

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create round(column) expression
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.mycol.round)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idsecond
Table Row (tr)
idname
Table Cell (td)

second

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Extract second from date
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.mydatecol.second)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idsqrt
Table Row (tr)
idname
Table Cell (td)

sqrt

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create sqrt(column) expression
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.custname.sqrt)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idsum
Table Row (tr)
idname
Table Cell (td)

sum

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create an aggregate expression.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBAggregate
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')
	query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries
	.root.having.add(query.joins.orders_to_order_details.columns.quantity.count.sum(10))
	foundset.loadRecords(query)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idtrim
Table Row (tr)
idname
Table Cell (td)

trim

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create trim(column) expression
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.custname.trim)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idupper
Table Row (tr)
idname
Table Cell (td)

upper

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create upper(column) expression
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.custname.upper)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idyear
Table Row (tr)
idname
Table Cell (td)

year

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Extract year from date
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.mydatecol.year)
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)
idbetween-Object_Object
Table Row (tr)
idname
Table Cell (td)

between

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBCondition
Span
stylefont-weight: bold;
between
Span
(value1, value2)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Compare column to a range of 2 values or other columns.
Table Row (tr)
idprs
Table Cell (td)

Parameters

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

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.where.add(query.columns.flag.between(0, 5))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idcast-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
(type)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create cast(column, type) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} type - string 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
query.result.add(query.columns.mycol.cast(QUERY_COLUMN_TYPES.TYPE_INTEGER))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idconcat-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
(arg)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Concatename with value
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg - valeu to concatenate with
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.firstname.concat(' ').concat(query.columns.lastname))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
iddivide-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
(arg)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Divide by value
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg - nr to divide by
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.mycol.divide(2))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
ideq-Object
Table Row (tr)
idname
Table Cell (td)

eq

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBCondition
Span
stylefont-weight: bold;
eq
Span
(value)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Compare column with a value or another column.
Operator: equals
Table Row (tr)
idprs
Table Cell (td)

Parameters

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

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.where.add(query.columns.flag.eq(1))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idge-Object
Table Row (tr)
idname
Table Cell (td)

ge

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBCondition
Span
stylefont-weight: bold;
ge
Span
(value)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Compare column with a value or another column.
Operator: greaterThanOrEqual
Table Row (tr)
idprs
Table Cell (td)

Parameters

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

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.where.add(query.columns.flag.ge(2))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgt-Object
Table Row (tr)
idname
Table Cell (td)

gt

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBCondition
Span
stylefont-weight: bold;
gt
Span
(value)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Compare column with a value or another column.
Operator: greaterThan
Table Row (tr)
idprs
Table Cell (td)

Parameters

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

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.where.add(query.columns.flag.gt(0))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idisin-QBPart
Table Row (tr)
idname
Table Cell (td)

isin

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBCondition
Span
stylefont-weight: bold;
isin
Span
(query)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Compare column with subquery result.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{QBPart} query - subquery
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.where.add(query.columns.flag.isin(query2))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idisin-ObjectArray
Table Row (tr)
idname
Table Cell (td)

isin

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBCondition
Span
stylefont-weight: bold;
isin
Span
(values)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Compare column with values.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object[]} values - array of values
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.where.add(query.columns.flag.isin([1, 5, 99]))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idle-Object
Table Row (tr)
idname
Table Cell (td)

le

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBCondition
Span
stylefont-weight: bold;
le
Span
(value)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Compare column with a value or another column.
Operator: lessThanOrEqual
Table Row (tr)
idprs
Table Cell (td)

Parameters

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

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.where.add(query.columns.flag.le(2))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idlike-String
Table Row (tr)
idname
Table Cell (td)

like

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBCondition
Span
stylefont-weight: bold;
like
Span
(pattern)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Compare column with a value or another column.
Operator: like
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} pattern - the string value of the pattern
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.where.add(query.columns.companyname.like('Serv%'))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idlike-String_String
Table Row (tr)
idname
Table Cell (td)

like

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBCondition
Span
stylefont-weight: bold;
like
Span
(pattern, escape)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Compare column with a value or another column.
Operator: like, with escape character
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} pattern - the string value of the pattern
{String} escape - the escape char
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.where.add(query.columns.companyname.like('X_%', '_'))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idlocate-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
(arg)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create locate(arg) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg - string to locate
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.mycol.locate('sample'))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idlocate-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
(arg, start)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create locate(arg, start) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg - string to locate
{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
query.result.add(query.columns.mycol.locate('sample', 5))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idlt-Object
Table Row (tr)
idname
Table Cell (td)

lt

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBCondition
Span
stylefont-weight: bold;
lt
Span
(value)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Compare column with a value or another column.
Operator: lessThan
Table Row (tr)
idprs
Table Cell (td)

Parameters

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

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.where.add(query.columns.flag.lt(99))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idminus-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
(arg)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Subtract value
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg - nr to subtract
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.mycol.minus(2))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idmod-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
(arg)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create mod(arg) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

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

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.mycol.mod(2))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idmultiply-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
(arg)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Multiply with value
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg - nr to multiply with
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.mycol.multiply(2))
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
(arg)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create nullif(arg) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

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

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.mycol.nullif('none'))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idplus-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
(arg)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Add up value
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} arg - nr to add
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.mycol.plus(2))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idsubstring-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
(pos)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create substring(pos) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Number} 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
query.result.add(query.columns.mycol.substring(3))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idsubstring-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
(pos, len)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create substring(pos, len) expression
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Number} pos
{Number} len
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.mycol.substring(3, 2))
Table Row (tr)
classlastDetailRow
Table Cell (td)