class QueryHelper (View source)

Class QueryHelper

Methods

__construct(AbstractDatabaseDriver $db = null)

Constructor.

addTable(string $alias, string $table, mixed $condition = null, string $joinType = 'LEFT', boolean $prefix = null)

addTable

$this
removeTable(string $alias)

removeTable

array
getSelectFields()

getFilterFields

registerQueryTables(QueryInterface $query)

registerQueryTables

static Query
buildWheres(QueryInterface $query, array $conditions, bool $allowNulls = true)

buildConditions

static string
buildCompare(string|int $key, Compare $value, QueryInterface $query = null)

buildCompare

array
getTables()

Method to get property Tables

setTables(array $tables)

Method to set property tables

Details

at line line 42
__construct(AbstractDatabaseDriver $db = null)

Constructor.

Parameters

AbstractDatabaseDriver $db

at line line 58
QueryHelper addTable(string $alias, string $table, mixed $condition = null, string $joinType = 'LEFT', boolean $prefix = null)

addTable

Parameters

string $alias
string $table
mixed $condition
string $joinType
boolean $prefix

Return Value

QueryHelper

at line line 97
$this removeTable(string $alias)

removeTable

Parameters

string $alias

Return Value

$this

at line line 112
array getSelectFields()

getFilterFields

Return Value

array

at line line 158
QueryInterface registerQueryTables(QueryInterface $query)

registerQueryTables

Parameters

QueryInterface $query

Return Value

QueryInterface

at line line 188
static Query buildWheres(QueryInterface $query, array $conditions, bool $allowNulls = true)

buildConditions

Parameters

QueryInterface $query
array $conditions
bool $allowNulls

Return Value

Query

at line line 246
static string buildCompare(string|int $key, Compare $value, QueryInterface $query = null)

buildCompare

Parameters

string|int $key
Compare $value
QueryInterface $query

Return Value

string

at line line 270
AbstractDatabaseDriver getDb()

getDb

Return Value

AbstractDatabaseDriver

at line line 287
QueryHelper setDb(AbstractDatabaseDriver $db)

setDb

Parameters

AbstractDatabaseDriver $db

Return Value

QueryHelper Return self to support chaining.

at line line 299
array getTables()

Method to get property Tables

Return Value

array

at line line 311
QueryHelper setTables(array $tables)

Method to set property tables

Parameters

array $tables

Return Value

QueryHelper Return self to support chaining.