Connection
class Connection
Represents a connection between PHP and a database server.
Properties
callable[] | $onConnect | ||
callable[] | $onQuery |
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
No description
Shortcut for query()->fetchField()
Shortcut for query()->fetchFields()
Shortcut for query()->fetchPairs()
Shortcut for query()->fetchAll()
No description
Details
at line 47
__construct($dsn, $user = null, $password = null, array $options = null)
No description
at line 63
void
connect()
No description
at line 86
void
reconnect()
No description
at line 94
void
disconnect()
No description
at line 101
string
getDsn()
No description
at line 108
PDO
getPdo()
No description
at line 116
ISupplementalDriver
getSupplementalDriver()
No description
at line 127
string
getInsertId($name = null)
No description
at line 143
string
quote($string, $type = PDO::PARAM_STR)
No description
at line 158
void
beginTransaction()
No description
at line 165
void
commit()
No description
at line 172
void
rollBack()
No description
at line 183
ResultSet
query($sql, ...$params)
Generates and executes SQL query.
at line 201
ResultSet
queryArgs($sql, array $params)
No description
at line 210
preprocess($sql, ...$params)
No description
at line 222
string|null
getLastQueryString()
No description
at line 236
Row
fetch($sql, ...$params)
Shortcut for query()->fetch()
at line 247
mixed
fetchField($sql, ...$params)
Shortcut for query()->fetchField()
at line 258
array|null
fetchFields($sql, ...$params)
Shortcut for query()->fetchFields()
at line 269
array
fetchPairs($sql, ...$params)
Shortcut for query()->fetchPairs()
at line 280
array
fetchAll($sql, ...$params)
Shortcut for query()->fetchAll()
at line 289
static SqlLiteral
literal($value, ...$params)
No description