db\QueryBuilder dropCommentFromTable()

dropCommentFromTable() public method (available since version 2.0.8) Builds a SQL command for adding comment to table public string dropCommentFromTable ( $table )$table string The table whose column is to be commented. The table name will be properly quoted by the method. return string The SQL statement for adding comment on column

db\QueryBuilder dropCommentFromColumn()

dropCommentFromColumn() public method (available since version 2.0.8) Builds a SQL command for adding comment to column public string dropCommentFromColumn ( $table, $column )$table string The table whose column is to be commented. The table name will be properly quoted by the method. $column string The name of the column to be commented. The column name will be properly quoted by the method. return string The SQL statement for adding comment on column

db\QueryBuilder dropColumn()

dropColumn() public method Builds a SQL statement for dropping a DB column. public string dropColumn ( $table, $column )$table string The table whose column is to be dropped. The name will be properly quoted by the method. $column string The name of the column to be dropped. The name will be properly quoted by the method. return string The SQL statement for dropping a DB column.

db\QueryBuilder delete()

delete() public method Creates a DELETE SQL statement. For example, $sql = $queryBuilder->delete('user', 'status = 0'); The method will properly escape the table and column names. public string delete ( $table, $condition, &$params )$table string The table where the data will be deleted from. $condition array|string The condition that will be put in the WHERE part. Please refer to yii\db\Query::where() on how to specify condition. $params array The binding parameters that w

db\QueryBuilder createTable()

createTable() public method Builds a SQL statement for creating a new DB table. The columns in the new table should be specified as name-definition pairs (e.g. 'name' => 'string'), where name stands for a column name which will be properly quoted by the method, and definition stands for the column type which can contain an abstract DB type. The getColumnType() method will be invoked to convert any abstract type into a physical one. If a column is specified with definition only (e.g. 'PRI

db\QueryBuilder createIndex()

createIndex() public method Builds a SQL statement for creating a new index. public string createIndex ( $name, $table, $columns, $unique = false )$name string The name of the index. The name will be properly quoted by the method. $table string The table that the new index will be created for. The table name will be properly quoted by the method. $columns string|array The column(s) that should be included in the index. If there are multiple columns, separate them with commas or use

db\QueryBuilder checkIntegrity()

checkIntegrity() public method Builds a SQL statement for enabling or disabling integrity check. public string checkIntegrity ( $check = true, $schema = '', $table = '' )$check boolean Whether to turn on or off the integrity check. $schema string The schema of the tables. Defaults to empty string, meaning the current or default schema. $table string The table name. Defaults to empty string, meaning that no table will be changed. return string The SQL statement for checking integrit

db\QueryBuilder buildWhere()

buildWhere() public method public string buildWhere ( $condition, &$params )$condition string|array $params array The binding parameters to be populated return string The WHERE clause built from yii\db\Query::$where.

db\QueryBuilder buildUnion()

buildUnion() public method public string buildUnion ( $unions, &$params )$unions array $params array The binding parameters to be populated return string The UNION clause built from yii\db\Query::$union.

db\QueryBuilder buildSubqueryInCondition()

buildSubqueryInCondition() protected method Builds SQL for IN condition protected string buildSubqueryInCondition ( $operator, $columns, $values, &$params )$operator string $columns array $values yii\db\Query $params array return string SQL