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 34
__construct(string $dsn, string|null $user = null, string|null $password = null, array $options = [], Configuration $configuration = new Configuration())
No description
at line 49
void
connect()
No description
at line 70
void
reconnect()
No description
at line 77
void
disconnect()
No description
at line 83
string
getDsn()
No description
at line 90
PDO
getPdo()
deprecated use getDriver()->getPdo()
at line 97
Driver
getDriver()
No description
at line 105
Driver
getSupplementalDriver()
deprecated
deprecated
No description
at line 113
Reflection
getReflection()
No description
at line 120
never
setRowNormalizer()
deprecated
deprecated
No description
at line 126
string
getInsertId(string|null $sequence = null)
No description
at line 133
string
quote(string $string)
No description
at line 140
void
beginTransaction()
No description
at line 150
void
commit()
No description
at line 160
void
rollBack()
No description
at line 170
mixed
transaction(callable $callback)
No description
at line 201
ResultSet
query(string $sql, ...$params)
Generates and executes SQL query.
at line 217
ResultSet
queryArgs(string $sql, array $params)
deprecated
deprecated
No description
at line 228
array
preprocess(string $sql, ...$params)
No description
at line 237
string|null
getLastQueryString()
No description
at line 243
Selection
table(string $table)
No description
at line 256
Row|null
fetch(string $sql, ...$params)
Shortcut for query()->fetch()
at line 266
mixed
fetchField(string $sql, ...$params)
Shortcut for query()->fetchField()
at line 276
array|null
fetchFields(string $sql, ...$params)
Shortcut for query()->fetchFields()
at line 286
array
fetchPairs(string $sql, ...$params)
Shortcut for query()->fetchPairs()
at line 296
array
fetchAll(string $sql, ...$params)
Shortcut for query()->fetchAll()
at line 302
static SqlLiteral
literal(string $value, ...$params)
No description