Child pages
  • QBWhereCondition

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Rev: 1381948887907

...

HTML Table
id
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Property Summary
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String[]
Table Cell (td)
#conditionnamesconditionnames
Get the names for the conditions in the query where-clause.
tbody
Table Row (tr)
Table Cell (td)
QBTableClause
Table Cell (td)
#parentparent
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)
#rootroot
Get query builder parent.

HTML Table
id
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

tbody
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Row (tr)
Table Cell (td)
QBWhereCondition
Table Cell (td)
#addadd(condition)
Add a condition to the AND or OR condition list.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
QBWhereCondition
Table Cell (td)
#addadd(name, condition)
Add a named condition to the AND or OR condition list.
Table Row (tr)
Table Cell (td)
QBWhereCondition
Table Cell (td)
#clearclear()
Clear the conditions in the query where-clause.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
QBCondition
Table Cell (td)
#getConditiongetCondition()
Get a named condition in the query where-clause.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
QBWhereCondition
Table Cell (td)
#removeremove()
Remove a named condition from the AND or OR condition list.

HTML Table
idproperty
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Property Details
Table Body (tbody)
idconditionnames
Table Row (tr)
idname
Table Cell (td)
conditionnames
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the names for the conditions in the query where-clause.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
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
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)

HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
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
Add a condition to the AND or OR condition list.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{QBCondition} condition

...

- the condition to add
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
QBWhereCondition
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.where.add(query.columns.orderdate.isNull)

...

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
(name, condition)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Add a named condition to the AND or OR condition list.
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{String} name

...

- the name of the condition
{QBCondition} condition

...

- the condition to add
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
QBWhereCondition
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.where.add("mycond", query.columns.orderdate.isNull)

...

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
Clear the conditions in the query where-clause.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
QBWhereCondition
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.where.clear()

...

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
Get a named condition in the query where-clause.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
QBCondition
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)
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
Remove a named condition from the AND or OR condition list.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
QBWhereCondition
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.where.remove("mycond")

...

Table Row (tr)
classlastDetailRow
Table Cell (td)