Connection
class Connection
Represents a connection between PHP and a database server.
Properties
$onConnect | |||
$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
No description
Shortcut for query()->fetch()
Shortcut for query()->fetchField()
Shortcut for query()->fetchFields()
Shortcut for query()->fetchPairs()
Shortcut for query()->fetchAll()
No description
Details
at line 57
__construct(string $dsn, string|null $user = null, string|null $password = null, array|null $options = null)
No description
at line 74
void
connect()
No description
at line 97
void
reconnect()
No description
at line 104
void
disconnect()
No description
at line 110
string
getDsn()
No description
at line 116
PDO
getPdo()
No description
at line 123
Driver
getDriver()
No description
at line 131
Driver
getSupplementalDriver()
deprecated
deprecated
No description
at line 138
Connection
setRowNormalizer(callable|null $normalizer)
No description
at line 145
string
getInsertId(string|null $sequence = null)
No description
at line 156
string
quote(string $string, int $type = PDO::PARAM_STR)
No description
at line 166
void
beginTransaction()
No description
at line 176
void
commit()
No description
at line 186
void
rollBack()
No description
at line 199
mixed
transaction(callable $callback)
No description
at line 230
ResultSet
query(string $sql, ...$params)
Generates and executes SQL query.
at line 251
ResultSet
queryArgs(string $sql, array $params)
deprecated
deprecated
No description
at line 261
array
preprocess(string $sql, ...$params)
No description
at line 270
string|null
getLastQueryString()
No description
at line 283
Row|null
fetch(string $sql, ...$params)
Shortcut for query()->fetch()
at line 299
mixed
fetchField(string $sql, ...$params)
Shortcut for query()->fetchField()
at line 313
array|null
fetchFields(string $sql, ...$params)
Shortcut for query()->fetchFields()
at line 328
array
fetchPairs(string $sql, ...$params)
Shortcut for query()->fetchPairs()
at line 343
array
fetchAll(string $sql, ...$params)
Shortcut for query()->fetchAll()
at line 354
static SqlLiteral
literal(string $value, ...$params)
No description