PHP Class DB\SQL

Inheritance: extends db\PDO
Afficher le fichier Open project: bcosca/fatfree-core Class Usage Examples

Protected Properties

Свойство Type Description
$dbname
$dsn
$engine
$log
$pdo
$rows
$trans
$uuid

Méthodes publiques

Méthode Description
__call ( $func, array $args ) : mixed Redirect call to PDO object
__construct ( $dsn, $user = NULL, $pw = NULL, array $options = NULL ) Instantiate class
begin ( ) : boolean Begin SQL transaction
commit ( ) : boolean Commit SQL transaction
count ( ) : integer Return number of rows affected by last query
driver ( ) : string Return database engine
exec ( $cmds, $args = NULL, $ttl, $log = TRUE, $stamp = FALSE ) : array | integer | FALSE Execute SQL statement(s)
log ( $flag = TRUE ) : string Return SQL profiler results (or disable logging)
name ( ) : string Return database name
pdo ( ) : db\PDO Return parent object
quote ( $val, $type = PDO::PARAM_STR ) : string Quote string
quotekey ( $key, boolean $split = TRUE ) : string Return quoted identifier name
rollback ( ) : boolean Rollback SQL transaction
schema ( $table, $fields = NULL, $ttl ) : array | FALSE Retrieve schema of SQL table
trans ( ) : boolean Return transaction flag
type ( $val ) : integer Map data type of argument to a PDO constant
uuid ( ) : string Return UUID
value ( $type, $val ) : scalar Cast value to PHP type
version ( ) : string Return server version

Private Methods

Méthode Description
__clone ( ) ! Prohibit cloning

Method Details

__call() public méthode

Redirect call to PDO object
public __call ( $func, array $args ) : mixed
$func string
$args array array
Résultat mixed

__construct() public méthode

Instantiate class
public __construct ( $dsn, $user = NULL, $pw = NULL, array $options = NULL )
$dsn string
$user string
$pw string
$options array array

begin() public méthode

Begin SQL transaction
public begin ( ) : boolean
Résultat boolean

commit() public méthode

Commit SQL transaction
public commit ( ) : boolean
Résultat boolean

count() public méthode

Return number of rows affected by last query
public count ( ) : integer
Résultat integer

driver() public méthode

Return database engine
public driver ( ) : string
Résultat string

exec() public méthode

Execute SQL statement(s)
public exec ( $cmds, $args = NULL, $ttl, $log = TRUE, $stamp = FALSE ) : array | integer | FALSE
$cmds string|array
$args string|array
$ttl int|array
$log bool
$stamp bool
Résultat array | integer | FALSE

log() public méthode

Return SQL profiler results (or disable logging)
public log ( $flag = TRUE ) : string
$flag bool
Résultat string

name() public méthode

Return database name
public name ( ) : string
Résultat string

pdo() public méthode

Return parent object
public pdo ( ) : db\PDO
Résultat db\PDO

quote() public méthode

Quote string
public quote ( $val, $type = PDO::PARAM_STR ) : string
$val mixed
$type int
Résultat string

quotekey() public méthode

Return quoted identifier name
public quotekey ( $key, boolean $split = TRUE ) : string
$key
$split boolean
Résultat string

rollback() public méthode

Rollback SQL transaction
public rollback ( ) : boolean
Résultat boolean

schema() public méthode

Retrieve schema of SQL table
public schema ( $table, $fields = NULL, $ttl ) : array | FALSE
$table string
$fields array|string
$ttl int|array
Résultat array | FALSE

trans() public méthode

Return transaction flag
public trans ( ) : boolean
Résultat boolean

type() public méthode

Map data type of argument to a PDO constant
public type ( $val ) : integer
$val scalar
Résultat integer

uuid() public méthode

Return UUID
public uuid ( ) : string
Résultat string

value() public méthode

Cast value to PHP type
public value ( $type, $val ) : scalar
$type string
$val scalar
Résultat scalar

version() public méthode

Return server version
public version ( ) : string
Résultat string

Property Details

$dbname protected_oe property

protected $dbname

$dsn protected_oe property

protected $dsn

$engine protected_oe property

protected $engine

$log protected_oe property

protected $log

$pdo protected_oe property

protected $pdo

$rows protected_oe property

protected $rows

$trans protected_oe property

protected $trans

$uuid protected_oe property

protected $uuid