Pionia Core

FilterTrait

Table of Contents

Methods

group()  : mixed
having()  : $this
Adds a 'having' clause to the query
limit()  : static
orderBy()  : $this
Orders the query by certain value.
startAt()  : static

Methods

group()

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

having()

Adds a 'having' clause to the query

public having(string $column, mixed $value[, string|null $needle = null ]) : $this
Parameters
$column : string
$value : mixed
$needle : string|null = null

can be >, <, !,>=, <=. >< and <> are available for datetime

Return values
$this

limit()

public limit(int $limit) : static
Parameters
$limit : int
Tags
throws
Exception
Return values
static

orderBy()

Orders the query by certain value.

public orderBy(string|array<string|int, mixed> $value) : $this
Parameters
$value : string|array<string|int, mixed>
Tags
example
// single column
->filter()
->orderBy("name")

// multiple Order items
->filter()
->orderBy(['name' => 'DESC', 'age' => 'ASC'])
Return values
$this

startAt()

public startAt([int $startPoint = 0 ]) : static
Parameters
$startPoint : int = 0
Return values
static

        
On this page

Search results