A

AmbiguousReferenceKeyExceptionClass in namespace Nette\Database\Conventions

Multiple matching columns found for a relationship reference.

Engine::applyLimit() — Method in class Engine

Applies LIMIT and OFFSET clauses to an SQL query.

MSSQLEngine::applyLimit() — Method in class MSSQLEngine

Applies LIMIT and OFFSET clauses to an SQL query.

MySQLEngine::applyLimit() — Method in class MySQLEngine

Applies LIMIT and OFFSET clauses to an SQL query.

ODBCEngine::applyLimit() — Method in class ODBCEngine

Applies LIMIT and OFFSET clauses to an SQL query.

OracleEngine::applyLimit() — Method in class OracleEngine

Applies LIMIT and OFFSET clauses to an SQL query.

PostgreSQLEngine::applyLimit() — Method in class PostgreSQLEngine

Applies LIMIT and OFFSET clauses to an SQL query.

SQLServerEngine::applyLimit() — Method in class SQLServerEngine

Applies LIMIT and OFFSET clauses to an SQL query.

SQLiteEngine::applyLimit() — Method in class SQLiteEngine

Applies LIMIT and OFFSET clauses to an SQL query.

Structure::analyzePrimaryKey() — Method in class Structure
Structure::analyzeForeignKeys() — Method in class Structure
ActiveRowClass in namespace Nette\Database\Table

Represents database row with support for relations.

ActiveRow::accessColumn() — Method in class ActiveRow
$ GroupedSelection#activeProperty in class GroupedSelection

primary key

GroupedSelection::aggregation() — Method in class GroupedSelection

Calculates aggregation for this group.

$ Selection#aggregationProperty in class Selection
$ Selection#accessedColumnsProperty in class Selection
Selection::alias() — Method in class Selection

Aliases table. Example ':book:book_tag.tag', 'tg'

Selection::aggregation() — Method in class Selection

Executes aggregation function.

Selection::accessColumn() — Method in class Selection
$ SqlBuilder#aliasesProperty in class SqlBuilder
SqlBuilder::addSelect() — Method in class SqlBuilder

Adds SELECT clause, more calls append to the end.

SqlBuilder::addWhere() — Method in class SqlBuilder

Adds WHERE condition, more calls append with AND.

SqlBuilder::addJoinCondition() — Method in class SqlBuilder

Adds JOIN condition.

SqlBuilder::addCondition() — Method in class SqlBuilder

Normalizes and appends a condition with its parameters. Deduplicates identical conditions.

SqlBuilder::addAlias() — Method in class SqlBuilder

Adds alias AS.

SqlBuilder::addOrder() — Method in class SqlBuilder

Adds ORDER BY clause, more calls append to the end.

SqlBuilder::addConditionComposition() — Method in class SqlBuilder

Adds a multi-column IN condition using OR expansion or tuple syntax depending on driver support.

B

DatabaseExtension::beforeCompile() — Method in class DatabaseExtension
Database::beginTransaction() — Method in class Database

Starts a transaction.

LazyConnection::beginTransaction() — Method in class LazyConnection

Starts a new database transaction.

Connection::beginTransaction() — Method in class Connection

Starts a new database transaction.

Connection::beginTransaction() — Method in class Connection

Starts a new database transaction.

SqlBuilder::buildInsertQuery() — Method in class SqlBuilder
SqlBuilder::buildUpdateQuery() — Method in class SqlBuilder
SqlBuilder::buildDeleteQuery() — Method in class SqlBuilder
SqlBuilder::buildSelectQuery() — Method in class SqlBuilder

Returns SQL query.

SqlBuilder::buildSelect() — Method in class SqlBuilder
SqlBuilder::buildQueryJoins() — Method in class SqlBuilder
SqlBuilder::buildJoinConditions() — Method in class SqlBuilder
SqlBuilder::buildConditions() — Method in class SqlBuilder
SqlBuilder::buildQueryEnd() — Method in class SqlBuilder

C

DatabaseExtension::createRowMapping() — Method in class DatabaseExtension
ConnectionPanelClass in namespace Nette\Bridges\DatabaseTracy

Tracy Bar panel showing executed SQL queries with timing and EXPLAIN support.

CheckConstraintViolationExceptionClass in namespace Nette\Database

A CHECK constraint check failed.

ConnectionClass in namespace Nette\Database
ConnectionExceptionClass in namespace Nette\Database

Failed to connect to the database server.

ConnectionLostExceptionClass in namespace Nette\Database

The connection to the server was lost during an operation (e.g. server restart, network failure, idle-timeout). A reconnect is needed before the connection can be used again.

ConstraintViolationExceptionClass in namespace Nette\Database

A database constraint was violated.

ContextClass in namespace Nette\Database
ConventionsClass in namespace Nette\Database

Provides naming conventions for database tables and columns.

Database::createFromParameters() — Method in class Database
Database::createFromDsn() — Method in class Database
Database::connect() — Method in class Database
Database::commit() — Method in class Database

Commits current transaction.

Database::createSavepoint() — Method in class Database
LazyConnection::commit() — Method in class LazyConnection

Commits the current database transaction.

ConnectionClass in namespace Nette\Database\Drivers

Provides methods for executing queries and managing transactions.

Connection::commit() — Method in class Connection

Commits the current database transaction.

Driver::connect() — Method in class Driver

Establishes a connection to the database.

Driver::createEngine() — Method in class Driver

Creates a engine instance for the specific database platform.

Engine::classifyException() — Method in class Engine

Maps a driver exception to an appropriate exception class.

Engine::convertToPhp() — Method in class Engine

Converts a value from the database to a PHP value.

MSSQLEngine::classifyException() — Method in class MSSQLEngine

Maps a driver exception to an appropriate exception class.

MSSQLEngine::convertToPhp() — Method in class MSSQLEngine

Converts a value from the database to a PHP value.

MySQLEngine::classifyException() — Method in class MySQLEngine

Maps a driver exception to an appropriate exception class.

MySQLEngine::convertToPhp() — Method in class MySQLEngine

Converts a value from the database to a PHP value.

ODBCEngine::classifyException() — Method in class ODBCEngine

Maps a driver exception to an appropriate exception class.

ODBCEngine::convertToPhp() — Method in class ODBCEngine

Converts a value from the database to a PHP value.

OracleEngine::classifyException() — Method in class OracleEngine

Maps a driver exception to an appropriate exception class.

OracleEngine::convertToPhp() — Method in class OracleEngine

Converts a value from the database to a PHP value.

PostgreSQLEngine::classifyException() — Method in class PostgreSQLEngine

Maps a driver exception to an appropriate exception class.

PostgreSQLEngine::convertToPhp() — Method in class PostgreSQLEngine

Converts a value from the database to a PHP value.

SQLServerEngine::classifyException() — Method in class SQLServerEngine

Maps a driver exception to an appropriate exception class.

SQLServerEngine::convertToPhp() — Method in class SQLServerEngine

Converts a value from the database to a PHP value.

SQLiteEngine::classifyException() — Method in class SQLiteEngine

Maps a driver exception to an appropriate exception class.

SQLiteEngine::convertToPhp() — Method in class SQLiteEngine

Converts a value from the database to a PHP value.

ConnectionClass in namespace Nette\Database\Drivers\PDO
Connection::commit() — Method in class Connection

Commits the current database transaction.

Driver::connect() — Method in class Driver

Establishes a connection to the database.

Driver::createEngine() — Method in class Driver

Creates a engine instance for the specific database platform.

Driver::connect() — Method in class Driver

Establishes a connection to the database.

Driver::createEngine() — Method in class Driver

Creates a engine instance for the specific database platform.

Driver::createEngine() — Method in class Driver

Creates a engine instance for the specific database platform.

Driver::createEngine() — Method in class Driver

Creates a engine instance for the specific database platform.

Driver::connect() — Method in class Driver

Establishes a connection to the database.

Driver::createEngine() — Method in class Driver

Creates a engine instance for the specific database platform.

Result::collectColumnsInfo() — Method in class Result
Result::collectColumnsInfo() — Method in class Result
Driver::connect() — Method in class Driver

Establishes a connection to the database.

Driver::createEngine() — Method in class Driver

Creates a engine instance for the specific database platform.

Driver::connect() — Method in class Driver

Establishes a connection to the database.

Driver::createEngine() — Method in class Driver

Creates a engine instance for the specific database platform.

Explorer::createActiveRow() — Method in class Explorer
Explorer::createGroupedSelectionInstance() — Method in class Explorer
Helpers::createDebugPanel() — Method in class Helpers
ColumnClass in namespace Nette\Database\Reflection

Database table column metadata.

$ Table#columnsProperty in class Table
GroupedSelection::count() — Method in class GroupedSelection

Returns count of fetched rows, or runs COUNT($column) query when column is specified.

$ Selection#cacheProperty in class Selection
Selection::condition() — Method in class Selection

Adds a WHERE or JOIN condition. When $tableChain is given, the condition is added to the JOIN ON clause.

Selection::count() — Method in class Selection

Returns count of fetched rows, or runs COUNT($column) query when column is specified.

Selection::createSelectionInstance() — Method in class Selection
$ SqlBuilder#conventionsProperty in class SqlBuilder
$ SqlBuilder#conditionsProperty in class SqlBuilder
$ SqlBuilder#currentAliasProperty in class SqlBuilder
SqlBuilder::checkUniqueTableName() — Method in class SqlBuilder

Ensures a table alias is not used for two different chains, throwing on conflict.

$ TypeConverter#convertBooleanProperty in class TypeConverter
$ TypeConverter#convertDateTimeProperty in class TypeConverter
$ TypeConverter#convertDecimalProperty in class TypeConverter
TypeConverter::convertToPhp() — Method in class TypeConverter

D

DatabaseExtensionClass in namespace Nette\Bridges\DatabaseDI

Registers database Connection, Structure, and Explorer services in the DI container.

$ ConnectionPanel#disabledProperty in class ConnectionPanel
DiscoveredConventionsClass in namespace Nette\Database\Conventions

Discovers database conventions based on table structure metadata.

DatabaseClass in namespace Nette\Database

Manages database connection and executes SQL queries.

Database::disconnect() — Method in class Database

Disconnects from database.

DateTimeClass in namespace Nette\Database

Immutable date-time value with JSON and string serialization support.

DeadlockExceptionClass in namespace Nette\Database

Deadlock or serialization failure detected by the server; the transaction was rolled back and can be retried.

DriverExceptionClass in namespace Nette\Database

Base class for all errors in the driver or SQL server.

DriverClass in namespace Nette\Database\Drivers

Creates connection and database engine instances.

Engine::delimit() — Method in class Engine

Adds delimiters around database identifier.

MSSQLEngine::delimit() — Method in class MSSQLEngine

Adds delimiters around database identifier.

MySQLEngine::delimit() — Method in class MySQLEngine

Adds delimiters around database identifier.

ODBCEngine::delimit() — Method in class ODBCEngine

Adds delimiters around database identifier.

OracleEngine::delimit() — Method in class OracleEngine

Adds delimiters around database identifier.

PostgreSQLEngine::delimit() — Method in class PostgreSQLEngine

Adds delimiters around database identifier.

SQLServerEngine::delimit() — Method in class SQLServerEngine

Adds delimiters around database identifier.

SQLiteEngine::delimit() — Method in class SQLiteEngine

Adds delimiters around database identifier.

DriverClass in namespace Nette\Database\Drivers\PDO

Base PDO database driver.

DriverClass in namespace Nette\Database\Drivers\PDO\MSSQL

PDO MS SQL database driver.

DriverClass in namespace Nette\Database\Drivers\PDO\MySQL

PDO MySQL database driver.

DriverClass in namespace Nette\Database\Drivers\PDO\OCI

PDO Oracle database driver.

DriverClass in namespace Nette\Database\Drivers\PDO\ODBC

PDO ODBC database driver.

DriverClass in namespace Nette\Database\Drivers\PDO\PgSQL

PDO PostgreSQL database driver.

DriverClass in namespace Nette\Database\Drivers\PDO\SQLSrv

PDO SQL Server database driver.

DriverClass in namespace Nette\Database\Drivers\PDO\SQLite

PDO SQLite database driver.

Helpers::dumpResult() — Method in class Helpers

Displays result set as HTML table.

Helpers::dumpSql() — Method in class Helpers

Returns syntax-highlighted SQL query as an HTML string.

Result::dump() — Method in class Result

Displays result set as HTML table.

ActiveRow::delete() — Method in class ActiveRow

Deletes the row from database.

GroupedSelection::delete() — Method in class GroupedSelection

Deletes all rows matching current conditions.

$ Selection#dataProperty in class Selection
$ Selection#dataRefreshedProperty in class Selection
Selection::delete() — Method in class Selection

Deletes all rows matching current conditions.

$ SqlBuilder#delimitedTableProperty in class SqlBuilder

E

$ ConnectionPanel#explainProperty in class ConnectionPanel
LazyConnection::execute() — Method in class LazyConnection

Executes an SQL command and returns the number of affected rows.

Connection::execute() — Method in class Connection

Executes an SQL command and returns the number of affected rows.

EngineClass in namespace Nette\Database\Drivers

Database platform specific operations and reflection capabilities.

Connection::execute() — Method in class Connection

Executes an SQL command and returns the number of affected rows.

Driver::exceptionArgs() — Method in class Driver
ExplorerClass in namespace Nette\Database

Manages database connection and executes SQL queries.

GroupedSelection::execute() — Method in class GroupedSelection
GroupedSelection::emptyResultSet() — Method in class GroupedSelection
$ Selection#explorerProperty in class Selection
Selection::execute() — Method in class Selection
Selection::emptyResultSet() — Method in class Selection

F

Database::fetch() — Method in class Database

Shortcut for query()->fetch()

Database::fetchAssoc() — Method in class Database

Shortcut for query()->fetchAssoc()

Database::fetchField() — Method in class Database

Shortcut for query()->fetchField()

Database::fetchList() — Method in class Database

Shortcut for query()->fetchList()

Database::fetchFields() — Method in class Database

Shortcut for query()->fetchList()

Database::fetchPairs() — Method in class Database

Shortcut for query()->fetchPairs()

Database::fetchAll() — Method in class Database

Shortcut for query()->fetchAll()

DriverException::from() — Method in class DriverException
Engine::formatDateTime() — Method in class Engine

Formats a date-time value for use in an SQL statement.

Engine::formatDateInterval() — Method in class Engine

Formats a date-time interval for use in an SQL statement.

MSSQLEngine::formatDateTime() — Method in class MSSQLEngine

Formats a date-time value for use in an SQL statement.

MSSQLEngine::formatDateInterval() — Method in class MSSQLEngine

Formats a date-time interval for use in an SQL statement.

MySQLEngine::formatDateTime() — Method in class MySQLEngine

Formats a date-time value for use in an SQL statement.

MySQLEngine::formatDateInterval() — Method in class MySQLEngine

Formats a date-time interval for use in an SQL statement.

ODBCEngine::formatDateTime() — Method in class ODBCEngine

Formats a date-time value for use in an SQL statement.

ODBCEngine::formatDateInterval() — Method in class ODBCEngine

Formats a date-time interval for use in an SQL statement.

$ OracleEngine#formatDateTimeProperty in class OracleEngine
OracleEngine::formatDateTime() — Method in class OracleEngine

Formats a date-time value for use in an SQL statement.

OracleEngine::formatDateInterval() — Method in class OracleEngine

Formats a date-time interval for use in an SQL statement.

PostgreSQLEngine::formatDateTime() — Method in class PostgreSQLEngine

Formats a date-time value for use in an SQL statement.

PostgreSQLEngine::formatDateInterval() — Method in class PostgreSQLEngine

Formats a date-time interval for use in an SQL statement.

SQLServerEngine::formatDateTime() — Method in class SQLServerEngine

Formats a date-time value for use in an SQL statement.

SQLServerEngine::formatDateInterval() — Method in class SQLServerEngine

Formats a date-time interval for use in an SQL statement.

$ SQLiteEngine#formatDateTimeProperty in class SQLiteEngine
SQLiteEngine::formatDateTime() — Method in class SQLiteEngine

Formats a date-time value for use in an SQL statement.

SQLiteEngine::formatDateInterval() — Method in class SQLiteEngine

Formats a date-time interval for use in an SQL statement.

Result::fetch() — Method in class Result

Fetches the next row from the result set as an associative array.

Result::fetchList() — Method in class Result

Fetches the next row from the result set as an indexed array.

Result::free() — Method in class Result

Frees the result set.

Result::fetch() — Method in class Result

Fetches the next row from the result set as an associative array.

Result::fetchList() — Method in class Result

Fetches the next row from the result set as an indexed array.

Result::free() — Method in class Result

Frees the result set.

ForeignKeyConstraintViolationExceptionClass in namespace Nette\Database

The foreign key constraint check failed.

ForeignKeyClass in namespace Nette\Database\Reflection

Database foreign key relationship.

$ Table#foreignKeysProperty in class Table
Result::fetchAssoc() — Method in class Result

Returns the next row as an associative array, or null if there are no more rows.

Result::fetch() — Method in class Result

Returns the next row as a Row object or null if there are no more rows.

Result::fetchField() — Method in class Result

Returns the first field of the next row or null if there are no more rows.

Result::fetchList() — Method in class Result

Returns the next row as indexed array or null if there are no more rows.

Result::fetchFields() — Method in class Result

Alias for fetchList().

Result::fetchPairs() — Method in class Result
Result::fetchAll() — Method in class Result

Returns all remaining rows as array of Row objects.

Selection::fetch() — Method in class Selection

Returns the next row or null if there are no more rows.

Selection::fetchField() — Method in class Selection

Fetches single field.

Selection::fetchPairs() — Method in class Selection

Returns all rows as associative array, where first argument specifies key column and second value column.

Selection::fetchAll() — Method in class Selection

Returns all rows as an array indexed by primary key.

Selection::fetchAssoc() — Method in class Selection

Returns all rows as associative tree.

G

DatabaseExtension::getConfigSchema() — Method in class DatabaseExtension
ConnectionPanel::getTab() — Method in class ConnectionPanel
ConnectionPanel::getPanel() — Method in class ConnectionPanel
Conventions::getPrimary() — Method in class Conventions

Returns primary key for table.

Conventions::getHasManyReference() — Method in class Conventions

Returns the referencing table name and referencing column for a has-many relationship.

Conventions::getBelongsToReference() — Method in class Conventions

Returns the referenced table name and local foreign key column for a belongs-to relationship.

DiscoveredConventions::getPrimary() — Method in class DiscoveredConventions

Returns primary key for table.

DiscoveredConventions::getHasManyReference() — Method in class DiscoveredConventions

Finds the referencing table and column for a has-many relationship by searching structure metadata.

DiscoveredConventions::getBelongsToReference() — Method in class DiscoveredConventions

Finds the referenced table and local foreign key column for a belongs-to relationship.

StaticConventions::getPrimary() — Method in class StaticConventions

Returns primary key for table.

StaticConventions::getHasManyReference() — Method in class StaticConventions

Returns the referencing table name and referencing column for a has-many relationship.

StaticConventions::getBelongsToReference() — Method in class StaticConventions

Returns the referenced table name and local foreign key column for a belongs-to relationship.

StaticConventions::getColumnFromTable() — Method in class StaticConventions
Database::getDsn() — Method in class Database
Database::getPdo() — Method in class Database
Database::getConnection() — Method in class Database
Database::getSupplementalDriver() — Method in class Database
Database::getDatabaseEngine() — Method in class Database
Database::getServerVersion() — Method in class Database
Database::getReflection() — Method in class Database
Database::getTypeConverter() — Method in class Database
Database::getInsertId() — Method in class Database
Database::getLastQuery() — Method in class Database
Database::getLastQueryString() — Method in class Database
Database::getCache() — Method in class Database
Database::getConventions() — Method in class Database
Database::getStructure() — Method in class Database
DriverException::getDriverCode() — Method in class DriverException
DriverException::getSqlState() — Method in class DriverException

Returns the SQLSTATE error code, or null if not available.

DriverException::getQuery() — Method in class DriverException
DriverException::getQueryString() — Method in class DriverException
DriverException::getParameters() — Method in class DriverException
LazyConnection::getNativeConnection() — Method in class LazyConnection

Returns the underlying database connection object.

LazyConnection::getInsertId() — Method in class LazyConnection

Returns the ID of the last inserted row or sequence value.

LazyConnection::getServerVersion() — Method in class LazyConnection

Returns the version of the database server.

Connection::getNativeConnection() — Method in class Connection

Returns the underlying database connection object.

Connection::getInsertId() — Method in class Connection

Returns the ID of the last inserted row or sequence value.

Connection::getServerVersion() — Method in class Connection

Returns the version of the database server.

Engine::getTables() — Method in class Engine

Returns a list of all tables in the database.

Engine::getColumns() — Method in class Engine

Returns metadata for all columns in a table.

Engine::getIndexes() — Method in class Engine

Returns metadata for all indexes in a table.

Engine::getForeignKeys() — Method in class Engine

Returns metadata for all foreign keys in a table.

MSSQLEngine::getTables() — Method in class MSSQLEngine

Returns a list of all tables in the database.

MSSQLEngine::getColumns() — Method in class MSSQLEngine

Returns metadata for all columns in a table.

MSSQLEngine::getIndexes() — Method in class MSSQLEngine

Returns metadata for all indexes in a table.

MSSQLEngine::getForeignKeys() — Method in class MSSQLEngine

Returns metadata for all foreign keys in a table.

MySQLEngine::getTables() — Method in class MySQLEngine

Returns a list of all tables in the database.

MySQLEngine::getColumns() — Method in class MySQLEngine

Returns metadata for all columns in a table.

MySQLEngine::getIndexes() — Method in class MySQLEngine

Returns metadata for all indexes in a table.

MySQLEngine::getForeignKeys() — Method in class MySQLEngine

Returns metadata for all foreign keys in a table.

ODBCEngine::getTables() — Method in class ODBCEngine

Returns a list of all tables in the database.

ODBCEngine::getColumns() — Method in class ODBCEngine

Returns metadata for all columns in a table.

ODBCEngine::getIndexes() — Method in class ODBCEngine

Returns metadata for all indexes in a table.

ODBCEngine::getForeignKeys() — Method in class ODBCEngine

Returns metadata for all foreign keys in a table.

OracleEngine::getTables() — Method in class OracleEngine

Returns a list of all tables in the database.

OracleEngine::getColumns() — Method in class OracleEngine

Returns metadata for all columns in a table.

OracleEngine::getIndexes() — Method in class OracleEngine

Returns metadata for all indexes in a table.

OracleEngine::getForeignKeys() — Method in class OracleEngine

Returns metadata for all foreign keys in a table.

PostgreSQLEngine::getTables() — Method in class PostgreSQLEngine

Returns a list of all tables in the database.

PostgreSQLEngine::getColumns() — Method in class PostgreSQLEngine

Returns metadata for all columns in a table.

PostgreSQLEngine::getIndexes() — Method in class PostgreSQLEngine

Returns metadata for all indexes in a table.

PostgreSQLEngine::getForeignKeys() — Method in class PostgreSQLEngine

Returns metadata for all foreign keys in a table.

SQLServerEngine::getTables() — Method in class SQLServerEngine

Returns a list of all tables in the database.

SQLServerEngine::getColumns() — Method in class SQLServerEngine

Returns metadata for all columns in a table.

SQLServerEngine::getIndexes() — Method in class SQLServerEngine

Returns metadata for all indexes in a table.

SQLServerEngine::getForeignKeys() — Method in class SQLServerEngine

Returns metadata for all foreign keys in a table.

SQLiteEngine::getTables() — Method in class SQLiteEngine

Returns a list of all tables in the database.

SQLiteEngine::getColumns() — Method in class SQLiteEngine

Returns metadata for all columns in a table.

SQLiteEngine::getIndexes() — Method in class SQLiteEngine

Returns metadata for all indexes in a table.

SQLiteEngine::getForeignKeys() — Method in class SQLiteEngine

Returns metadata for all foreign keys in a table.

Connection::getInsertId() — Method in class Connection

Returns the ID of the last inserted row or sequence value.

Connection::getServerVersion() — Method in class Connection

Returns the version of the database server.

Connection::getNativeConnection() — Method in class Connection

Returns the underlying database connection object.

Result::getColumnCount() — Method in class Result

Returns the number of columns in the result set.

Result::getRowCount() — Method in class Result

Returns the number of rows in the result set or number of affected rows

Result::getColumnsInfo() — Method in class Result

Returns metadata for all columns in a result set.

Result::getColumnCount() — Method in class Result

Returns the number of columns in the result set.

Result::getRowCount() — Method in class Result

Returns the number of rows in the result set or number of affected rows

Result::getColumnsInfo() — Method in class Result

Returns metadata for all columns in a result set.

Reflection::getTables() — Method in class Reflection
Reflection::getTable() — Method in class Reflection

Returns table metadata.

Reflection::getDatabaseEngine() — Method in class Reflection
Table::getColumn() — Method in class Table

Returns column object or throws exception if column doesn't exist.

Result::getConnection() — Method in class Result
Result::getQuery() — Method in class Result
Result::getQueryString() — Method in class Result
Result::getParameters() — Method in class Result
Result::getColumnCount() — Method in class Result
Result::getRowCount() — Method in class Result
Result::getTime() — Method in class Result
Result::getIterator() — Method in class Result
SqlLiteral::getSql() — Method in class SqlLiteral
SqlLiteral::getParameters() — Method in class SqlLiteral
Structure::getTables() — Method in class Structure
Structure::getColumns() — Method in class Structure
Structure::getPrimaryKey() — Method in class Structure
Structure::getPrimaryAutoincrementKey() — Method in class Structure

Returns the name of the autoincrement primary key column, or null if none exists.

Structure::getPrimaryKeySequence() — Method in class Structure

Returns the sequence name for the primary key column, or null if not applicable.

Structure::getHasManyReference() — Method in class Structure
Structure::getBelongsToReference() — Method in class Structure
ActiveRow::getTable() — Method in class ActiveRow
ActiveRow::getExplorer() — Method in class ActiveRow
ActiveRow::getPrimary() — Method in class ActiveRow

Returns primary key value, or an array of values for composite primary keys.

ActiveRow::getSignature() — Method in class ActiveRow

Returns row signature (composition of primary keys).

ActiveRow::getIterator() — Method in class ActiveRow
GroupedSelectionClass in namespace Nette\Database\Table

Represents filtered table grouped by referencing table.

GroupedSelection::getRefTable() — Method in class GroupedSelection
$ Selection#globalRefCacheProperty in class Selection

cache array of Selection and GroupedSelection prototypes

$ Selection#generalCacheKeyProperty in class Selection
Selection::getName() — Method in class Selection
Selection::getPrimary() — Method in class Selection

Returns table primary key.

Selection::getPrimarySequence() — Method in class Selection
Selection::getSql() — Method in class Selection
Selection::getPreviousAccessedColumns() — Method in class Selection

Loads cache of previous accessed columns and returns it.

Selection::getSqlBuilder() — Method in class Selection
Selection::getExplorer() — Method in class Selection
Selection::get() — Method in class Selection

Returns row specified by primary key.

Selection::group() — Method in class Selection

Sets GROUP BY clause, more calls rewrite old value.

Selection::getRefTable() — Method in class Selection

Returns the root Selection used as the shared cache anchor for referenced rows.

Selection::getGeneralCacheKey() — Method in class Selection

Returns general cache key independent of query parameters or SQL limit.

Selection::getSpecificCacheKey() — Method in class Selection

Returns object-specific cache key dependent on query parameters.

Selection::getDataRefreshed() — Method in class Selection

Checks whether the selection re-queried for additional columns.

Selection::getReferencedTable() — Method in class Selection

Returns a referenced (parent) row for a belongs-to relationship.

Selection::getReferencingTable() — Method in class Selection

Returns a grouped selection of referencing (child) rows for a has-many relationship.

Selection::getIterator() — Method in class Selection
$ SqlBuilder#groupProperty in class SqlBuilder
SqlBuilder::getTableName() — Method in class SqlBuilder
SqlBuilder::getSelectQueryHash() — Method in class SqlBuilder

Returns select query hash for caching.

SqlBuilder::getParameters() — Method in class SqlBuilder
SqlBuilder::getSelect() — Method in class SqlBuilder
SqlBuilder::getConditions() — Method in class SqlBuilder
SqlBuilder::getOrder() — Method in class SqlBuilder
SqlBuilder::getLimit() — Method in class SqlBuilder
SqlBuilder::getOffset() — Method in class SqlBuilder
SqlBuilder::getGroup() — Method in class SqlBuilder
SqlBuilder::getHaving() — Method in class SqlBuilder
SqlBuilder::getSortedJoins() — Method in class SqlBuilder

H

HelpersClass in namespace Nette\Database

Database utility functions.

Reflection::hasTable() — Method in class Reflection
Selection::having() — Method in class Selection

Sets HAVING clause, more calls rewrite old value.

$ SqlBuilder#havingProperty in class SqlBuilder

I

ConnectionPanel::initialize() — Method in class ConnectionPanel

Registers the panel with Tracy. Optionally adds it to the Tracy Bar.

Engine::isSupported() — Method in class Engine

Checks if the engine supports a specific feature.

MSSQLEngine::isSupported() — Method in class MSSQLEngine

Checks if the engine supports a specific feature.

MySQLEngine::isSupported() — Method in class MySQLEngine

Checks if the engine supports a specific feature.

ODBCEngine::isSupported() — Method in class ODBCEngine

Checks if the engine supports a specific feature.

OracleEngine::isSupported() — Method in class OracleEngine

Checks if the engine supports a specific feature.

PostgreSQLEngine::isSupported() — Method in class PostgreSQLEngine

Checks if the engine supports a specific feature.

SQLServerEngine::isSupported() — Method in class SQLServerEngine

Checks if the engine supports a specific feature.

SQLiteEngine::isSupported() — Method in class SQLiteEngine

Checks if the engine supports a specific feature.

Helpers::initializeTracy() — Method in class Helpers
IndexClass in namespace Nette\Database\Reflection

Database table index.

$ Table#indexesProperty in class Table
$ Structure#isRebuiltProperty in class Structure
Structure::isRebuilt() — Method in class Structure

Checks whether the structure has been rebuilt from the database during this request.

GroupedSelection::insert() — Method in class GroupedSelection
Selection::insert() — Method in class Selection

Inserts one or more rows into the table.

SqlBuilder::importConditions() — Method in class SqlBuilder

Copies WHERE conditions and aliases from another builder.

SqlBuilder::importGroupConditions() — Method in class SqlBuilder

Copies GROUP BY and HAVING clauses from another builder. Returns true if HAVING was present.

J

DateTime::jsonSerialize() — Method in class DateTime

Returns JSON representation in ISO 8601 (used by JavaScript).

Selection::joinWhere() — Method in class Selection

Adds ON condition when joining specified table, more calls appends with AND.

$ SqlBuilder#joinConditionProperty in class SqlBuilder

L

DatabaseExtension::loadConfiguration() — Method in class DatabaseExtension
Database::literal() — Method in class Database

Creates SQL literal value.

LazyConnectionClass in namespace Nette\Database\Drivers\Accessory
Helpers::loadFromFile() — Method in class Helpers

Imports SQL dump from file.

LockTimeoutExceptionClass in namespace Nette\Database

A lock wait exceeded the configured timeout. The statement was aborted, typically leaving the surrounding transaction alive.

Structure::loadStructure() — Method in class Structure

Loads complete structure from database.

GroupedSelection::loadRefCache() — Method in class GroupedSelection

Initializes the reference cache for the current selection. Overridden by GroupedSelection.

Selection::limit() — Method in class Selection

Sets LIMIT clause, more calls rewrite old values.

Selection::loadRefCache() — Method in class Selection

Initializes the reference cache for the current selection. Overridden by GroupedSelection.

$ SqlBuilder#limitProperty in class SqlBuilder

M

$ ConnectionPanel#maxQueriesProperty in class ConnectionPanel
MSSQLEngineClass in namespace Nette\Database\Drivers\Engines

MS SQL database platform.

MySQLEngineClass in namespace Nette\Database\Drivers\Engines

MySQL-like database platform.

$ Connection#metaTypeKeyProperty in class Connection
$ Helpers#maxLengthProperty in class Helpers

maximum SQL length

Selection::min() — Method in class Selection

Returns minimum value from a column.

Selection::max() — Method in class Selection

Returns maximum value from a column.

N

$ ConnectionPanel#nameProperty in class ConnectionPanel
NotNullConstraintViolationExceptionClass in namespace Nette\Database

The NOT NULL constraint check failed.

Structure::needStructure() — Method in class Structure

Ensures the structure is loaded, from cache or from the database.

$ Selection#nameProperty in class Selection

table name

$ TypeConverter#newDateTimeProperty in class TypeConverter

O

$ Database#onConnectProperty in class Database
$ Database#onQueryProperty in class Database
ODBCEngineClass in namespace Nette\Database\Drivers\Engines

Microsoft ODBC database platform.

OracleEngineClass in namespace Nette\Database\Drivers\Engines

Oracle database platform.

Row::offsetGet() — Method in class Row

Returns an item by key or numeric index.

Row::offsetExists() — Method in class Row

Checks if a key or numeric index exists.

ActiveRow::offsetSet() — Method in class ActiveRow
ActiveRow::offsetGet() — Method in class ActiveRow
ActiveRow::offsetExists() — Method in class ActiveRow
ActiveRow::offsetUnset() — Method in class ActiveRow
GroupedSelection::order() — Method in class GroupedSelection

Adds an ORDER BY clause. Automatically prepends the grouping column (matching direction) to improve index utilization.

$ Selection#observeCacheProperty in class Selection
Selection::order() — Method in class Selection

Adds ORDER BY clause, more calls appends to the end.

Selection::offsetSet() — Method in class Selection

Sets a row by primary key.

Selection::offsetGet() — Method in class Selection

Returns specified row.

Selection::offsetExists() — Method in class Selection

Tests if row exists.

Selection::offsetUnset() — Method in class Selection

Removes row from result set.

$ SqlBuilder#orderProperty in class SqlBuilder
$ SqlBuilder#offsetProperty in class SqlBuilder

P

$ ConnectionPanel#performanceScaleProperty in class ConnectionPanel
Database::preprocess() — Method in class Database
PostgreSQLEngineClass in namespace Nette\Database\Drivers\Engines

PostgreSQL database platform.

Helpers::parseColumnType() — Method in class Helpers

Parses a SQL column type string into its components.

$ Table#primaryKeyProperty in class Table
SqlPreprocessor::process() — Method in class SqlPreprocessor

Processes SQL query with parameter substitution.

$ Selection#primaryProperty in class Selection
$ Selection#primarySequenceProperty in class Selection

primary column sequence name, false for autodetection

$ Selection#previousAccessedColumnsProperty in class Selection
Selection::page() — Method in class Selection

Sets LIMIT and OFFSET for the given page number. Optionally calculates total number of pages.

$ SqlBuilder#parametersProperty in class SqlBuilder
SqlBuilder::parseJoinConditions() — Method in class SqlBuilder
SqlBuilder::parseJoins() — Method in class SqlBuilder
SqlBuilder::parseJoinsCb() — Method in class SqlBuilder

Q

Database::quote() — Method in class Database

Quotes string for use in SQL.

Database::query() — Method in class Database

Generates and executes SQL query.

Database::queryArgs() — Method in class Database
LazyConnection::query() — Method in class LazyConnection

Executes an SQL query with optional parameters and returns a result set.

LazyConnection::quote() — Method in class LazyConnection

Quotes a string for use in an SQL statement.

Connection::query() — Method in class Connection

Executes an SQL query with optional parameters and returns a result set.

Connection::quote() — Method in class Connection

Quotes a string for use in an SQL statement.

Connection::query() — Method in class Connection

Executes an SQL query with optional parameters and returns a result set.

Connection::quote() — Method in class Connection

Quotes a string for use in an SQL statement.

Selection::query() — Method in class Selection

R

ConnectionPanel::renderException() — Method in class ConnectionPanel
Database::reconnect() — Method in class Database

Disconnects and connects to database again.

Database::rollBack() — Method in class Database

Rolls back current transaction.

Database::releaseSavepoint() — Method in class Database
LazyConnection::rollBack() — Method in class LazyConnection

Rolls back the current database transaction.

Connection::rollBack() — Method in class Connection

Rolls back the current database transaction.

$ Connection#resultClassProperty in class Connection
Connection::rollBack() — Method in class Connection

Rolls back the current database transaction.

ResultClass in namespace Nette\Database\Drivers\PDO\PgSQL
ResultClass in namespace Nette\Database\Drivers\PDO
ResultClass in namespace Nette\Database\Drivers

Database query result set.

ReflectionClass in namespace Nette\Database

Provides database schema reflection.

ResultClass in namespace Nette\Database

Represents a database result set.

ResultSetClass in namespace Nette\Database
RowClass in namespace Nette\Database

Represents a single database table row.

Structure::rebuild() — Method in class Structure

Rebuilds structure cache.

Structure::resolveFQTableName() — Method in class Structure

Returns normalized table name.

ActiveRow::ref() — Method in class ActiveRow

Returns referenced row, or null if the row does not exist.

ActiveRow::related() — Method in class ActiveRow

Returns referencing rows collection.

ActiveRow::removeAccessColumn() — Method in class ActiveRow
$ GroupedSelection#refCacheCurrentProperty in class GroupedSelection

current assigned referencing array

GroupedSelection::refreshData() — Method in class GroupedSelection

Invalidates cached data and forces reload on next access.

$ Selection#rowsProperty in class Selection
$ Selection#refCacheProperty in class Selection
Selection::removeAccessColumn() — Method in class Selection
$ SqlBuilder#reservedTableNamesProperty in class SqlBuilder
SqlBuilder::resetSelect() — Method in class SqlBuilder

S

StaticConventionsClass in namespace Nette\Database\Conventions

Defines naming conventions for database structure using static patterns.

Database::setRowNormalizer() — Method in class Database
Database::setAutoCommit() — Method in class Database
Database::setCache() — Method in class Database
Database::setConventions() — Method in class Database
SQLServerEngineClass in namespace Nette\Database\Drivers\Engines

Microsoft SQL Server database platform.

SQLiteEngineClass in namespace Nette\Database\Drivers\Engines

SQLite database platform.

Explorer::setRowMapping() — Method in class Explorer
SqlLiteralClass in namespace Nette\Database

SQL literal that will not be escaped.

SqlPreprocessorClass in namespace Nette\Database

Processes SQL queries with parameter substitution.

StructureClass in namespace Nette\Database

Provides database structure metadata with caching.

$ Structure#structureProperty in class Structure
ActiveRow::setTable() — Method in class ActiveRow
GroupedSelection::setActive() — Method in class GroupedSelection

Sets active group.

GroupedSelection::select() — Method in class GroupedSelection

Adds a SELECT clause. Automatically prepends the grouping column if no select exists yet.

SelectionClass in namespace Nette\Database\Table

Represents filtered table result.

$ Selection#sqlBuilderProperty in class Selection
$ Selection#specificCacheKeyProperty in class Selection
Selection::setPrimarySequence() — Method in class Selection
Selection::select() — Method in class Selection

Adds select clause, more calls append to the end.

Selection::sum() — Method in class Selection

Returns sum of values in a column.

Selection::saveCacheState() — Method in class Selection
SqlBuilderClass in namespace Nette\Database\Table

Builds SQL queries for the Explorer layer.

$ SqlBuilder#selectProperty in class SqlBuilder
SqlBuilder::setOrder() — Method in class SqlBuilder
SqlBuilder::setLimit() — Method in class SqlBuilder

Sets LIMIT/OFFSET clause.

SqlBuilder::setGroup() — Method in class SqlBuilder

Sets GROUP BY and HAVING clause.

SqlBuilder::setHaving() — Method in class SqlBuilder

T

Database::transaction() — Method in class Database

Executes callback inside a transaction.

Database::table() — Method in class Database
Helpers::toPairs() — Method in class Helpers
$ Reflection#tablesProperty in class Reflection
TableClass in namespace Nette\Database\Reflection

Database table metadata including columns, indexes, and foreign keys.

ActiveRow::toArray() — Method in class ActiveRow
$ SqlBuilder#tableNameProperty in class SqlBuilder
SqlBuilder::tryDelimit() — Method in class SqlBuilder

Delimits lowercase identifiers in a SQL fragment while leaving uppercase keywords untouched.

TypeConverterClass in namespace Nette\Database
TypeConverter::toInt() — Method in class TypeConverter
TypeConverter::toFloat() — Method in class TypeConverter
TypeConverter::toBool() — Method in class TypeConverter
TypeConverter::toDateTime() — Method in class TypeConverter
TypeConverter::toTime() — Method in class TypeConverter
TypeConverter::toInterval() — Method in class TypeConverter

U

ActiveRow::update() — Method in class ActiveRow

Updates row data and refreshes the instance from database. Returns true if the row was changed.

GroupedSelection::update() — Method in class GroupedSelection

Updates all rows matching current conditions. JOINs in UPDATE are supported only by MySQL.

Selection::update() — Method in class Selection

Updates all rows matching current conditions. JOINs in UPDATE are supported only by MySQL.

UniqueConstraintViolationExceptionClass in namespace Nette\Database

The unique constraint check failed.

W

Selection::wherePrimary() — Method in class Selection

Adds condition for primary key.

Selection::where() — Method in class Selection

Adds where condition, more calls append with AND.

Selection::whereOr() — Method in class Selection

Adds where condition using the OR operator between parameters.

$ SqlBuilder#whereProperty in class SqlBuilder

_

DatabaseExtension::__construct() — Method in class DatabaseExtension
ConnectionPanel::__construct() — Method in class ConnectionPanel
DiscoveredConventions::__construct() — Method in class DiscoveredConventions
StaticConventions::__construct() — Method in class StaticConventions
Database::__construct() — Method in class Database
DateTime::__toString() — Method in class DateTime

Returns the date and time in the format 'Y-m-d H:i:s.u'.

DriverException::__construct() — Method in class DriverException
LazyConnection::__construct() — Method in class LazyConnection
MSSQLEngine::__construct() — Method in class MSSQLEngine
MySQLEngine::__construct() — Method in class MySQLEngine
OracleEngine::__construct() — Method in class OracleEngine
PostgreSQLEngine::__construct() — Method in class PostgreSQLEngine
SQLServerEngine::__construct() — Method in class SQLServerEngine
SQLiteEngine::__construct() — Method in class SQLiteEngine
Connection::__construct() — Method in class Connection
Driver::__construct() — Method in class Driver
Driver::__construct() — Method in class Driver
Driver::__construct() — Method in class Driver
Result::__construct() — Method in class Result
Driver::__construct() — Method in class Driver
Reflection::__construct() — Method in class Reflection
Reflection::__get() — Method in class Reflection
Column::__construct() — Method in class Column
Column::__toString() — Method in class Column
ForeignKey::__construct() — Method in class ForeignKey
ForeignKey::__toString() — Method in class ForeignKey
Index::__construct() — Method in class Index
Index::__toString() — Method in class Index
Table::__construct() — Method in class Table
Table::__get() — Method in class Table
Table::__toString() — Method in class Table
Result::__construct() — Method in class Result
Row::__get() — Method in class Row
Row::__isset() — Method in class Row
SqlLiteral::__construct() — Method in class SqlLiteral
SqlLiteral::__toString() — Method in class SqlLiteral
SqlPreprocessor::__construct() — Method in class SqlPreprocessor
Structure::__construct() — Method in class Structure
ActiveRow::__construct() — Method in class ActiveRow
ActiveRow::__toString() — Method in class ActiveRow
ActiveRow::__set() — Method in class ActiveRow
ActiveRow::__get() — Method in class ActiveRow

Returns column value, or a referenced row if the key matches a relationship.

ActiveRow::__isset() — Method in class ActiveRow
ActiveRow::__unset() — Method in class ActiveRow
GroupedSelection::__construct() — Method in class GroupedSelection

Creates filtered and grouped table representation.

Selection::__construct() — Method in class Selection

Creates filtered table representation.

Selection::__destruct() — Method in class Selection
Selection::__clone() — Method in class Selection
SqlBuilder::__construct() — Method in class SqlBuilder