The JOIN clause builder.

package Peyote
author Dave Widmer

 Methods

Add a join.

addJoin(string $table, string $type) : \Peyote\Join

Parameters

$table

string

The table name

$type

string

The type of join

Returns

Compiles the query into raw SQL

compile() : string

Returns

string

Gets all of the methods that should be passed as "mixin" methods.

getMethods() : array

Returns

array

Creates an ON join.

on(string $column1, string $op, string $column2) : \Peyote\Join

Parameters

$column1

string

The column from the first table

$op

string

The operator

$column2

string

The column from the second table

Exceptions

\Peyote\Exception

Returns

Create a USING join.

using(string $column) : \Peyote\Join

Parameters

$column

string

The column to join on

Exceptions

\Peyote\Exception

Returns

Compiles an ON join.

compileOn(array $join) : string

Parameters

$join

array

The on join to compile

Returns

string

Compiles a JOIN USING clause

compileUsing(array $join) : string

Parameters

$join

array

The join to compile

Returns

string

 Properties

 

The currently active join

$active_join : array

 

The internal list of joins

$joins : array