Squiz Matrix
4.12.2
|
Public Member Functions | |
__construct () | |
convertCreateTable (array $table) | |
handleFunctionSequenceExists ($sequenceName) | |
convertDropSequence ($sequenceName) | |
handleFunctionTableExists ($tableName, $schema=NULL) | |
Public Member Functions inherited from DALConverter | |
getDataType ($type) | |
getName () | |
getConstructName ($name) | |
convertToSql (array $sqlArray) | |
convertCreateTable (array $table) | |
convertDropTable ($tableName, $cascade=FALSE) | |
convertTruncateTable ($tableName) | |
convertDropSequence ($sequenceName) | |
convertResetSequence ($sequenceName) | |
handleFunctionTableExists ($tableName, $schema=NULL) | |
Protected Member Functions | |
convertAlterQueryAddConstraint (array $constraints, $incHeader=FALSE) | |
convertCreateIndexes (array $table) | |
convertSingleIndex (array $idx, $tableName) | |
convertSingleSequence ($sequence) | |
handleFunctionSeqNextVal ($seqName) | |
handleFunctionSeqCurrVal ($seqName) | |
handleFunctionConcat (array $args) | |
handleFunctionToDate (array $args) | |
convertUnionDisplayName ($type) | |
convertInsertQueryValues (array $insert) | |
convertCallQuery (array $callQuery) | |
convertSingleFunction (array $function, $isProcedure=FALSE) | |
convertSelectFieldList (array $fields, $level=1) | |
convertLimit (array $limit) | |
handleFunctionSubstring (array $args) | |
Protected Member Functions inherited from DALConverter | |
convertSelectQuery (array $sqlArray, $level=0, array $ignore=array()) | |
addSqlFilters (array $sqlArray) | |
convertSelectFieldList (array $fields, $level=1) | |
convertSingleField ($field) | |
getSelectFieldName (array $field) | |
setSelectFieldAlias (array $field, $alias) | |
getSelectFieldNames (array $fields) | |
convertField (array $field) | |
convertSingleValue ($field) | |
convertSingleFunction (array $function) | |
convertFromList (array $from, $level=1) | |
convertTableAlias ($alias) | |
convertMathOperation (array $mathOp) | |
separateFields (array $fields) | |
separateTables (array $tables) | |
convertWhereClause (array $where, $level=0, $addBrackets=TRUE) | |
convertInCondition (array $in, $level=0, $type='IN') | |
convertExistsCondition (array $exists, $level=0, $type='EXISTS') | |
convertIsNull (array $isNull) | |
convertNotNull (array $notNull) | |
convertUnionsInFromClause (array $union, $level=0) | |
getUnionType (array $union) | |
convertUnions (array $union, $level=1) | |
convertUnionDisplayName ($type) | |
convertGroupBy (array $groupBy) | |
convertOrderBy (array $orderBy) | |
convertLimit (array $limit) | |
convertJoins (array $joins) | |
convertSingleJoin (array $join) | |
convertInsertQuery (array $sqlArray) | |
addSpaces ($level=0, $spaces=4) | |
convertInsertQueryFields (array $fields) | |
convertInsertQueryValues (array $insert) | |
convertUpdateQuery (array $sqlArray) | |
convertUpdateQuerySetValues (array $values) | |
convertDeleteQuery (array $sqlArray) | |
convertAlterQueryHeader ($tableName) | |
convertAlterQuery (array $sqlArray) | |
convertAlterQueryAddColumn (array $addColumn) | |
convertAlterQueryDropColumn ($column) | |
convertAlterQueryRenameColumn (array $renameColumn) | |
convertAlterQueryModifyColumn (array $modifyColumns) | |
convertAlterQueryAddConstraint (array $constraints, $tableName=NULL) | |
convertAlterQueryDropConstraint ($dropConstraint) | |
convertAlterQueryRenameTable (array $renameTable) | |
convertCreateHeader (array $table) | |
convertCreateFooter (array $table) | |
convertCreateColumns (array $table) | |
convertSingleCreateColumn (array $col) | |
convertConstraints (array $constraintsList, $asArray=FALSE) | |
convertSinglePrimaryKey (array $pk) | |
convertSingleForeignKey (array $fk) | |
convertSingleUnique (array $un) | |
convertCreateIndexes (array $table) | |
convertSingleIndex (array $idx, $tableName) | |
convertCreateSequences (array $sequences) | |
convertSingleSequence ($sequence) | |
convertWithQuery (array $withQuery) | |
convertCallQuery (array $callQuery) | |
handleFunctionConcat (array $args) | |
handleFunctionArray (array $args) | |
convertLikeCondition (array $condition) | |
handleFunctionCast (array $args) | |
handleFunctionBindcast (array $args) | |
handleFunctionLength (array $args) | |
handleFunctionCoalesce (array $args) | |
handleFunctionMax (array $args) | |
handleFunctionMin (array $args) | |
handleFunctionCount (array $args) | |
handleFunctionSubstring (array $args) | |
getComparisonOperators ($type=NULL) | |
Protected Attributes | |
$tableName = '' | |
$name = 'MSSQL' | |
$dataTypes | |
Protected Attributes inherited from DALConverter | |
$dataTypes | |
$sqlConstructs | |
$mathOps | |
$query = array() | |
$name = '' | |
Contains methods to perform any database specific conversions into SQL. The methods to convert XML structures into SQL are defined in the parent class "DALConverter", and if any conversions need to be altered for this database the corresponding methods of DALConverter should be redefined here.
Definition at line 25 of file DALMssqlConverter.inc.
__construct | ( | ) |
|
protected |
Converts ALTER TABLE ADD CONSTRAINT statement to its SQL format.
Returns empty string if no constraints found.
array | $constraints | List of constraints. |
boolean | $incHeader | If true ALTER query heading will be added. |
Definition at line 128 of file DALMssqlConverter.inc.
|
protected |
Converts a single CALL query.
array | $callQuery | The array structure of the call query. |
Definition at line 396 of file DALMssqlConverter.inc.
|
protected |
Converts list of Index to SQL string.
array | $table | The table array. |
Definition at line 161 of file DALMssqlConverter.inc.
convertCreateTable | ( | array | $table | ) |
Converts create statement to SQL string.
Indexes are added after creating the table.
array | $table | CREATE array. |
Definition at line 90 of file DALMssqlConverter.inc.
convertDropSequence | ( | $sequenceName | ) |
Converts DROP SEQUENCE statement.
MySQL does not support sequences, tables created instead of sequences.
string | $sequenceName | Name of the sequence to drop from the db. |
Definition at line 280 of file DALMssqlConverter.inc.
|
protected |
Converts Insert query's values to their SQL format.
Converting values require the fields array. Because, fields list and values list must be in the same order.
SQLServer throws error if there are brackets () around SELECT statement.
array | $insert | Array of the insert query. |
DALConverterException | If the INSERT query cannot be converted. |
Definition at line 360 of file DALMssqlConverter.inc.
|
protected |
Converts LIMIT.
array | $limit | Single LIMIT clause. |
Definition at line 545 of file DALMssqlConverter.inc.
|
protected |
Converts Select's field list to its SQL format.
array | $fields | Array of fields. |
integer | $level | Number of levels to indent. |
Definition at line 490 of file DALMssqlConverter.inc.
|
protected |
Converts a single function to its SQL string.
SQL Server does not like the brackets when calling a procedure using EXEC.
array | $function | Function array. |
boolean | $isProcedure | Set this to true if this is a procedure. |
Definition at line 416 of file DALMssqlConverter.inc.
|
protected |
Converts single Index to its SQL string.
Postgres: INDEX index_name (assetid, linkid).
array | $idx | Single index array. |
string | $tableName | Name of the table. |
Definition at line 189 of file DALMssqlConverter.inc.
|
protected |
Converts a single CREATE SEQUENCE statament.
string | $sequence | Name of the sequence. |
Definition at line 206 of file DALMssqlConverter.inc.
|
protected |
SQL Server needs to use UNION ALL (no hyphen) so return that here.
string | $type | The type of the union (UNION or UNION-ALL). |
Definition at line 335 of file DALMssqlConverter.inc.
|
protected |
Handles the CONCAT() function call.
array | $args | The arguments to the concat function. |
Definition at line 296 of file DALMssqlConverter.inc.
|
protected |
Handles SeqCurrVal(seqName) function.
SeqCurrVal will return the current sequence value. Note: SeqNextVal must be called before this function.
string | $seqName | Name of the sequence. |
Definition at line 247 of file DALMssqlConverter.inc.
|
protected |
Handles SeqNextVal(seqName) function.
SewNextVal will increment sequence value and return the new sequence value.
string | $seqName | Name of the sequence. |
Definition at line 228 of file DALMssqlConverter.inc.
handleFunctionSequenceExists | ( | $sequenceName | ) |
Handles sequence exists.
(array|string) | $sequenceName Sequence name. |
Definition at line 263 of file DALMssqlConverter.inc.
|
protected |
Handles the SUBSTRING() function.
MSSQL's SUBSTRING function syntax differs from that of the standard, SUBSTRING(input, start, length).
array | $args | Method arguments. |
Definition at line 589 of file DALMssqlConverter.inc.
handleFunctionTableExists | ( | $tableName, | |
$schema = NULL |
|||
) |
Handles table exists.
(array|string) | $tableName Table name argument. | |
string | $schema | The schema that the exists function should be called on. |
Definition at line 465 of file DALMssqlConverter.inc.
|
protected |
Handles a custom DAL ToDate() function call.
This function will convert an ISO8601 date into a format suitable for insertion into a query.
array | $args | The arguments of the function. |
Definition at line 315 of file DALMssqlConverter.inc.
|
protected |
Definition at line 50 of file DALMssqlConverter.inc.
|
protected |
Name of the table that is being converted.
Definition at line 42 of file DALMssqlConverter.inc.