Fat-Free Framework: DB\SQL Class Reference

Fat-Free-Framework

Fat-Free Framework  3.1.0 API Reference

PDO wrapper. More...

Inheritance diagram for DB\SQL:

Public Member Functions

 begin ()
 
 rollback ()
 
 commit ()
 
 type ($val)
 
 exec ($cmds, $args=NULL, $ttl=0, $log=TRUE)
 
 count ()
 
 log ()
 
 schema ($table, $ttl=0)
 
 quote ($val, $type=\PDO::PARAM_STR)
 
 driver ()
 
 version ()
 
 name ()
 
 quotekey ($key)
 
 __construct ($dsn, $user=NULL, $pw=NULL, array $options=NULL)
 

Public Attributes

 $dbname
 Database name.
 
 $trans =FALSE
 Transaction flag.
 
 $rows =0
 Number of rows affected by query.
 
 $log
 SQL log.
 

Detailed Description

PDO wrapper.

Constructor & Destructor Documentation

DB\SQL::__construct (   $dsn,
  $user = NULL,
  $pw = NULL,
array  $options = NULL 
)

Instantiate class

Parameters
$dsnstring
$userstring
$pwstring
$optionsarray

Member Function Documentation

DB\SQL::begin ( )

Begin SQL transaction

Returns
bool
DB\SQL::commit ( )

Commit SQL transaction

Returns
bool
DB\SQL::count ( )

Return number of rows affected by last query

Returns
int
DB\SQL::driver ( )

Return database engine

Returns
string
DB\SQL::exec (   $cmds,
  $args = NULL,
  $ttl = 0,
  $log = TRUE 
)

Execute SQL statement(s)

Returns
array|int|FALSE
Parameters
$cmdsstring|array
$argsstring|array
$ttlint
$logbool
DB\SQL::log ( )

Return SQL profiler results

Returns
string
DB\SQL::name ( )

Return database name

Returns
string
DB\SQL::quote (   $val,
  $type = \PDO::PARAM_STR 
)

Quote string

Returns
string
Parameters
$valmixed
$typeint
DB\SQL::quotekey (   $key)

Return quoted identifier name

Returns
string
Parameters
$key
DB\SQL::rollback ( )

Rollback SQL transaction

Returns
bool
DB\SQL::schema (   $table,
  $ttl = 0 
)

Retrieve schema of SQL table

Returns
array|FALSE
Parameters
$tablestring
$ttlint
DB\SQL::type (   $val)

Map data type of argument to a PDO constant

Returns
int
Parameters
$valscalar
DB\SQL::version ( )

Return server version

Returns
string

The documentation for this class was generated from the following file:
  • db/sql.php
Generated on Mon Aug 19 2013 21:28:01 for Fat-Free Framework by   doxygen 1.8.4