{div:style=display: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.\\ \\ Enter additional information related to this 'class' inside the \{div} macro with 'id=description'{div}
{div:id=description}{div}\\
{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[QBTableClause]{td}{td}[#parent]
Get query builder parent table clause, this may be a query or a join clause.{td}{tr}{tbody}{tbody}{tr}{td}[QBSelect]{td}{td}[#root]
Get query builder parent.{td}{tr}{tbody}{table}\\
{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[QBJoin]{td}{td}[#add]\(dataSource)
Add a join with join type IQueryBuilderJoin#LEFT\_OUTER\_JOIN and no alias for the joining table.{td}{tr}{tbody}{tbody}{tr}{td}[QBJoin]{td}{td}[#add]\(dataSource, joinType)
Add a join with no alias for the joining table.{td}{tr}{tbody}{tbody}{tr}{td}[QBJoin]{td}{td}[#add]\(dataSource, joinType, alias)
Add a join clause from the parent query builder part to the specified data source.{td}{tr}{tbody}{tbody}{tr}{td}[QBJoin]{td}{td}[#add]\(dataSourceOrRelation, alias)
Add a join based on relation or add a manual join.{td}{tr}{tbody}{table}\\
{table:id=property|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=parent}{tr:id=name}{td}h6.parent{td}{tr}{tr:id=des}{td}{div:class=sIndent}
Cache
index
true
refresh
100d
showRefresh
true
id
doc
title
Refresh page
showDate
true
retry
Enable
servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientservoy sSummary12%30%58%height: 30px;3Property SummaryGet query builder parent table clause, this may be a query or a join clause.Get query builder parent.servoy sSummary12%30%58%height: 30px;3Methods SummaryAdd a join clause from the parent query builder part to a derived table based on another query.Add a join clause from the parent query builder part to a derived table based on another query.Add a join with join type IQueryBuilderJoin#LEFT_OUTER_JOIN and no alias for the joining table.Add a join with no alias for the joining table.Add a join clause from the parent query builder part to the specified data source.Add a join based on relation or add a manual join.Remove the joins that are not used anywhere in the query.propertyservoy sDetail2100%height:30px2Property Detailsparentname
parent
dessIndent
Get query builder parent table clause, this may be a query or a join clause.
Add a join clause from the parent query builder part to a derived table based on another query.
prs
Parameters
sIndentsubqueryBuilder ;joinType ;ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowaddname
add(subqueryBuilder, joinType, alias)
dessIndent
Add a join clause from the parent query builder part to a derived table based on another query.
prs
Parameters
sIndentsubqueryBuilder ;joinType ;alias ;ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowaddname
add(dataSource)
dessIndent
Add a join with join type IQueryBuilderJoin#LEFT
\
_OUTER
\
_JOIN and no alias for the joining table.
{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} dataSource -- data source
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[QBJoin]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders')
/** @type {QBJoin<db:/example_data/order_details>} */
var join = query.joins.add('db:/example_data/order_details', JSRelation.INNER_JOIN, 'odetail')
join.on.add(join.columns.orderid.eq(query.columns.orderid))
// to add a join based on a relation, use the relation name
var join2 = query.joins.add('orders_to_customers', 'cust')
query.where.add(join2.columns.customerid.eq(999))
foundset.loadRecords(query)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=add-String_Number}{tr:id=name}{td}h6.add{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[QBJoin]{span}{span:style=font-weight: bold;}add{span}{span}\(dataSource, joinType){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}prs
Parameters
sIndentdataSourcedata sourceret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowaddname
add(dataSource, joinType)
dessIndent
Add a join with no alias for the joining table.
{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} dataSource -- data source
\{[Number]} joinType -- join type, one of JSRelation.LEFT\_OUTER\_JOIN, JSRelation.INNER\_JOIN, JSRelation.RIGHT\_OUTER\_JOIN, JSRelation.FULL\_JOIN
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[QBJoin]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders')
/** @type {QBJoin<db:/example_data/order_details>} */
var join = query.joins.add('db:/example_data/order_details', JSRelation.INNER_JOIN, 'odetail')
join.on.add(join.columns.orderid.eq(query.columns.orderid))
// to add a join based on a relation, use the relation name
var join2 = query.joins.add('orders_to_customers', 'cust')
query.where.add(join2.columns.customerid.eq(999))
foundset.loadRecords(query)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=add-String_Number_String}{tr:id=name}{td}h6.add{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[QBJoin]{span}{span:style=font-weight: bold;}add{span}{span}\(dataSource, joinType, alias){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}prs
Parameters
sIndentdataSourcedata sourcejoinTypejoin type, one of QBJoin.LEFT_OUTER_JOIN, QBJoin.INNER_JOIN, QBJoin.RIGHT_OUTER_JOIN, QBJoin.FULL_JOINret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowaddname
add(dataSource, joinType, alias)
dessIndent
Add a join clause from the parent query builder part to the specified data source.
{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} dataSource -- data source
\{[Number]} joinType -- join type, one of IQueryBuilderJoin#LEFT\_OUTER\_JOIN, IQueryBuilderJoin#INNER\_JOIN, IQueryBuilderJoin#RIGHT\_OUTER\_JOIN, IQueryBuilderJoin#FULL\_JOIN
\{[String]} alias -- the alias for joining table
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[QBJoin]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders')
/** @type {QBJoin<db:/example_data/order_details>} */
var join = query.joins.add('db:/example_data/order_details', JSRelation.INNER_JOIN, 'odetail')
join.on.add(join.columns.orderid.eq(query.columns.orderid))
// to add a join based on a relation, use the relation name
var join2 = query.joins.add('orders_to_customers', 'cust')
query.where.add(join2.columns.customerid.eq(999))
foundset.loadRecords(query)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=add-String_String}{tr:id=name}{td}h6.add{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[QBJoin]{span}{span:style=font-weight: bold;}add{span}{span}\(dataSourceOrRelation, alias){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}prs
Parameters
sIndentdataSourcedata sourcejoinTypejoin type, one of IQueryBuilderJoin#LEFT_OUTER_JOIN, IQueryBuilderJoin#INNER_JOIN, IQueryBuilderJoin#RIGHT_OUTER_JOIN, IQueryBuilderJoin#FULL_JOINaliasthe alias for joining tableret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowaddname
add(dataSourceOrRelation, alias)
dessIndent
Add a join based on relation or add a manual join.
When dataSourceOrRelation is a relation name, a join will be added based on the relation.
When dataSourceOrRelation is a data source, an empty join will be added with join type IQueryBuilderJoin#LEFT
\
_OUTER
\
_JOIN.
{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} dataSourceOrRelation -- data source
\{[String]} alias -- the alias for joining table
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[QBJoin]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders')
/** @type {QBJoin<db:/example_data/order_details>} */
var join = query.joins.add('db:/example_data/order_details', JSRelation.INNER_JOIN, 'odetail')
join.on.add(join.columns.orderid.eq(query.columns.orderid))
// to add a join based on a relation, use the relation name
var join2 = query.joins.add('orders_to_customers', 'cust')
query.where.add(join2.columns.customerid.eq(999))
foundset.loadRecords(query)
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}prs
Parameters
sIndentdataSourceOrRelationdata sourcealiasthe alias for joining tableret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowgetJoinsname
getJoins()
dessIndentret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowremoveUnusedname
removeUnused(keepInnerjoins)
dessIndent
Remove the joins that are not used anywhere in the query.
prs
Parameters
sIndentkeepInnerjoinswhen true inner joins are not removed, inner joins may impact the query result, even when not usedret