ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
|
Class ilDBPdoFieldDefinition. More...
Public Member Functions | |
__construct (protected \ilDBInterface $db_instance) | |
ilDBPdoFieldDefinition constructor. More... | |
checkTableName (string $table_name) | |
isReserved (string $table_name) | |
getAllReserved () | |
getReservedMysql () | |
setReservedMysql (array $reserved_mysql) | |
checkColumnName (string $column_name) | |
checkIndexName (string $a_name) | |
checkColumnDefinition (array $a_def) | |
isAllowedAttribute (string $attribute, string $type) | |
getAvailableTypes () | |
setAvailableTypes (array $available_types) | |
getAllowedAttributes () | |
setAllowedAttributes (array $allowed_attributes) | |
getMaxLength () | |
setMaxLength (array $max_length) | |
getValidTypes () | |
getDeclaration (string $type, string $name, array $field) | |
getTypeDeclaration (array $field) | |
compareDefinition (array $current, array $previous) | |
quote ($value, ?string $type=null, bool $quote=true, bool $escape_wildcards=false) | |
writeLOBToFile ($lob, string $file) | |
destroyLOB ($lob) | |
matchPattern (array $pattern, $operator=null, $field=null) | |
patternEscapeString () | |
mapNativeDatatype (array $field) | |
mapPrepareDatatype (string $type) | |
Data Fields | |
array | $lobs |
const | DEFAULT_DECIMAL_PLACES = 2 |
const | DEFAULT_TEXT_LENGTH = 4000 |
const | DEFINITION_COLUMN_NAME = "/^[a-z]+[_a-z0-9]*$/" |
const | DEFINITION_TABLE_NAME = "/^[a-z]+[_a-z0-9]*$/" |
const | INDEX_FORMAT = '%s_idx' |
const | SEQUENCE_COLUMNS_NAME = 'sequence' |
const | SEQUENCE_FORMAT = '%s_seq' |
const | T_BLOB = 'blob' |
const | T_CLOB = 'clob' |
const | T_DATE = 'date' |
const | T_DATETIME = 'datetime' |
const | T_FLOAT = 'float' |
const | T_INTEGER = 'integer' |
const | T_TEXT = 'text' |
const | T_TIME = 'time' |
const | T_TIMESTAMP = 'timestamp' |
array | $allowed_attributes_old |
array | $allowed_attributes |
Protected Member Functions | |
getQueryUtils () | |
getDBInstance () | |
getInternalDeclaration (string $name, array $field) | |
getDeclarationOptions (array $field) | |
getCharsetFieldDeclaration (string $charset) | |
getCollationFieldDeclaration (string $collation) | |
getIntegerDeclaration (string $name, array $field) | |
getTextDeclaration (string $name, array $field) | |
getCLOBDeclaration (string $name, array $field) | |
getBLOBDeclaration (string $name, array $field) | |
getBooleanDeclaration (string $name, array $field) | |
getDateDeclaration (string $name, array $field) | |
getTimestampDeclaration (string $name, array $field) | |
getTimeDeclaration (string $name, array $field) | |
getFloatDeclaration (string $name, array $field) | |
getDecimalDeclaration (string $name, array $field) | |
compareIntegerDefinition (array $current, array $previous) | |
compareTextDefinition (array $current, array $previous) | |
compareCLOBDefinition (array $current, array $previous) | |
compareBLOBDefinition (array $current, array $previous) | |
compareDateDefinition (array $current, array $previous) | |
compareTimeDefinition (array $current, array $previous) | |
compareTimestampDefinition (array $current, array $previous) | |
compareBooleanDefinition (array $current, array $previous) | |
compareFloatDefinition (array $current, array $previous) | |
compareDecimalDefinition (array $current, array $previous) | |
quoteInteger ($value, bool $quote, bool $escape_wildcards) | |
quoteText (string $value, bool $quote, bool $escape_wildcards) | |
readFile ($value) | |
quoteLOB ($value, bool $quote, bool $escape_wildcards) | |
quoteCLOB ($value, bool $quote, bool $escape_wildcards) | |
quoteBLOB ($value, bool $quote, bool $escape_wildcards) | |
quoteBoolean (bool $value, bool $quote, bool $escape_wildcards) | |
quoteDate (string $value, bool $quote, bool $escape_wildcards) | |
quoteTimestamp (int $value, bool $quote, bool $escape_wildcards) | |
quoteTime (int $value, bool $quote, bool $escape_wildcards) | |
quoteFloat (string $value, bool $quote, bool $escape_wildcards) | |
quoteDecimal (string $value, bool $quote, bool $escape_wildcards) | |
retrieveLOB (array &$lob) | |
readLOB (array $lob, int $length) | |
endOfLOB (array $lob) | |
mapNativeDatatypeInternal (array $field) | |
Protected Attributes | |
array | $max_length |
array | $available_types |
array | $reserved_mysql |
array | $reserved_postgres |
ilMySQLQueryUtils | $query_utils = null |
array | $valid_default_values |
Static Protected Attributes | |
static ilDBPdoFieldDefinition | $instance |
Private Attributes | |
const | MAX_TABLE_IDENTIFIER_LENGTH = 63 |
Class ilDBPdoFieldDefinition.
Definition at line 25 of file class.ilDBPdoFieldDefinition.php.
ilDBPdoFieldDefinition::__construct | ( | protected \ilDBInterface | $db_instance | ) |
ilDBPdoFieldDefinition constructor.
Definition at line 829 of file class.ilDBPdoFieldDefinition.php.
ilDBPdoFieldDefinition::checkColumnDefinition | ( | array | $a_def | ) |
Definition at line 958 of file class.ilDBPdoFieldDefinition.php.
References $allowed_attributes, $max_length, getAllowedAttributes(), getAvailableTypes(), getMaxLength(), T_INTEGER, and T_TEXT.
ilDBPdoFieldDefinition::checkColumnName | ( | string | $column_name | ) |
Definition at line 913 of file class.ilDBPdoFieldDefinition.php.
References isReserved().
ilDBPdoFieldDefinition::checkIndexName | ( | string | $a_name | ) |
Definition at line 938 of file class.ilDBPdoFieldDefinition.php.
References isReserved().
ilDBPdoFieldDefinition::checkTableName | ( | string | $table_name | ) |
Definition at line 858 of file class.ilDBPdoFieldDefinition.php.
References isReserved().
|
protected |
Definition at line 1384 of file class.ilDBPdoFieldDefinition.php.
References compareTextDefinition().
|
protected |
Definition at line 1404 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 1376 of file class.ilDBPdoFieldDefinition.php.
References compareTextDefinition().
|
protected |
Definition at line 1389 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 1414 of file class.ilDBPdoFieldDefinition.php.
ilDBPdoFieldDefinition::compareDefinition | ( | array | $current, |
array | $previous | ||
) |
Definition at line 1284 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
|
protected |
Definition at line 1409 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 1336 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 1356 of file class.ilDBPdoFieldDefinition.php.
Referenced by compareBLOBDefinition(), and compareCLOBDefinition().
|
protected |
Definition at line 1394 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 1399 of file class.ilDBPdoFieldDefinition.php.
ilDBPdoFieldDefinition::destroyLOB | ( | $lob | ) |
resource | $lob |
Definition at line 1621 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 1613 of file class.ilDBPdoFieldDefinition.php.
ilDBPdoFieldDefinition::getAllowedAttributes | ( | ) |
Definition at line 1031 of file class.ilDBPdoFieldDefinition.php.
References $allowed_attributes.
Referenced by checkColumnDefinition().
ilDBPdoFieldDefinition::getAllReserved | ( | ) |
Definition at line 888 of file class.ilDBPdoFieldDefinition.php.
References getReservedMysql().
ilDBPdoFieldDefinition::getAvailableTypes | ( | ) |
Definition at line 1015 of file class.ilDBPdoFieldDefinition.php.
References $available_types.
Referenced by checkColumnDefinition().
|
protected |
Definition at line 1239 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and getTypeDeclaration().
|
protected |
Definition at line 1249 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
|
protected |
Definition at line 1203 of file class.ilDBPdoFieldDefinition.php.
Referenced by getDeclarationOptions().
|
protected |
Definition at line 1229 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and getTypeDeclaration().
|
protected |
Definition at line 1208 of file class.ilDBPdoFieldDefinition.php.
Referenced by getDeclarationOptions().
|
protected |
Definition at line 1254 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
|
protected |
Definition at line 1054 of file class.ilDBPdoFieldDefinition.php.
Referenced by compareDefinition(), getBLOBDeclaration(), getCLOBDeclaration(), getDeclaration(), getDeclarationOptions(), ilDBPdoMySQLFieldDefinition\getIntegerDeclaration(), getInternalDeclaration(), getTypeDeclaration(), ilDBPdoMySQLFieldDefinition\getTypeDeclaration(), getValidTypes(), mapNativeDatatype(), mapPrepareDatatype(), matchPattern(), quote(), quoteText(), readFile(), and writeLOBToFile().
|
protected |
Definition at line 1274 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
ilDBPdoFieldDefinition::getDeclaration | ( | string | $type, |
string | $name, | ||
array | $field | ||
) |
Definition at line 1091 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
|
protected |
Definition at line 1164 of file class.ilDBPdoFieldDefinition.php.
References $valid_default_values, getCharsetFieldDeclaration(), getCollationFieldDeclaration(), getDBInstance(), getValidTypes(), and quote().
|
protected |
Definition at line 1269 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
|
protected |
Reimplemented in ilDBPdoMySQLFieldDefinition.
Definition at line 1216 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
|
protected |
Definition at line 1147 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and getTypeDeclaration().
Referenced by getBooleanDeclaration(), getDateDeclaration(), getDecimalDeclaration(), getFloatDeclaration(), getIntegerDeclaration(), getTextDeclaration(), getTimeDeclaration(), and getTimestampDeclaration().
ilDBPdoFieldDefinition::getMaxLength | ( | ) |
Definition at line 1044 of file class.ilDBPdoFieldDefinition.php.
References $max_length.
Referenced by checkColumnDefinition().
|
protected |
Definition at line 833 of file class.ilDBPdoFieldDefinition.php.
References $query_utils.
ilDBPdoFieldDefinition::getReservedMysql | ( | ) |
Definition at line 896 of file class.ilDBPdoFieldDefinition.php.
References $reserved_mysql.
Referenced by getAllReserved().
|
protected |
Definition at line 1224 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
|
protected |
Definition at line 1264 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
|
protected |
Definition at line 1259 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
ilDBPdoFieldDefinition::getTypeDeclaration | ( | array | $field | ) |
Reimplemented in ilDBPdoMySQLFieldDefinition.
Definition at line 1115 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
Referenced by getBLOBDeclaration(), getCLOBDeclaration(), and getInternalDeclaration().
ilDBPdoFieldDefinition::getValidTypes | ( | ) |
Definition at line 1062 of file class.ilDBPdoFieldDefinition.php.
References $valid_default_values, and getDBInstance().
Referenced by getDeclarationOptions().
ilDBPdoFieldDefinition::isAllowedAttribute | ( | string | $attribute, |
string | $type | ||
) |
Definition at line 1007 of file class.ilDBPdoFieldDefinition.php.
ilDBPdoFieldDefinition::isReserved | ( | string | $table_name | ) |
Definition at line 880 of file class.ilDBPdoFieldDefinition.php.
Referenced by checkColumnName(), checkIndexName(), and checkTableName().
ilDBPdoFieldDefinition::mapNativeDatatype | ( | array | $field | ) |
Definition at line 1687 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and mapNativeDatatypeInternal().
|
abstractprotected |
Reimplemented in ilDBPdoMySQLFieldDefinition.
Referenced by mapNativeDatatype().
ilDBPdoFieldDefinition::mapPrepareDatatype | ( | string | $type | ) |
Definition at line 1706 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
ilDBPdoFieldDefinition::matchPattern | ( | array | $pattern, |
$operator = null , |
|||
$field = null |
|||
) |
Definition at line 1637 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and patternEscapeString().
ilDBPdoFieldDefinition::patternEscapeString | ( | ) |
Definition at line 1679 of file class.ilDBPdoFieldDefinition.php.
Referenced by matchPattern().
ilDBPdoFieldDefinition::quote | ( | $value, | |
?string | $type = null , |
||
bool | $quote = true , |
||
bool | $escape_wildcards = false |
||
) |
mixed | $value |
Definition at line 1422 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
Referenced by getDeclarationOptions(), and ilDBPdoMySQLFieldDefinition\getIntegerDeclaration().
|
protected |
string | resource | $value |
Definition at line 1498 of file class.ilDBPdoFieldDefinition.php.
References quoteLOB().
|
protected |
Definition at line 1503 of file class.ilDBPdoFieldDefinition.php.
|
protected |
string | resource | $value |
Definition at line 1491 of file class.ilDBPdoFieldDefinition.php.
References quoteLOB().
|
protected |
Definition at line 1508 of file class.ilDBPdoFieldDefinition.php.
References quoteText().
|
protected |
Definition at line 1545 of file class.ilDBPdoFieldDefinition.php.
Referenced by quoteFloat().
|
protected |
Definition at line 1533 of file class.ilDBPdoFieldDefinition.php.
References quoteDecimal().
|
protected |
mixed | $value |
Definition at line 1430 of file class.ilDBPdoFieldDefinition.php.
|
protected |
string | resource | $value |
Definition at line 1482 of file class.ilDBPdoFieldDefinition.php.
References quoteText(), and readFile().
Referenced by quoteBLOB(), and quoteCLOB().
|
protected |
Definition at line 1435 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
Referenced by quoteDate(), and quoteLOB().
|
protected |
Definition at line 1528 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 1520 of file class.ilDBPdoFieldDefinition.php.
|
protected |
string | resource | $value |
Definition at line 1451 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
Referenced by quoteLOB().
|
protected |
Definition at line 1605 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 1595 of file class.ilDBPdoFieldDefinition.php.
ilDBPdoFieldDefinition::setAllowedAttributes | ( | array | $allowed_attributes | ) |
string[] | $allowed_attributes |
Definition at line 1039 of file class.ilDBPdoFieldDefinition.php.
References $allowed_attributes.
ilDBPdoFieldDefinition::setAvailableTypes | ( | array | $available_types | ) |
string[] | $available_types |
Definition at line 1023 of file class.ilDBPdoFieldDefinition.php.
References $available_types.
ilDBPdoFieldDefinition::setMaxLength | ( | array | $max_length | ) |
Definition at line 1049 of file class.ilDBPdoFieldDefinition.php.
References $max_length.
ilDBPdoFieldDefinition::setReservedMysql | ( | array | $reserved_mysql | ) |
string[] | $reserved_mysql |
Definition at line 904 of file class.ilDBPdoFieldDefinition.php.
References $reserved_mysql.
ilDBPdoFieldDefinition::writeLOBToFile | ( | $lob, | |
string | $file | ||
) |
resource | $lob |
Definition at line 1572 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
array ilDBPdoFieldDefinition::$allowed_attributes |
Definition at line 64 of file class.ilDBPdoFieldDefinition.php.
Referenced by checkColumnDefinition(), getAllowedAttributes(), and setAllowedAttributes().
array ilDBPdoFieldDefinition::$allowed_attributes_old |
Definition at line 51 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 81 of file class.ilDBPdoFieldDefinition.php.
Referenced by getAvailableTypes(), and setAvailableTypes().
|
staticprotected |
Definition at line 47 of file class.ilDBPdoFieldDefinition.php.
array ilDBPdoFieldDefinition::$lobs |
Definition at line 27 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 74 of file class.ilDBPdoFieldDefinition.php.
Referenced by checkColumnDefinition(), getMaxLength(), and setMaxLength().
|
protected |
Definition at line 824 of file class.ilDBPdoFieldDefinition.php.
Referenced by getQueryUtils().
|
protected |
Definition at line 94 of file class.ilDBPdoFieldDefinition.php.
Referenced by getReservedMysql(), and setReservedMysql().
|
protected |
Definition at line 724 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 842 of file class.ilDBPdoFieldDefinition.php.
Referenced by getDeclarationOptions(), and getValidTypes().
const ilDBPdoFieldDefinition::DEFAULT_DECIMAL_PLACES = 2 |
Definition at line 28 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::DEFAULT_TEXT_LENGTH = 4000 |
Definition at line 29 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::DEFINITION_COLUMN_NAME = "/^[a-z]+[_a-z0-9]*$/" |
Definition at line 30 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::DEFINITION_TABLE_NAME = "/^[a-z]+[_a-z0-9]*$/" |
Definition at line 31 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::INDEX_FORMAT = '%s_idx' |
Definition at line 32 of file class.ilDBPdoFieldDefinition.php.
Referenced by ilDBPdoManager\fixIndexName(), and ilDBPdo\getIndexName().
|
private |
Definition at line 45 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::SEQUENCE_COLUMNS_NAME = 'sequence' |
Definition at line 33 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::SEQUENCE_FORMAT = '%s_seq' |
Definition at line 34 of file class.ilDBPdoFieldDefinition.php.
Referenced by ilDBPdo\getSequenceName().
const ilDBPdoFieldDefinition::T_BLOB = 'blob' |
Definition at line 35 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::T_CLOB = 'clob' |
Definition at line 36 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::T_DATE = 'date' |
Definition at line 37 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::T_DATETIME = 'datetime' |
Definition at line 38 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::T_FLOAT = 'float' |
Definition at line 39 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::T_INTEGER = 'integer' |
Definition at line 40 of file class.ilDBPdoFieldDefinition.php.
Referenced by checkColumnDefinition().
const ilDBPdoFieldDefinition::T_TEXT = 'text' |
Definition at line 41 of file class.ilDBPdoFieldDefinition.php.
Referenced by checkColumnDefinition().
const ilDBPdoFieldDefinition::T_TIME = 'time' |
Definition at line 42 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::T_TIMESTAMP = 'timestamp' |
Definition at line 43 of file class.ilDBPdoFieldDefinition.php.