Base class for Query Bulder - Encapsulates protected methods

package Query
subpackage Query

 Methods

Calls a function further down the inheritence chain

__call(string $name, array $params) : mixed

Parameters

$name

string

$params

array

Returns

mixed

Empty base constructor

__construct() 

String together the sql statements for sending to the db

_compile(string $type, string $table) : \$string

Parameters

$type

string

$table

string

Returns

\$string

Helper function for returning sql strings

_get_compile(string $type, string $table, $reset) 

resturn string

Parameters

$type

string

$table

string

$reset

bool

Simplify building having clauses

_having(mixed $key, mixed $val, string $conj) : \Query_Builder_Base

fluent This method is part of a fluent interface and will return the same instance

Parameters

$key

mixed

$val

mixed

$conj

string

Returns

Simplify 'like' methods

_like(string $field, mixed $val, string $pos, string $like, string $conj) : \Query_Builder_Base

fluent This method is part of a fluent interface and will return the same instance

Parameters

$field

string

$val

mixed

$pos

string

$like

string

$conj

string

Returns

Executes the compiled query

_run(string $type, string $table, bool $simple) : mixed

Parameters

$type

string

$table

string

$simple

bool

Returns

mixed

Method to simplify select_ methods

_select(string $field, string $as) : string

Parameters

$field

string

$as

string

Returns

string

Do all the repeditive stuff for where/having type methods

_where(mixed $key, mixed $val) : array

Parameters

$key

mixed

$val

mixed

Returns

array

Simplify where_in methods

_where_in(mixed $key, mixed $val, $in, $conj) : \Query_Builder_Base

fluent This method is part of a fluent interface and will return the same instance

Parameters

$key

mixed

$val

mixed

$in

string

$conj

string

Returns

Simplify generating where string

_where_string(mixed $key, mixed $val, string $conj) : \Query_Builder_Base

fluent This method is part of a fluent interface and will return the same instance

Parameters

$key

mixed

$val

mixed

$conj

string

Returns