Context
class Context
Database context.
Methods
__construct(Connection $connection, IStructure $structure, IConventions $conventions = null, IStorage $cacheStorage = null)
No description
void
beginTransaction()
No description
void
commit()
No description
void
rollBack()
No description
string
getInsertId(string $sequence = null)
No description
getConnection()
No description
getStructure()
No description
getConventions()
No description
IRow|null
fetch(string $sql, ...$params)
Shortcut for query()->fetch()
mixed
fetchField(string $sql, ...$params)
Shortcut for query()->fetchField()
array|null
fetchFields(string $sql, ...$params)
Shortcut for query()->fetchFields()
array
fetchPairs(string $sql, ...$params)
Shortcut for query()->fetchPairs()
array
fetchAll(string $sql, ...$params)
Shortcut for query()->fetchAll()
static SqlLiteral
literal(string $value, ...$params)
No description
Details
at line 36
__construct(Connection $connection, IStructure $structure, IConventions $conventions = null, IStorage $cacheStorage = null)
No description
at line 49
void
beginTransaction()
No description
at line 55
void
commit()
No description
at line 61
void
rollBack()
No description
at line 67
string
getInsertId(string $sequence = null)
No description
at line 76
ResultSet
query(string $sql, ...$params)
Generates and executes SQL query.
at line 82
ResultSet
queryArgs(string $sql, array $params)
No description
at line 88
Selection
table(string $table)
No description
at line 94
Connection
getConnection()
No description
at line 100
IStructure
getStructure()
No description
at line 106
IConventions
getConventions()
No description
at line 118
IRow|null
fetch(string $sql, ...$params)
Shortcut for query()->fetch()
at line 128
mixed
fetchField(string $sql, ...$params)
Shortcut for query()->fetchField()
at line 137
array|null
fetchFields(string $sql, ...$params)
Shortcut for query()->fetchFields()
at line 146
array
fetchPairs(string $sql, ...$params)
Shortcut for query()->fetchPairs()
at line 155
array
fetchAll(string $sql, ...$params)
Shortcut for query()->fetchAll()
at line 161
static SqlLiteral
literal(string $value, ...$params)
No description
Traits
Strict class for better experience.