PHP 클래스 yii\db\mysql\QueryBuilder

부터: 2.0
저자: Qiang Xue ([email protected])
상속: extends yii\db\QueryBuilder
파일 보기 프로젝트 열기: yiisoft/yii2 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$typeMap mapping from abstract column types (keys) to physical column types (values).

공개 메소드들

메소드 설명
addCommentOnColumn ( $table, $column, $comment )
addCommentOnTable ( $table, $comment )
buildLimit ( $limit, $offset )
checkIntegrity ( boolean $check = true, string $schema = '', string $table = '' ) : string Builds a SQL statement for enabling or disabling integrity check.
createIndex ( $name, $table, $columns, $unique = false )
dropCommentFromColumn ( $table, $column )
dropCommentFromTable ( $table )
dropForeignKey ( string $name, string $table ) : string Builds a SQL statement for dropping a foreign key constraint.
dropPrimaryKey ( string $name, string $table ) : string Builds a SQL statement for removing a primary key constraint to an existing table.
insert ( $table, $columns, &$params )
renameColumn ( string $table, string $oldName, string $newName ) : string Builds a SQL statement for renaming a column.
resetSequence ( string $tableName, mixed $value = null ) : string Creates a SQL statement for resetting the sequence value of a table's primary key.

비공개 메소드들

메소드 설명
getColumnDefinition ( string $table, string $column ) : null | string Gets column definition.

메소드 상세

addCommentOnColumn() 공개 메소드

부터: 2.0.8
public addCommentOnColumn ( $table, $column, $comment )

addCommentOnTable() 공개 메소드

부터: 2.0.8
public addCommentOnTable ( $table, $comment )

buildLimit() 공개 메소드

public buildLimit ( $limit, $offset )

checkIntegrity() 공개 메소드

Builds a SQL statement for enabling or disabling integrity check.
public checkIntegrity ( boolean $check = true, string $schema = '', string $table = '' ) : string
$check boolean whether to turn on or off the integrity check.
$schema string the schema of the tables. Meaningless for MySQL.
$table string the table name. Meaningless for MySQL.
리턴 string the SQL statement for checking integrity

createIndex() 공개 메소드

또한 보기: https://bugs.mysql.com/bug.php?id=48875
public createIndex ( $name, $table, $columns, $unique = false )

dropCommentFromColumn() 공개 메소드

부터: 2.0.8
public dropCommentFromColumn ( $table, $column )

dropCommentFromTable() 공개 메소드

부터: 2.0.8
public dropCommentFromTable ( $table )

dropForeignKey() 공개 메소드

Builds a SQL statement for dropping a foreign key constraint.
public dropForeignKey ( string $name, string $table ) : string
$name string the name of the foreign key constraint to be dropped. The name will be properly quoted by the method.
$table string the table whose foreign is to be dropped. The name will be properly quoted by the method.
리턴 string the SQL statement for dropping a foreign key constraint.

dropPrimaryKey() 공개 메소드

Builds a SQL statement for removing a primary key constraint to an existing table.
public dropPrimaryKey ( string $name, string $table ) : string
$name string the name of the primary key constraint to be removed.
$table string the table that the primary key constraint will be removed from.
리턴 string the SQL statement for removing a primary key constraint from an existing table.

insert() 공개 메소드

public insert ( $table, $columns, &$params )

renameColumn() 공개 메소드

Builds a SQL statement for renaming a column.
public renameColumn ( string $table, string $oldName, string $newName ) : string
$table string the table whose column is to be renamed. The name will be properly quoted by the method.
$oldName string the old name of the column. The name will be properly quoted by the method.
$newName string the new name of the column. The name will be properly quoted by the method.
리턴 string the SQL statement for renaming a DB column.

resetSequence() 공개 메소드

The sequence will be reset such that the primary key of the next new row inserted will have the specified value or 1.
public resetSequence ( string $tableName, mixed $value = null ) : string
$tableName string the name of the table whose primary key sequence will be reset
$value mixed the value for the primary key of the next new row inserted. If this is not set, the next new row's primary key will have a value 1.
리턴 string the SQL statement for resetting sequence

프로퍼티 상세

$typeMap 공개적으로 프로퍼티

mapping from abstract column types (keys) to physical column types (values).
public $typeMap