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
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 49
__construct(string $dsn, string $user = null, string $password = null, array $options = null)
No description
at line 60
void
connect()
No description
at line 83
void
reconnect()
No description
at line 90
void
disconnect()
No description
at line 96
string
getDsn()
No description
at line 102
PDO
getPdo()
No description
at line 109
ISupplementalDriver
getSupplementalDriver()
No description
at line 116
string
getInsertId(string $sequence = null)
No description
at line 127
string
quote(string $string, int $type = PDO::PARAM_STR)
No description
at line 137
void
beginTransaction()
No description
at line 143
void
commit()
No description
at line 149
void
rollBack()
No description
at line 158
ResultSet
query(string $sql, ...$params)
Generates and executes SQL query.
at line 172
ResultSet
queryArgs(string $sql, array $params)
No description
at line 181
array
preprocess(string $sql, ...$params)
No description
at line 190
string|null
getLastQueryString()
No description
at line 202
IRow|null
fetch(string $sql, ...$params)
Shortcut for query()->fetch()
at line 212
mixed
fetchField(string $sql, ...$params)
Shortcut for query()->fetchField()
at line 221
array|null
fetchFields(string $sql, ...$params)
Shortcut for query()->fetchFields()
at line 230
array
fetchPairs(string $sql, ...$params)
Shortcut for query()->fetchPairs()
at line 239
array
fetchAll(string $sql, ...$params)
Shortcut for query()->fetchAll()
at line 245
static SqlLiteral
literal(string $value, ...$params)
No description
Traits
Strict class for better experience.