Table Row (tr) |
---|
| Table Head (th) |
---|
| Method Details |
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add a join with join type IQueryBuilderJoin#LEFT_OUTER_JOIN and no alias for the joining table. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters
Div |
---|
| {String} dataSource – data source |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
/** @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=}{:=}{td}h6.add{td}{tr}{tr:id=sig}{td}{span:style= }[]{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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} Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add a join with no alias for the joining table. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters
Div |
---|
| {String} dataSource – data source {Number} joinType – join type, one of JSRelation.LEFT_OUTER_JOIN, JSRelation.INNER_JOIN, JSRelation.RIGHT_OUTER_JOIN, JSRelation.FULL_JOIN |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
/** @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= Table Body (tbody) |
---|
id | add-String_Number_String |
---|
| }{:=}{td}h6.add{td}{tr}{tr:id=sig}{td}{span:style= }[]{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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} Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add a join clause from the parent query builder part to the specified data source. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters
Div |
---|
| {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 |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
/** @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=}{:=}{td}h6.add{td}{tr}{tr:id=sig}{td}{span:style= }[]{span}{span:style= }{span}{span}\ Span |
---|
(dataSourceOrRelation, |
|
|
| {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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} Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters
Div |
---|
| {String} dataSourceOrRelation – data source {String} alias – the alias for joining table |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
/** @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} |