Documentation and API source code for Backdrop CMS.
class views_join
A function class to represent a join and create the SQL necessary
to implement the join.
This is the Delegation pattern. If we had PHP5 exclusively, we would
declare this an interface.
Extensions of this class can be used to create more interesting joins.
join definition
table: table to join (right table)
field: field to join on (right field)
left_table: The table we join to
left_field: The field we join to
type: either LEFT (default) or INNER
extra: An array of extra conditions on the join. Each condition is
either a string that's directly added, or an array of items:
- table: If not set, current table; if NULL, no table. If you specify a
table in cached definition, Views will try to load from an existing
alias. If you use realtime joins, it works better.
- field: Field or formula
in formulas we can reference the right table by using %alias
- operator: defaults to =
- value: Must be set. If an array, operator will be defaulted to IN.
- numeric: If true, the value will not be surrounded in quotes.
- extra type: How all the extras will be combined. Either AND or OR. Defaults to AND.