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 56
__construct(string $dsn, string $user = null, string $password = null, array $options = null)
No description
at line 67
void
connect()
No description
at line 90
void
reconnect()
No description
at line 97
void
disconnect()
No description
at line 103
string
getDsn()
No description
at line 109
PDO
getPdo()
No description
at line 116
Driver
getDriver()
No description
at line 124
Driver
getSupplementalDriver()
deprecated
deprecated
No description
at line 131
Connection
setRowNormalizer(callable|null $normalizer)
No description
at line 138
string
getInsertId(string $sequence = null)
No description
at line 149
string
quote(string $string, int $type = PDO::PARAM_STR)
No description
at line 159
void
beginTransaction()
No description
at line 169
void
commit()
No description
at line 179
void
rollBack()
No description
at line 192
mixed
transaction(callable $callback)
No description
at line 222
ResultSet
query(string $sql, ...$params)
Generates and executes SQL query.
at line 237
ResultSet
queryArgs(string $sql, array $params)
deprecated
deprecated
No description
at line 247
array
preprocess(string $sql, ...$params)
No description
at line 256
string|null
getLastQueryString()
No description
at line 269
Row|null
fetch(string $sql, ...$params)
Shortcut for query()->fetch()
at line 280
mixed
fetchField(string $sql, ...$params)
Shortcut for query()->fetchField()
at line 290
array|null
fetchFields(string $sql, ...$params)
Shortcut for query()->fetchFields()
at line 300
array
fetchPairs(string $sql, ...$params)
Shortcut for query()->fetchPairs()
at line 310
array
fetchAll(string $sql, ...$params)
Shortcut for query()->fetchAll()
at line 316
static SqlLiteral
literal(string $value, ...$params)
No description
Traits
Strict class for better experience.