class Context extends Object

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

query($sql)

Generates and executes SQL query.

queryArgs($sql, array $params)

No description

table($table)

No description

getConnection()

No description

getStructure()

No description

getConventions()

No description

getDatabaseReflection() deprecated

No description

Row
fetch($args)

Shortcut for query()->fetch()

mixed
fetchField($args)

Shortcut for query()->fetchField()

array
fetchPairs($args)

Shortcut for query()->fetchPairs()

array
fetchAll($args)

Shortcut for query()->fetchAll()

static SqlLiteral
literal($value)

No description

Details

at line 32
__construct(Connection $connection, IStructure $structure, IConventions $conventions = NULL, IStorage $cacheStorage = NULL)

No description

Parameters

Connection $connection
IStructure $structure
IConventions $conventions
IStorage $cacheStorage

at line 42
void beginTransaction()

No description

Return Value

void

at line 49
void commit()

No description

Return Value

void

at line 56
void rollBack()

No description

Return Value

void

at line 66
string getInsertId($name = NULL)

No description

Parameters

$name

Return Value

string

at line 78
ResultSet query($sql)

Generates and executes SQL query.

Parameters

$sql

Return Value

ResultSet

at line 88
ResultSet queryArgs($sql, array $params)

No description

Parameters

$sql
array $params

Return Value

ResultSet

at line 98
Selection table($table)

No description

Parameters

$table

Return Value

Selection

at line 105
Connection getConnection()

No description

Return Value

Connection

at line 112
IStructure getStructure()

No description

Return Value

IStructure

at line 119
IConventions getConventions()

No description

Return Value

IConventions

at line 126
getDatabaseReflection() deprecated

deprecated

No description

at line 142
Row fetch($args)

Shortcut for query()->fetch()

Parameters

$args

Return Value

Row

at line 154
mixed fetchField($args)

Shortcut for query()->fetchField()

Parameters

$args

Return Value

mixed

at line 166
array fetchPairs($args)

Shortcut for query()->fetchPairs()

Parameters

$args

Return Value

array

at line 178
array fetchAll($args)

Shortcut for query()->fetchAll()

Parameters

$args

Return Value

array

at line 187
static SqlLiteral literal($value)

No description

Parameters

$value

Return Value

SqlLiteral