Connection
class Connection extends Object
Represents a connection between PHP and a database server.
Properties
callable[] | $onConnect | ||
callable[] | $onQuery | ||
ISupplementalDriver read-only | $supplementalDriver | ||
string read-only | $dsn | ||
PDO read-only | $pdo |
Methods
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Shortcut for query()->fetchField()
Shortcut for query()->fetchPairs()
Shortcut for query()->fetchAll()
No description
Details
at line 46
__construct($dsn, $user = NULL, $password = NULL, array $options = NULL)
No description
at line 61
void
connect()
No description
at line 84
void
reconnect()
No description
at line 92
void
disconnect()
No description
at line 99
string
getDsn()
No description
at line 106
PDO
getPdo()
No description
at line 114
ISupplementalDriver
getSupplementalDriver()
No description
at line 125
string
getInsertId($name = NULL)
No description
at line 140
string
quote($string, $type = PDO::PARAM_STR)
No description
at line 151
void
beginTransaction()
No description
at line 158
void
commit()
No description
at line 165
void
rollBack()
No description
at line 177
ResultSet
query($sql)
Generates and executes SQL query.
at line 201
ResultSet
queryArgs($sql, array $params)
No description
at line 211
preprocess($sql)
No description
at line 229
Row
fetch($args)
Shortcut for query()->fetch()
at line 241
mixed
fetchField($args)
Shortcut for query()->fetchField()
at line 253
array
fetchPairs($args)
Shortcut for query()->fetchPairs()
at line 265
array
fetchAll($args)
Shortcut for query()->fetchAll()
at line 274
static SqlLiteral
literal($value)
No description