Connection
class Connection extends Object
Represents a connection between PHP and a database server.
Properties
array | $onConnect | ||
array | $onQuery | ||
ISupplementalDriver read-only | $supplementalDriver | ||
string read-only | $dsn | ||
PDO read-only | $pdo |
Methods
__construct($dsn, $user = NULL, $password = NULL, array $options = NULL)
No description
connect()
No description
string
getDsn()
No description
getSupplementalDriver()
No description
string
getInsertId($name = NULL)
No description
string
quote($string, $type = PDO::PARAM_STR)
No description
void
beginTransaction()
No description
void
commit()
No description
void
rollBack()
No description
mixed
fetchField($args)
Shortcut for query()->fetchField()
array
fetchPairs($args)
Shortcut for query()->fetchPairs()
array
fetchAll($args)
Shortcut for query()->fetchAll()
static SqlLiteral
literal($value)
No description
Details
at line 47
__construct($dsn, $user = NULL, $password = NULL, array $options = NULL)
No description
at line 61
connect()
No description
at line 79
string
getDsn()
No description
at line 86
PDO
getPdo()
No description
at line 94
ISupplementalDriver
getSupplementalDriver()
No description
at line 105
string
getInsertId($name = NULL)
No description
at line 116
string
quote($string, $type = PDO::PARAM_STR)
No description
at line 123
void
beginTransaction()
No description
at line 130
void
commit()
No description
at line 137
void
rollBack()
No description
at line 149
ResultSet
query($statement)
Generates and executes SQL query.
at line 175
ResultSet
queryArgs($statement, array $params)
No description
at line 191
Row
fetch($args)
Shortcut for query()->fetch()
at line 203
mixed
fetchField($args)
Shortcut for query()->fetchField()
at line 215
array
fetchPairs($args)
Shortcut for query()->fetchPairs()
at line 227
array
fetchAll($args)
Shortcut for query()->fetchAll()
at line 236
static SqlLiteral
literal($value)
No description