QBJoins
Properties Summarized
Type | Name | Summary |
---|---|---|
Get query builder parent table clause, this may be a query or a join clause. | ||
Get query builder parent. |
Methods Summarized
Type | Name | Summary |
---|---|---|
Add 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. |
Properties Detailed
parent
Get query builder parent table clause, this may be a query or a join clause.
Type QBTableClause
Sample
root
Get query builder parent.
Type QBSelect
Sample
Methods Detailed
add(subqueryBuilder, joinType)
Add a join clause from the parent query builder part to a derived table based on another query.
Parameters
Returns: QBJoin
add(subqueryBuilder, joinType, alias)
Add a join clause from the parent query builder part to a derived table based on another query.
Parameters
Returns: QBJoin
Sample
add(dataSource)
Add a join with join type IQueryBuilderJoin#LEFT_OUTER_JOIN and no alias for the joining table.
Parameters
String dataSource data source
Returns: QBJoin
Sample
add(dataSource, joinType)
Add a join with no alias for the joining table.
Parameters
String dataSource data source
Number joinType join type, one of QBJoin.LEFT_OUTER_JOIN, QBJoin.INNER_JOIN, QBJoin.RIGHT_OUTER_JOIN, QBJoin.FULL_JOIN
Returns: QBJoin
Sample
add(dataSource, joinType, alias)
Add a join clause from the parent query builder part to the specified data source.
Parameters
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
Returns: QBJoin
Sample
add(dataSourceOrRelation, alias)
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.
Parameters
Returns: QBJoin
Sample
getJoins()
Returns: Array
removeUnused(keepInnerjoins)
Remove the joins that are not used anywhere in the query.
Parameters
Boolean keepInnerjoins when true inner joins are not removed, inner joins may impact the query result, even when not used
Returns: QBJoins
Sample
Last updated