Pionia Core

JoinParseTrait

Table of Contents

Methods

all()  : array<string|int, mixed>|null
Returns all items from the CDatabase. If a callback is passed, it will be called on each item in the resultset
full()  : static
inner()  : static
left()  : static
right()  : static
where()  : static
join()  : static
runSelect()  : array<string|int, mixed>|null

Methods

all()

Returns all items from the CDatabase. If a callback is passed, it will be called on each item in the resultset

public all([callable|null $callback = null ]) : array<string|int, mixed>|null
Parameters
$callback : callable|null = null

This is the receiver for the current resultset

Tags
example
// Assignment method
$row = Table::from('user')
    ->filter(['last_name' => 'Ezra'])
   ->all();

// Callback method- this is little bit faster than the assignment method
Table::from('user')
   ->filter(['last_name' => 'Ezra'])
  ->all(function($row) {
     echo $row->first_name;
 });
Return values
array<string|int, mixed>|null

full()

public full(mixed $table, string|array<string|int, mixed> $on_or_using[, string|null $alias = null ]) : static
Parameters
$table : mixed
$on_or_using : string|array<string|int, mixed>
$alias : string|null = null
Return values
static

inner()

public inner(mixed $table, string|array<string|int, mixed> $on_or_using[, string|null $alias = null ]) : static
Parameters
$table : mixed
$on_or_using : string|array<string|int, mixed>
$alias : string|null = null
Return values
static

left()

public left(mixed $table, string|array<string|int, mixed> $on_or_using[, string|null $alias = null ]) : static
Parameters
$table : mixed
$on_or_using : string|array<string|int, mixed>
$alias : string|null = null
Return values
static

right()

public right(mixed $table, string|array<string|int, mixed> $on_or_using[, string|null $alias = null ]) : static
Parameters
$table : mixed
$on_or_using : string|array<string|int, mixed>
$alias : string|null = null
Return values
static

where()

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

join()

private join(string $joinTable, string $alias, string|array<string|int, mixed> $on_or_using, string $joinType) : static
Parameters
$joinTable : string
$alias : string
$on_or_using : string|array<string|int, mixed>
$joinType : string
Return values
static

runSelect()

private runSelect(callable|null $callback) : array<string|int, mixed>|null
Parameters
$callback : callable|null
Return values
array<string|int, mixed>|null

        
On this page

Search results