PHP Class Drivers\Abstraction\Sql

Afficher le fichier Open project: panada/panada

Méthodes publiques

Свойство Type Description
$clientFlags
$insertId return data type option: object, array and iterator (pointer)
$instantiateClass
$newLink
$persistentConnection

Protected Properties

Свойство Type Description
$column
$config
$connection
$criteria
$distinct
$groupBy
$isHaving
$isQuotes
$joins
$joinsOn
$joinsType
$lastError
$lastQuery
$limit
$link
$offset
$order
$orderBy
$returnType
$tables
$throwError

Méthodes publiques

Méthode Description
command ( ) : string Build the SQL statement.
delete ( $table, $where = null ) : boolean Abstraction for delete.
distinct ( ) : object API for ".
fetchAs ( string $returnType = 'object' ) : object Flag to get return type. The options is: object, array and iterator.
from ( ) : object API for ".
getAll ( $table = false, $where = [], $fields = [], $returnType = false ) : object Previously called get_results.
getLastQuery ( ) : string Get last query.
getOne ( $table = false, $where = [], $fields = [], $returnType = false ) : object Previously called get_row.
getVar ( $query = null ) : string | integer Get value directly from single field. Previusly called get_var().
groupBy ( ) : object API for ".
having ( string $column, string $operator, string $value, mix $separator = false ) API for ".
insert ( string $table, array $data = [] ) : boolean Abstraction for insert.
join ( string $table, string $type = null ) API for ".
limit ( $limit, $offset = null ) : object API for ".
on ( string $column, string $operator, string $value, mix $separator = false ) API for ".
orderBy ( $column, $order = null ) : object API for ".
select ( ) : object API for "SELECT .
setThrowError ( boolean $set = false ) Throw the error instead handle it automaticly.
update ( string $table, array $dat, array $where = null ) : boolean Abstraction for update.
where ( string $column, string $operator, string $value, string $separator = false ) : object API for ".

Méthodes protégées

Méthode Description
createCriteria ( string $column, string $operator, string $value, mix $separator ) Create criteria condition. It use in on, where and having method.
printError ( ) : string Print the error.

Method Details

command() public méthode

Build the SQL statement.
public command ( ) : string
Résultat string The complited SQL statement

createCriteria() protected méthode

Create criteria condition. It use in on, where and having method.
protected createCriteria ( string $column, string $operator, string $value, mix $separator )
$column string
$operator string
$value string
$separator mix

delete() public méthode

Abstraction for delete.
public delete ( $table, $where = null ) : boolean
Résultat boolean

distinct() public méthode

.. DISTINCT " statement.
public distinct ( ) : object
Résultat object

fetchAs() public méthode

Flag to get return type. The options is: object, array and iterator.
public fetchAs ( string $returnType = 'object' ) : object
$returnType string
Résultat object

from() public méthode

..FROM ... " statement.
public from ( ) : object
Résultat object

getAll() public méthode

Previously called get_results.
public getAll ( $table = false, $where = [], $fields = [], $returnType = false ) : object
Résultat object

getLastQuery() public méthode

Get last query.
public getLastQuery ( ) : string
Résultat string

getOne() public méthode

Previously called get_row.
public getOne ( $table = false, $where = [], $fields = [], $returnType = false ) : object
Résultat object

getVar() public méthode

Get value directly from single field. Previusly called get_var().
public getVar ( $query = null ) : string | integer
Résultat string | integer Depen on it record value.

groupBy() public méthode

.. GROUP BY ... " statement.
public groupBy ( ) : object
Résultat object

having() public méthode

.. HAVING..." statement.
public having ( string $column, string $operator, string $value, mix $separator = false )
$column string
$operator string
$value string
$separator mix

insert() public méthode

Abstraction for insert.
public insert ( string $table, array $data = [] ) : boolean
$table string
$data array
Résultat boolean

join() public méthode

.. JOIN ..." statement.
public join ( string $table, string $type = null )
$table string Table to join
$type string Type of join: LEFT, RIGHT, INNER

limit() public méthode

.. LIMIT ..." statement.
public limit ( $limit, $offset = null ) : object
Résultat object

on() public méthode

.. JOIN ON..." statement.
public on ( string $column, string $operator, string $value, mix $separator = false )
$column string
$operator string
$value string
$separator mix

orderBy() public méthode

.. ORDER BY..." statement.
public orderBy ( $column, $order = null ) : object
Résultat object

printError() protected méthode

Print the error.
protected printError ( ) : string
Résultat string

select() public méthode

.. " statement.
public select ( ) : object
Résultat object

setThrowError() public méthode

User should catch this error for there own purpose.
public setThrowError ( boolean $set = false )
$set boolean

update() public méthode

Abstraction for update.
public update ( string $table, array $dat, array $where = null ) : boolean
$table string
$dat array
$where array
Résultat boolean

where() public méthode

.. WHERE ... " statement.
public where ( string $column, string $operator, string $value, string $separator = false ) : object
$column string Column name
$operator string SQL operator string: =,<,>,<= dll
$value string Where value
$separator string Such as: AND, OR
Résultat object

Property Details

$clientFlags public_oe property

public $clientFlags

$column protected_oe property

protected $column

$config protected_oe property

protected $config

$connection protected_oe property

protected $connection

$criteria protected_oe property

protected $criteria

$distinct protected_oe property

protected $distinct

$groupBy protected_oe property

protected $groupBy

$insertId public_oe property

return data type option: object, array and iterator (pointer)
public $insertId

$instantiateClass public_oe property

public $instantiateClass

$isHaving protected_oe property

protected $isHaving

$isQuotes protected_oe property

protected $isQuotes

$joins protected_oe property

protected $joins

$joinsOn protected_oe property

protected $joinsOn

$joinsType protected_oe property

protected $joinsType

$lastError protected_oe property

protected $lastError

$lastQuery protected_oe property

protected $lastQuery

$limit protected_oe property

protected $limit

$offset protected_oe property

protected $offset

$order protected_oe property

protected $order

$orderBy protected_oe property

protected $orderBy

$persistentConnection public_oe property

public $persistentConnection

$returnType protected_oe property

protected $returnType

$tables protected_oe property

protected $tables

$throwError protected_oe property

protected $throwError