LSPgsqlDbCommandBuilder
extends CPgsqlCommandBuilder
in package
Table of Contents
Properties
- $_connection : mixed
- $_schema : mixed
Methods
- createDeleteCommand() : CDbCommand
- Creates a DELETE command.
- composeMultipleInsertCommand() : CDbCommand
- Creates a multiple INSERT command.
- bindParamsToCommand() : mixed
- buildColumnValue() : mixed
- buildRowValues() : mixed
- buildSql() : mixed
- extractColumns() : mixed
- mergeTemplates() : array{columnInsertNameGlue: string, columnInsertValue: string, columnInsertValueGlue: string, main: string, rowInsertValue: string, rowInsertValueGlue: string}
- Summary of mergeTemplates
- quoteColumnNames() : mixed
Properties
$_connection
protected
mixed
$_connection
$_schema
protected
mixed
$_schema
Methods
createDeleteCommand()
Creates a DELETE command.
public
createDeleteCommand(mixed $table, CDbCriteria $criteria) : CDbCommand
Parameters
- $table : mixed
-
- $criteria : CDbCriteria
-
the query criteria
Return values
CDbCommand —delete command.
composeMultipleInsertCommand()
Creates a multiple INSERT command.
protected
composeMultipleInsertCommand(mixed $table, array<string|int, array<string|int, mixed>> $data[, array<string|int, mixed> $templates = array() ]) : CDbCommand
This method compose the SQL expression via given part templates, providing ability to adjust command for different SQL syntax.
Parameters
- $table : mixed
-
- $data : array<string|int, array<string|int, mixed>>
-
list data to be inserted, each value should be an array in format (column name=>column value). If a key is not a valid column name, the corresponding value will be ignored.
- $templates : array<string|int, mixed> = array()
-
templates for the SQL parts.
Tags
Return values
CDbCommand —multiple insert command
bindParamsToCommand()
private
bindParamsToCommand(mixed $sql, array<string|int, mixed> $params) : mixed
Parameters
- $sql : mixed
- $params : array<string|int, mixed>
buildColumnValue()
private
buildColumnValue(mixed $table, mixed $rowKey, mixed $columnName, mixed $rowData) : mixed
Parameters
- $table : mixed
- $rowKey : mixed
- $columnName : mixed
- $rowData : mixed
buildRowValues()
private
buildRowValues(mixed $table, array<string|int, mixed> $data, array<string|int, mixed> $columns, array<string|int, mixed> $columnInsertNames, mixed $columnInsertNamesSqlPart, array<string|int, mixed> $templates, mixed $tableName) : mixed
Parameters
- $table : mixed
- $data : array<string|int, mixed>
- $columns : array<string|int, mixed>
- $columnInsertNames : array<string|int, mixed>
- $columnInsertNamesSqlPart : mixed
- $templates : array<string|int, mixed>
- $tableName : mixed
buildSql()
private
buildSql(array<string|int, mixed> $templates, mixed $tableName, mixed $columnInsertNamesSqlPart, array<string|int, mixed> $rowInsertValues) : mixed
Parameters
- $templates : array<string|int, mixed>
- $tableName : mixed
- $columnInsertNamesSqlPart : mixed
- $rowInsertValues : array<string|int, mixed>
extractColumns()
private
extractColumns(mixed $table, array<string|int, mixed> $data) : mixed
Parameters
- $table : mixed
- $data : array<string|int, mixed>
mergeTemplates()
Summary of mergeTemplates
private
mergeTemplates(array<string|int, mixed> $templates) : array{columnInsertNameGlue: string, columnInsertValue: string, columnInsertValueGlue: string, main: string, rowInsertValue: string, rowInsertValueGlue: string}
Parameters
- $templates : array<string|int, mixed>
Return values
array{columnInsertNameGlue: string, columnInsertValue: string, columnInsertValueGlue: string, main: string, rowInsertValue: string, rowInsertValueGlue: string}quoteColumnNames()
private
quoteColumnNames(array<string|int, mixed> $columns) : mixed
Parameters
- $columns : array<string|int, mixed>