ILIAS
trunk Revision v11.0_alpha-1761-g6dbbfa7b760
|
Class ilDBPdoFieldDefinition. More...
Public Member Functions | |
__construct (protected \ilDBInterface $db_instance) | |
ilDBPdoFieldDefinition constructor. More... | |
array | 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 |
array | integer => ["length" |
array | notnull |
array | default |
array | unsigned |
array | float => ["notnull" |
array | date => ["notnull" |
array | time => ["notnull" |
array | timestamp => ["notnull" |
array | clob => ["length" |
array | blob => ["length" |
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 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 |
Class ilDBPdoFieldDefinition.
Definition at line 25 of file class.ilDBPdoFieldDefinition.php.
ilDBPdoFieldDefinition::__construct | ( | protected \ilDBInterface | $db_instance | ) |
ilDBPdoFieldDefinition constructor.
Definition at line 826 of file class.ilDBPdoFieldDefinition.php.
ilDBPdoFieldDefinition::checkColumnDefinition | ( | array | $a_def | ) |
Definition at line 954 of file class.ilDBPdoFieldDefinition.php.
References getAllowedAttributes(), getAvailableTypes(), getMaxLength(), and null.
ilDBPdoFieldDefinition::checkColumnName | ( | string | $column_name | ) |
Definition at line 909 of file class.ilDBPdoFieldDefinition.php.
References isReserved().
ilDBPdoFieldDefinition::checkIndexName | ( | string | $a_name | ) |
Definition at line 934 of file class.ilDBPdoFieldDefinition.php.
References isReserved().
array ilDBPdoFieldDefinition::checkTableName | ( | string | $table_name | ) |
Definition at line 855 of file class.ilDBPdoFieldDefinition.php.
References isReserved().
|
protected |
Definition at line 1380 of file class.ilDBPdoFieldDefinition.php.
References compareTextDefinition().
|
protected |
Definition at line 1400 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 1372 of file class.ilDBPdoFieldDefinition.php.
References compareTextDefinition().
|
protected |
Definition at line 1385 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 1410 of file class.ilDBPdoFieldDefinition.php.
ilDBPdoFieldDefinition::compareDefinition | ( | array | $current, |
array | $previous | ||
) |
Definition at line 1280 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and null.
|
protected |
Definition at line 1405 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 1332 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 1352 of file class.ilDBPdoFieldDefinition.php.
Referenced by compareBLOBDefinition(), and compareCLOBDefinition().
|
protected |
Definition at line 1390 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 1395 of file class.ilDBPdoFieldDefinition.php.
ilDBPdoFieldDefinition::destroyLOB | ( | $lob | ) |
resource | $lob |
Definition at line 1617 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 1609 of file class.ilDBPdoFieldDefinition.php.
ilDBPdoFieldDefinition::getAllowedAttributes | ( | ) |
Definition at line 1027 of file class.ilDBPdoFieldDefinition.php.
References $allowed_attributes.
Referenced by checkColumnDefinition().
ilDBPdoFieldDefinition::getAllReserved | ( | ) |
Definition at line 884 of file class.ilDBPdoFieldDefinition.php.
References getReservedMysql().
ilDBPdoFieldDefinition::getAvailableTypes | ( | ) |
Definition at line 1011 of file class.ilDBPdoFieldDefinition.php.
References $available_types.
Referenced by checkColumnDefinition().
|
protected |
Definition at line 1235 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and getTypeDeclaration().
|
protected |
Definition at line 1245 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
|
protected |
Definition at line 1199 of file class.ilDBPdoFieldDefinition.php.
Referenced by getDeclarationOptions().
|
protected |
Definition at line 1225 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and getTypeDeclaration().
|
protected |
Definition at line 1204 of file class.ilDBPdoFieldDefinition.php.
Referenced by getDeclarationOptions().
|
protected |
Definition at line 1250 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
|
protected |
Definition at line 1050 of file class.ilDBPdoFieldDefinition.php.
Referenced by compareDefinition(), getBLOBDeclaration(), getCLOBDeclaration(), getDeclaration(), getDeclarationOptions(), ilDBPdoMySQLFieldDefinition\getIntegerDeclaration(), getInternalDeclaration(), ilDBPdoMySQLFieldDefinition\getTypeDeclaration(), getTypeDeclaration(), getValidTypes(), mapNativeDatatype(), mapPrepareDatatype(), matchPattern(), quote(), quoteText(), readFile(), and writeLOBToFile().
|
protected |
Definition at line 1270 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
ilDBPdoFieldDefinition::getDeclaration | ( | string | $type, |
string | $name, | ||
array | $field | ||
) |
Definition at line 1087 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
|
protected |
Definition at line 1160 of file class.ilDBPdoFieldDefinition.php.
References getCharsetFieldDeclaration(), getCollationFieldDeclaration(), getDBInstance(), getValidTypes(), null, and quote().
|
protected |
Definition at line 1265 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
|
protected |
Definition at line 1212 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
|
protected |
Definition at line 1143 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), getTypeDeclaration(), and null.
Referenced by getBooleanDeclaration(), getDateDeclaration(), getDecimalDeclaration(), getFloatDeclaration(), getIntegerDeclaration(), getTextDeclaration(), getTimeDeclaration(), and getTimestampDeclaration().
ilDBPdoFieldDefinition::getMaxLength | ( | ) |
Definition at line 1040 of file class.ilDBPdoFieldDefinition.php.
References $max_length.
Referenced by checkColumnDefinition().
|
protected |
Definition at line 830 of file class.ilDBPdoFieldDefinition.php.
References $query_utils, and null.
ilDBPdoFieldDefinition::getReservedMysql | ( | ) |
Definition at line 892 of file class.ilDBPdoFieldDefinition.php.
References $reserved_mysql.
Referenced by getAllReserved().
|
protected |
Definition at line 1220 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
|
protected |
Definition at line 1260 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
|
protected |
Definition at line 1255 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
ilDBPdoFieldDefinition::getTypeDeclaration | ( | array | $field | ) |
Definition at line 1111 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
Referenced by getBLOBDeclaration(), getCLOBDeclaration(), and getInternalDeclaration().
ilDBPdoFieldDefinition::getValidTypes | ( | ) |
Definition at line 1058 of file class.ilDBPdoFieldDefinition.php.
References $valid_default_values, and getDBInstance().
Referenced by getDeclarationOptions().
ilDBPdoFieldDefinition::isAllowedAttribute | ( | string | $attribute, |
string | $type | ||
) |
Definition at line 1003 of file class.ilDBPdoFieldDefinition.php.
ilDBPdoFieldDefinition::isReserved | ( | string | $table_name | ) |
Definition at line 876 of file class.ilDBPdoFieldDefinition.php.
Referenced by checkColumnName(), checkIndexName(), and checkTableName().
ilDBPdoFieldDefinition::mapNativeDatatype | ( | array | $field | ) |
Definition at line 1683 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and mapNativeDatatypeInternal().
|
abstractprotected |
ilDBPdoFieldDefinition::mapPrepareDatatype | ( | string | $type | ) |
Definition at line 1702 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
Definition at line 1633 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and patternEscapeString().
ilDBPdoFieldDefinition::patternEscapeString | ( | ) |
Definition at line 1675 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 1418 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
Referenced by getDeclarationOptions(), and ilDBPdoMySQLFieldDefinition\getIntegerDeclaration().
|
protected |
string | resource | $value |
Definition at line 1494 of file class.ilDBPdoFieldDefinition.php.
References quoteLOB().
|
protected |
Definition at line 1499 of file class.ilDBPdoFieldDefinition.php.
|
protected |
string | resource | $value |
Definition at line 1487 of file class.ilDBPdoFieldDefinition.php.
References quoteLOB().
|
protected |
Definition at line 1504 of file class.ilDBPdoFieldDefinition.php.
References quoteText().
|
protected |
Definition at line 1541 of file class.ilDBPdoFieldDefinition.php.
Referenced by quoteFloat().
|
protected |
Definition at line 1529 of file class.ilDBPdoFieldDefinition.php.
References quoteDecimal().
|
protected |
mixed | $value |
Definition at line 1426 of file class.ilDBPdoFieldDefinition.php.
|
protected |
string | resource | $value |
Definition at line 1478 of file class.ilDBPdoFieldDefinition.php.
References quoteText(), and readFile().
Referenced by quoteBLOB(), and quoteCLOB().
|
protected |
Definition at line 1431 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
Referenced by quoteDate(), and quoteLOB().
|
protected |
Definition at line 1524 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 1516 of file class.ilDBPdoFieldDefinition.php.
|
protected |
string | resource | $value |
Definition at line 1447 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
Referenced by quoteLOB().
|
protected |
Definition at line 1601 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 1591 of file class.ilDBPdoFieldDefinition.php.
ilDBPdoFieldDefinition::setAllowedAttributes | ( | array | $allowed_attributes | ) |
string[] | $allowed_attributes |
Definition at line 1035 of file class.ilDBPdoFieldDefinition.php.
References $allowed_attributes.
ilDBPdoFieldDefinition::setAvailableTypes | ( | array | $available_types | ) |
string[] | $available_types |
Definition at line 1019 of file class.ilDBPdoFieldDefinition.php.
References $available_types.
ilDBPdoFieldDefinition::setMaxLength | ( | array | $max_length | ) |
Definition at line 1045 of file class.ilDBPdoFieldDefinition.php.
References $max_length.
ilDBPdoFieldDefinition::setReservedMysql | ( | array | $reserved_mysql | ) |
string[] | $reserved_mysql |
Definition at line 900 of file class.ilDBPdoFieldDefinition.php.
References $reserved_mysql.
ilDBPdoFieldDefinition::writeLOBToFile | ( | $lob, | |
string | $file | ||
) |
resource | $lob |
Definition at line 1568 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
array ilDBPdoFieldDefinition::$allowed_attributes |
Definition at line 61 of file class.ilDBPdoFieldDefinition.php.
Referenced by getAllowedAttributes(), and setAllowedAttributes().
array ilDBPdoFieldDefinition::$allowed_attributes_old |
Definition at line 48 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 78 of file class.ilDBPdoFieldDefinition.php.
Referenced by getAvailableTypes(), and setAvailableTypes().
|
staticprotected |
Definition at line 44 of file class.ilDBPdoFieldDefinition.php.
array ilDBPdoFieldDefinition::$lobs |
Definition at line 27 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 71 of file class.ilDBPdoFieldDefinition.php.
Referenced by getMaxLength(), and setMaxLength().
|
protected |
Definition at line 821 of file class.ilDBPdoFieldDefinition.php.
Referenced by getQueryUtils().
|
protected |
Definition at line 91 of file class.ilDBPdoFieldDefinition.php.
Referenced by getReservedMysql(), and setReservedMysql().
|
protected |
Definition at line 721 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 839 of file class.ilDBPdoFieldDefinition.php.
Referenced by getValidTypes().
array ilDBPdoFieldDefinition::blob => ["length" |
Definition at line 69 of file class.ilDBPdoFieldDefinition.php.
array ilDBPdoFieldDefinition::clob => ["length" |
Definition at line 68 of file class.ilDBPdoFieldDefinition.php.
array ilDBPdoFieldDefinition::date => ["notnull" |
Definition at line 65 of file class.ilDBPdoFieldDefinition.php.
array ilDBPdoFieldDefinition::default |
Definition at line 63 of file class.ilDBPdoFieldDefinition.php.
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.
array ilDBPdoFieldDefinition::float => ["notnull" |
Definition at line 64 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().
array ilDBPdoFieldDefinition::integer => ["length" |
Definition at line 63 of file class.ilDBPdoFieldDefinition.php.
array ilDBPdoFieldDefinition::notnull |
Definition at line 63 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.
const ilDBPdoFieldDefinition::T_TEXT = 'text' |
Definition at line 41 of file class.ilDBPdoFieldDefinition.php.
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.
array ilDBPdoFieldDefinition::time => ["notnull" |
Definition at line 66 of file class.ilDBPdoFieldDefinition.php.
array ilDBPdoFieldDefinition::timestamp => ["notnull" |
Definition at line 67 of file class.ilDBPdoFieldDefinition.php.
array ilDBPdoFieldDefinition::unsigned |
Definition at line 63 of file class.ilDBPdoFieldDefinition.php.