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($name = null)
No description
getConnection()
No description
getStructure()
No description
getConventions()
No description
mixed
fetchField($sql, ...$params)
Shortcut for query()->fetchField()
array|null
fetchFields($sql, ...$params)
Shortcut for query()->fetchFields()
array
fetchPairs($sql, ...$params)
Shortcut for query()->fetchPairs()
array
fetchAll($sql, ...$params)
Shortcut for query()->fetchAll()
static SqlLiteral
literal($value, ...$params)
No description
Details
at line 34
__construct(Connection $connection, IStructure $structure, IConventions $conventions = null, IStorage $cacheStorage = null)
No description
at line 44
void
beginTransaction()
No description
at line 51
void
commit()
No description
at line 58
void
rollBack()
No description
at line 68
string
getInsertId($name = null)
No description
at line 79
ResultSet
query($sql, ...$params)
Generates and executes SQL query.
at line 89
ResultSet
queryArgs($sql, array $params)
No description
at line 99
Selection
table($table)
No description
at line 106
Connection
getConnection()
No description
at line 113
IStructure
getStructure()
No description
at line 120
IConventions
getConventions()
No description
at line 134
Row
fetch($sql, ...$params)
Shortcut for query()->fetch()
at line 145
mixed
fetchField($sql, ...$params)
Shortcut for query()->fetchField()
at line 156
array|null
fetchFields($sql, ...$params)
Shortcut for query()->fetchFields()
at line 167
array
fetchPairs($sql, ...$params)
Shortcut for query()->fetchPairs()
at line 178
array
fetchAll($sql, ...$params)
Shortcut for query()->fetchAll()
at line 187
static SqlLiteral
literal($value, ...$params)
No description
Traits
SmartObject