PHP Class DB\SQL

Inheritance: extends db\PDO
Datei anzeigen Open project: bcosca/fatfree-core Class Usage Examples

Protected Properties

Property Type Description
$dbname
$dsn
$engine
$log
$pdo
$rows
$trans
$uuid

Public Methods

Method 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

Method Description
__clone ( ) ! Prohibit cloning

Method Details

__call() public method

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

__construct() public method

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

begin() public method

Begin SQL transaction
public begin ( ) : boolean
return boolean

commit() public method

Commit SQL transaction
public commit ( ) : boolean
return boolean

count() public method

Return number of rows affected by last query
public count ( ) : integer
return integer

driver() public method

Return database engine
public driver ( ) : string
return string

exec() public method

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
return array | integer | FALSE

log() public method

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

name() public method

Return database name
public name ( ) : string
return string

pdo() public method

Return parent object
public pdo ( ) : db\PDO
return db\PDO

quote() public method

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

quotekey() public method

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

rollback() public method

Rollback SQL transaction
public rollback ( ) : boolean
return boolean

schema() public method

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

trans() public method

Return transaction flag
public trans ( ) : boolean
return boolean

type() public method

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

uuid() public method

Return UUID
public uuid ( ) : string
return string

value() public method

Cast value to PHP type
public value ( $type, $val ) : scalar
$type string
$val scalar
return scalar

version() public method

Return server version
public version ( ) : string
return 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