PHP Интерфейс phpDataMapper_Query_Interface, phpDataMapper

Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( phpDataMapper_Adapter_Interface $adapter ) : string Constructor
__toString ( ) Return Sql code with $this->sql() function
andWhere ( array $conditions = [], $type = "AND" )
from ( string $table = null ) From
getParameters ( ) Get array of parameters/binds to execute in a prepared statement
group ( array $fields = [] ) GROUP BY columns
limit ( $limit = 20, $offset = null ) LIMIT query or result set
orWhere ( array $conditions = [], $type = "AND" )
order ( $fields = [] ) ORDER BY columns
select ( mixed $fields = "*", string $table ) : string Called from mapper's select() function
sql ( ) Get raw SQL code generated from other query builder functions
where ( array $conditions = [], string $type = "AND", string $setType = "AND" ) WHERE conditions

Описание методов

__construct() публичный Метод

Constructor
public __construct ( phpDataMapper_Adapter_Interface $adapter ) : string
$adapter phpDataMapper_Adapter_Interface
Результат string

__toString() публичный Метод

Return Sql code with $this->sql() function
public __toString ( )

andWhere() публичный Метод

public andWhere ( array $conditions = [], $type = "AND" )
$conditions array

from() публичный Метод

From
public from ( string $table = null )
$table string Name of the table to perform the SELECT query on

getParameters() публичный Метод

Get array of parameters/binds to execute in a prepared statement
public getParameters ( )

group() публичный Метод

GROUP BY columns
public group ( array $fields = [] )
$fields array

limit() публичный Метод

LIMIT query or result set
public limit ( $limit = 20, $offset = null )

orWhere() публичный Метод

public orWhere ( array $conditions = [], $type = "AND" )
$conditions array

order() публичный Метод

ORDER BY columns
public order ( $fields = [] )

select() публичный Метод

Called from mapper's select() function
public select ( mixed $fields = "*", string $table ) : string
$fields mixed (optional)
$table string Table name
Результат string

sql() публичный Метод

Get raw SQL code generated from other query builder functions
public sql ( )

where() публичный Метод

WHERE conditions
public where ( array $conditions = [], string $type = "AND", string $setType = "AND" )
$conditions array Array of conditions for this clause
$type string Keyword that will separate each condition - "AND", "OR"
$setType string Keyword that will separate the whole set of conditions - "AND", "OR"