Child pages
  • QBWhereCondition

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Divcache
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)
String[]
Table Cell (td)conditionnames
styleindexdisplay: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.

true
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClient

Table Cell (td)
QBTableClause
Table Cell (td)parent
servoy sSummary12%30%58%height: 30px;3Property SummaryGet the names for the conditions in the query where-clause. Table Row (tr)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

idclassservoy sSummary

Colgroup Tag
Col
width80px
Col
Table Head (thead) Table Row (tr)style Table Row (tr)
Table Cell (td)
QBWhereCondition
Table Cell (td)add(condition)
servoy sSummary12%30%58%height: 30px;
Table Head (th)
colspan2
Method Summary
Table Row (tr)
Table Cell (td)
QBWhereCondition
Table Cell (td)add(name, condition)
3Methods SummaryAdd a condition to the AND or OR condition list.Add a named condition to the AND or OR condition list. Table Row (tr)
Table Cell (td)
QBWhereCondition
Table Cell (td)clear()
Table Cell (td)getCondition()
Clear the conditions in the query where-clause. Table Row (tr)
Table Cell (td)
QBCondition
Table Row (tr)
Table Cell (td)
QBWhereCondition
Table Cell (td)remove()
Get a named condition in the query where-clause.Remove a named condition from the AND or OR condition list.table

id

propertyclass Colgroup Tag Colcolspanservoy sDetail2width100%

Col
Table Head (thead) Table Row (tr)styleheight:30px; Table Head (th)colspan2Property Details Table Body (tbody)ididconditionnames Table Row (tr)nametdid

conditionnames

Table Row (tr)des Table Cell (td) DivclasssIndentGet the names for the conditions in the query where-clause. Table Row (tr)idret

Table Cell (td)

Returns

div
Table Row (tr)
idname
Table Cell (td)

parent

Table Row (tr)
iddes
Table Cell (td) Div
classsIndent
sIndentclients

classsIndent
String[]
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var q = foundset.getQuery()
for (var c in q.where.conditionnames)
{
	var cond = q.where.getCondition(c)
}
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idparent

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
parentname

parent

dessIndentGet query builder parent table clause, this may be a query or a join clause.
Table Row (tr)idtdret

Returns

divsIndentclients

classtd

Supported Clients

sIndent
QBTableClause Table Row (tr)
idsam
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
SmartClient,WebClient,NGClientsam

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)
sIdentjavascriptlastDetailRow&nbsp;rootname

root

dessIndentGet query builder parent.
Table Row (tr)idtdret

Returns

divsIndentclients

classid

Supported Clients

sIndent
QBSelect Table Row (tr)SmartClient,WebClient,NGClientsam

Table Cell (td)

Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Details
Table Body (tbody)
idadd-QBCondition
Table Row (tr)
idname
Table Cell (td)

add

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBWhereCondition
Span
stylefont-weight: bold;
add
Span
(condition)
Table Row (tr)
iddes
Table Cell (td) Div
classsIndent

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
sIdentjavascriptlastDetailRow&nbsp;

functionservoy sDetail2100%height:30px2Methods Detailsaddname

add(condition)

dessIndentAdd a condition to the AND or OR condition list.
Table Row (tr)idprstd

Parameters

Divclass

sIndent{QBCondition} condition - the condition to add Table Row (tr)idret

Table Cell (td)

Returns

divsIndentclients

classid

Supported Clients

sIndent
QBWhereCondition Table Row (tr)SmartClient,WebClient,NGClientsam

Table Cell (td)

Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idadd-String_QBCondition
Table Row (tr)
idname
Table Cell (td)

add

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBWhereCondition
Span
stylefont-weight: bold;
add
Span

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders')
query.where.add(query.columns.orderdate.isNull)
sIdentjavascriptlastDetailRow&nbsp;addname

add(name, condition)

Table Row (tr)id Table Cell (td) Divclass

dessIndentAdd a named condition to the AND or OR condition list. Table Row (tr)idtdprs

Parameters

div

classsIndent{String} name - the name of the condition
{QBCondition} condition - the condition to add Table Row (tr)idtdret

Returns

divsIndentclients

classtd

Supported Clients

sIndent
QBWhereCondition Table Row (tr)
idsam
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idclear
Table Row (tr)
idname
Table Cell (td)

clear

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBWhereCondition
Span
stylefont-weight: bold;
clear
Span
()
Table Row (tr)
iddes
Table Cell (td) Div
classsIndent
SmartClient,WebClient,NGClientsam

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders')
query.where.add("mycond", query.columns.orderdate.isNull)
sIdentjavascriptlastDetailRow&nbsp;clearname

clear()

dessIndentClear the conditions in the query where-clause.
Table Row (tr)idtdret

Returns

divsIndentclients

classtd

Supported Clients

sIndent
QBWhereCondition Table Row (tr)
idsam
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetCondition
Table Row (tr)
idname
Table Cell (td)

getCondition

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBCondition
Span
stylefont-weight: bold;
getCondition
Span
()
Table Row (tr)
iddes
Table Cell (td) Div
classsIndent
SmartClient,WebClient,NGClientsam

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders')
query.where.clear()
sIdentjavascriptlastDetailRow&nbsp;getConditionname

getCondition(name)

dessIndentGet a named condition in the query where-clause.prs

Table Row (tr)id

Parameters

sIndentnameThe condition name.
ret

Table Cell (td)

Returns

divsIndentclients

classid

Supported Clients

sIndent
QBCondition Table Row (tr)SmartClient,WebClient,NGClientsam

Table Cell (td)

Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idremove
Table Row (tr)
idname
Table Cell (td)

remove

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBWhereCondition
Span
stylefont-weight: bold;
remove
Span
()
Table Row (tr)
iddes
Table Cell (td) Div
classsIndent

Sample

Div
classsIndent
Code Block
languagejavascript
var q = foundset.getQuery()
for (var c in q.where.conditionnames)
{
	var cond = q.where.getCondition(c)
}
sIdentjavascriptlastDetailRow&nbsp;removename

remove(name)

dessIndentRemove a named condition from the AND or OR condition list.prs

Table Row (tr)

idret
td

Parameters

sIndentnameThe condition name.
ret

Returns

divsIndentclients

classid

Supported Clients

sIndent
QBWhereCondition Table Row (tr)SmartClient,WebClient,NGClientsam

Table Cell (td) Table Row (tr)

classlastDetailRow
Table Cell (td) 

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders')
query.where.remove("mycond")
sIdentjavascriptlastDetailRow&nbsp;