Documentation

PixieExtended extends QueryBuilderHandler

Table of Contents

$checkConnection  : mixed
whether to check connection to database on every Simplex\Model select, insert, update and delete operation, usefull for long lived scripts (i.e. websocket server)
$optionsByDriver  : array<string|int, mixed>
buildWhere()  : mixed
Builds where conditions
get()  : stdClass|array<string|int, mixed>
Get all rows
getDriverOption()  : bool
Checks whether connection is alive
setCheckConnection()  : mixed
Sets whether to check if connection is alive and reconnects if necessary it can be set at runtime through container for *all* of classes the use a PixieExtend, i.e in a controller: $this->DIContainer->get('queryBuilder')->setCheckConnection(true);
sql()  : string
Gets raw sql code
table()  : QueryBuilderHandler
Sets table
tableExists()  : bool
Checks whether a table exists
whereLogical()  : mixed
Builds a where condition with the possibility to pass also the logical operator
checkConnection()  : bool
Checks whether connection is alive and reconnects if necessary
isConnectionAlive()  : bool
Checks whether connection is alive

Properties

$checkConnection

whether to check connection to database on every Simplex\Model select, insert, update and delete operation, usefull for long lived scripts (i.e. websocket server)

private mixed $checkConnection = false

$optionsByDriver

private array<string|int, mixed> $optionsByDriver = ['caseInsensitiveLikeOperator' => ['mysql' => 'LIKE', 'pgsql' => 'ILIKE']]

Methods

buildWhere()

Builds where conditions

public buildWhere(array<string|int, mixed> $where) : mixed
Parameters
$where : array<string|int, mixed>
Return values
mixed

get()

Get all rows

public get() : stdClass|array<string|int, mixed>
Tags
throws
Exception
Return values
stdClass|array<string|int, mixed>

getDriverOption()

Checks whether connection is alive

public getDriverOption(mixed $optionName) : bool
Parameters
$optionName : mixed
Return values
bool

setCheckConnection()

Sets whether to check if connection is alive and reconnects if necessary it can be set at runtime through container for *all* of classes the use a PixieExtend, i.e in a controller: $this->DIContainer->get('queryBuilder')->setCheckConnection(true);

public setCheckConnection(bool $set) : mixed
Parameters
$set : bool
Return values
mixed

sql()

Gets raw sql code

public sql() : string
Return values
string

table()

Sets table

public table(string $table) : QueryBuilderHandler
Parameters
$table : string
Return values
QueryBuilderHandler

tableExists()

Checks whether a table exists

public tableExists(string $table) : bool
Parameters
$table : string
Return values
bool

whereLogical()

Builds a where condition with the possibility to pass also the logical operator

public whereLogical(array<string|int, mixed> $whereCondition) : mixed
Parameters
$whereCondition : array<string|int, mixed>

and array with

Return values
mixed

checkConnection()

Checks whether connection is alive and reconnects if necessary

private checkConnection() : bool
Return values
bool

isConnectionAlive()

Checks whether connection is alive

private isConnectionAlive() : bool
Return values
bool

Search results