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.



Property Summary
QBSelect
parent
Get query builder parent table clause, this may be a query or a join clause.
QBSelect
root
Get query builder parent.



Method Summary
QBSorts
add(columnSortAsc)
Ad an ascending sorting on a column to the query sort.
QBSorts
add(functionSortAsc)
Ad an ascending sorting on a column to the query sort.
QBSorts
add(sort)
Ad a sorting on a column to the query sort.
QBSorts
addPk()
Add the tables' primary pk columns in alphabetical order to the query sort.
QBSorts
clear()
Clear the sorting clause for the query.



Property Details

parent

Get query builder parent table clause, this may be a query or a join clause.

Returns

QBSelect

Sample

/** @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)
 

root

Get query builder parent.

Returns

QBSelect

Sample

/** @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)
 



Method Details

add

QBSorts
add
(columnSortAsc)
Ad an ascending sorting on a column to the query sort.

Parameters

{QBColumn} columnSortAsc - column to sort by

Returns

QBSorts

Sample

query.sort.add(query.columns.orderid)
 

add

QBSorts
add
(functionSortAsc)
Ad an ascending sorting on a column to the query sort.

Parameters

{QBFunction} functionSortAsc - function to add

Returns

QBSorts

Sample

query.sort.add(query.columns.orderid)
 

add

QBSorts
add
(sort)
Ad a sorting on a column to the query sort.

Parameters

{QBSort} sort - the sort to add

Returns

QBSorts

Sample

query.sort.add(query.columns.orderid.desc)
 

addPk

QBSorts
addPk
()
Add the tables' primary pk columns in alphabetical order to the query sort.

Returns

QBSorts

Sample

query.sort.addPk()
 

clear

QBSorts
clear
()
Clear the sorting clause for the query.

Returns

QBSorts

Sample

query.sort.clear()