QBJoin
Last updated
Was this helpful?
Last updated
Was this helpful?
The QBJoin
class simplifies the process of creating and managing SQL joins within the QBSelect
query builder framework. It provides tools to handle complex relationships between tables, enabling construction of queries with various join types, such as LEFT OUTER JOIN
or INNER JOIN
. By leveraging the class, developers can define join conditions and access columns from related tables for select or where clauses.
The class supports dynamic query building with its integration of parent and root query references, ensuring flexibility and scalability in query design. It also allows for annotating joins with comments, aiding in query documentation and readability.
For further details on constructing and executing queries, refer to the .
Get all the columns of the datasource that can be used for this query (select or where clause)
Specifies a comment of the join.
Returns the join type, one of IQueryBuilderJoin#LEFT_OUTER_JOIN, IQueryBuilderJoin#INNER_JOIN, IQueryBuilderJoin#RIGHT_OUTER_JOIN, IQueryBuilderJoin#FULL_JOIN
Get the joins clause of this table based clause.
Get the on clause for the join.
Get query builder parent table clause, this may be a query or a join clause.
Get query builder parent.
Get a column from the table.
Get a column from the table with given alias.
Returns the datasource for this.
Returns the table alias for this.
Get all the columns of the datasource that can be used for this query (select or where clause)
Sample
Specifies a comment of the join.
Sample
Returns the join type, one of IQueryBuilderJoin#LEFT_OUTER_JOIN, IQueryBuilderJoin#INNER_JOIN, IQueryBuilderJoin#RIGHT_OUTER_JOIN, IQueryBuilderJoin#FULL_JOIN
Get the joins clause of this table based clause. Joins added to this clause will be based on this table clauses table.
Sample
Get the on clause for the join.
Sample
Get query builder parent table clause, this may be a query or a join clause.
Sample
Get query builder parent.
Sample
Get a column from the table.
Parameters
Sample
Get a column from the table with given alias. The alias may be of the main table or any level deep joined table.
Parameters
Sample
Returns the datasource for this.
Returns the table alias for this.
Type
Type the comment of the join.
Type the join type, one of IQueryBuilderJoin
Type
Type the logical condition for the join.
Type
Type
name the name of column to get
Returns: the QBColumn representing the specified column name.
columnTableAlias the alias for the table
name the name of column to get
Returns: the QBColumn representing the specified column from the table with the given alias.
Returns: the dataSource
Returns: the tableAlias