PHP yii\db Namespace

Nested Namespaces

yii\db\cubrid
yii\db\mssql
yii\db\mysql
yii\db\oci
yii\db\pgsql
yii\db\sqlite

Interfaces

Name Description
ActiveQueryInterface ActiveQueryInterface defines the common interface to be implemented by active record query classes.
ActiveRecordInterface ActiveRecordInterface
QueryInterface The QueryInterface defines the minimum set of methods to be implemented by a database query.

Сlasses

Name Description
ActiveQuery ActiveQuery represents a DB query associated with an Active Record class.
ActiveRecord ActiveRecord is the base class for classes representing relational data in terms of objects.
BaseActiveRecord ActiveRecord is the base class for classes representing relational data in terms of objects.
BatchQueryResult BatchQueryResult represents a batch query from which you can retrieve data in batches.
ColumnSchema ColumnSchema class describes the metadata of a column in a database table.
ColumnSchemaBuilder ColumnSchemaBuilder helps to define database schema types using a PHP interface.
Command Command represents a SQL statement to be executed against a database.
Connection Connection represents a connection to a database via [PDO](http://www.php.net/manual/en/ref.pdo.php).
DataReader DataReader represents a forward-only stream of rows from a query result set.
Exception Exception represents an exception that is caused by some DB-related operations.
Migration Migration is the base class for representing a database migration.
Query Query represents a SELECT SQL statement in a way that is independent of DBMS.
QueryBuilder QueryBuilder builds a SELECT SQL statement based on the specification given as a [[Query]] object.
Schema Schema is the base class for concrete DBMS-specific schema classes.
Transaction Transaction represents a DB transaction.

Traits

Name Description
ActiveQueryTrait ActiveQueryTrait implements the common methods and properties for active record query classes.
ActiveRelationTrait ActiveRelationTrait implements the common methods and properties for active record relation classes.
QueryTrait The BaseQuery trait represents the minimum method set of a database Query.
SchemaBuilderTrait SchemaBuilderTrait contains shortcut methods to create instances of [[ColumnSchemaBuilder]].