![]() |
TYPO3
7.6
|
Public Member Functions | |
__construct () | |
specificExists ($specific) | |
getSpecific ($specific) | |
splitMaxExpressions ($expressionList, $preserveArrayKeys=false) | |
truncateIdentifier ($identifier, $specific) | |
transformQueryParts (&$select_fields, &$from_table, &$where_clause, &$groupBy= '', &$orderBy= '', &$limit= '') | |
transformFieldRowToMySQL ($fieldRow, $metaType) | |
getNativeFieldType ($metaType) | |
getMetaFieldType ($nativeType) | |
getNativeFieldLength ($mysqlType, $maxLength) | |
Public Attributes | |
const | TABLE_MAXLENGTH = 'table_maxlength' |
const | FIELD_MAXLENGTH = 'field_maxlength' |
const | LIST_MAXEXPRESSIONS = 'list_maxexpressions' |
const | PARTIAL_STRING_INDEX = 'partial_string_index' |
const | CAST_FIND_IN_SET = 'cast_find_in_set' |
Protected Member Functions | |
getNativeNotNull ($notNull) | |
getNativeDefaultValue ($fieldDefinition) | |
getNativeKeyForField ($fieldRow) | |
getNativeExtraFieldAttributes ($fieldRow) | |
Protected Attributes | |
$specificProperties = array() | |
$nativeToMetaFieldTypeMap | |
$nativeToMetaFieldTypeOverrides = array() | |
$metaToNativeFieldTypeMap | |
$metaToNativeFieldTypeOverrides = array() | |
This class handles the specifics of the active DBMS. Inheriting classes are intended to define their own specifics.
Definition at line 21 of file AbstractSpecifics.php.
__construct | ( | ) |
Constructor
Definition at line 114 of file AbstractSpecifics.php.
getMetaFieldType | ( | $nativeType | ) |
Return MetaType for native MySQL field type
string | $nativeType | native type as reported as in mysqldump files |
Definition at line 237 of file AbstractSpecifics.php.
|
protected |
Return the default value of a field formatted to match the native MySQL SQL dialect
array | $fieldDefinition |
Definition at line 280 of file AbstractSpecifics.php.
Referenced by AbstractSpecifics\transformFieldRowToMySQL().
|
protected |
Return the MySQL native extra field information - https://dev.mysql.com/doc/refman/5.5/en/show-columns.html auto_increment for columns that have the AUTO_INCREMENT attribute on update CURRENT_TIMESTAMP for TIMESTAMP columns that have the ON UPDATE CURRENT_TIMESTAMP attribute.
array | $fieldRow |
Definition at line 309 of file AbstractSpecifics.php.
Referenced by AbstractSpecifics\transformFieldRowToMySQL().
getNativeFieldLength | ( | $mysqlType, | |
$maxLength | |||
) |
Determine the native field length information for a table field.
string | $mysqlType | |
int | $maxLength |
Definition at line 250 of file AbstractSpecifics.php.
Referenced by AbstractSpecifics\transformFieldRowToMySQL().
getNativeFieldType | ( | $metaType | ) |
Return actual MySQL type for meta field type
string | $metaType | Meta type (currenly ADOdb syntax only, http://phplens.com/lens/adodb/docs-adodb.htm#metatype) |
Definition at line 225 of file AbstractSpecifics.php.
Referenced by AbstractSpecifics\transformFieldRowToMySQL().
|
protected |
Return the MySQL native key type indicator - https://dev.mysql.com/doc/refman/5.5/en/show-columns.html PRI - the column is a PRIMARY KEY or is one of the columns in a multiple-column PRIMARY KEY UNI - the column is the first column of a UNIQUE index MUL - the column is the first column of a nonunique index If more than one of the values applies return the one with the highest priority, in the order PRI, UNI, MUL If none applies return empty value.
array | $fieldRow |
Definition at line 296 of file AbstractSpecifics.php.
Referenced by AbstractSpecifics\transformFieldRowToMySQL().
|
protected |
Return the MySQL native representation of the NOT NULL setting
mixed | $notNull |
Definition at line 269 of file AbstractSpecifics.php.
Referenced by AbstractSpecifics\transformFieldRowToMySQL().
getSpecific | ( | $specific | ) |
Gets the specific value.
string | $specific |
Definition at line 137 of file AbstractSpecifics.php.
Referenced by AbstractSpecifics\splitMaxExpressions(), and AbstractSpecifics\truncateIdentifier().
specificExists | ( | $specific | ) |
Checks if a specific is defined for the used DBMS.
string | $specific |
Definition at line 126 of file AbstractSpecifics.php.
Referenced by AbstractSpecifics\splitMaxExpressions(), and AbstractSpecifics\truncateIdentifier().
splitMaxExpressions | ( | $expressionList, | |
$preserveArrayKeys = false |
|||
) |
Splits $expressionList into multiple chunks.
array | $expressionList | |
bool | $preserveArrayKeys | If TRUE, array keys are preserved in array_chunk() |
Definition at line 149 of file AbstractSpecifics.php.
References AbstractSpecifics\getSpecific(), and AbstractSpecifics\specificExists().
transformFieldRowToMySQL | ( | $fieldRow, | |
$metaType | |||
) |
Transforms a database specific representation of field information and translates it as close as possible to the MySQL standard.
array | $fieldRow | |
string | $metaType |
Definition at line 204 of file AbstractSpecifics.php.
References AbstractSpecifics\getNativeDefaultValue(), AbstractSpecifics\getNativeExtraFieldAttributes(), AbstractSpecifics\getNativeFieldLength(), AbstractSpecifics\getNativeFieldType(), AbstractSpecifics\getNativeKeyForField(), and AbstractSpecifics\getNativeNotNull().
transformQueryParts | ( | & | $select_fields, |
& | $from_table, | ||
& | $where_clause, | ||
& | $groupBy = '' , |
||
& | $orderBy = '' , |
||
& | $limit = '' |
||
) |
Adjust query parts for DBMS
string | $select_fields | |
string | $from_table | |
string | $where_clause | |
string | $groupBy | |
string | $orderBy | |
string | $limit |
Definition at line 192 of file AbstractSpecifics.php.
truncateIdentifier | ( | $identifier, | |
$specific | |||
) |
Truncates the name of the identifier. Based on TYPO3.FLOWs' FlowAnnotationDriver::truncateIdentifier()
string | $identifier | |
string | $specific |
Definition at line 166 of file AbstractSpecifics.php.
References AbstractSpecifics\getSpecific(), and AbstractSpecifics\specificExists().
|
protected |
Definition at line 85 of file AbstractSpecifics.php.
|
protected |
Definition at line 109 of file AbstractSpecifics.php.
|
protected |
Definition at line 45 of file AbstractSpecifics.php.
|
protected |
Contains the DBMS specific mapping overrides for native MySQL to ADOdb meta field types
Definition at line 78 of file AbstractSpecifics.php.
|
protected |
Definition at line 38 of file AbstractSpecifics.php.
const CAST_FIND_IN_SET = 'cast_find_in_set' |
Definition at line 30 of file AbstractSpecifics.php.
const FIELD_MAXLENGTH = 'field_maxlength' |
Definition at line 27 of file AbstractSpecifics.php.
const LIST_MAXEXPRESSIONS = 'list_maxexpressions' |
Definition at line 28 of file AbstractSpecifics.php.
const PARTIAL_STRING_INDEX = 'partial_string_index' |
Definition at line 29 of file AbstractSpecifics.php.
Referenced by Adodb\compileCREATEINDEX().
const TABLE_MAXLENGTH = 'table_maxlength' |
Constants used as identifiers in $specificProperties.
Definition at line 26 of file AbstractSpecifics.php.