ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Class ilDBPdoFieldDefinition. More...
Data Fields | |
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' |
$allowed_attributes_old | |
$allowed_attributes | |
Protected Member Functions | |
getQueryUtils () | |
getDBInstance () | |
checkResultTypes ($types) | |
baseConvertResult ($value, $type, $rtrim=true) | |
sortResultFieldTypes ($columns, $types) | |
getInternalDeclaration ($name, $field) | |
getDeclarationOptions ($field) | |
getCharsetFieldDeclaration ($charset) | |
getCollationFieldDeclaration ($collation) | |
getIntegerDeclaration ($name, $field) | |
getTextDeclaration ($name, $field) | |
getCLOBDeclaration ($name, $field) | |
getBLOBDeclaration ($name, $field) | |
getBooleanDeclaration ($name, $field) | |
getDateDeclaration ($name, $field) | |
getTimestampDeclaration ($name, $field) | |
getTimeDeclaration ($name, $field) | |
getFloatDeclaration ($name, $field) | |
getDecimalDeclaration ($name, $field) | |
compareIntegerDefinition ($current, $previous) | |
compareTextDefinition ($current, $previous) | |
compareCLOBDefinition ($current, $previous) | |
compareBLOBDefinition ($current, $previous) | |
compareDateDefinition ($current, $previous) | |
compareTimeDefinition ($current, $previous) | |
compareTimestampDefinition ($current, $previous) | |
compareBooleanDefinition ($current, $previous) | |
compareFloatDefinition ($current, $previous) | |
compareDecimalDefinition ($current, $previous) | |
quoteInteger ($value, $quote, $escape_wildcards) | |
quoteText ($value, $quote, $escape_wildcards) | |
readFile ($value) | |
quoteLOB ($value, $quote, $escape_wildcards) | |
quoteCLOB ($value, $quote, $escape_wildcards) | |
quoteBLOB ($value, $quote, $escape_wildcards) | |
quoteBoolean ($value, $quote, $escape_wildcards) | |
quoteDate ($value, $quote, $escape_wildcards) | |
quoteTimestamp ($value, $quote, $escape_wildcards) | |
quoteTime ($value, $quote, $escape_wildcards) | |
quoteFloat ($value, $quote, $escape_wildcards) | |
quoteDecimal ($value, $quote, $escape_wildcards) | |
retrieveLOB (&$lob) | |
readLOB ($lob, $length) | |
endOfLOB ($lob) | |
destroyLOBInternal (&$lob) | |
mapNativeDatatypeInternal ($field) | |
Protected Attributes | |
$db_instance | |
$max_length | |
$available_types | |
$reserved_mysql | |
$reserved_postgres | |
$reserved_oracle | |
$query_utils | |
$valid_default_values | |
Static Protected Attributes | |
static | $instance |
Class ilDBPdoFieldDefinition.
Definition at line 8 of file class.ilDBPdoFieldDefinition.php.
ilDBPdoFieldDefinition::__construct | ( | \ilDBInterface | $ilDBInterface | ) |
ilDBPdoFieldDefinition constructor.
\ilDBInterface | $ilDBInterface |
Definition at line 533 of file class.ilDBPdoFieldDefinition.php.
|
protected |
$value | ||
$type | ||
bool | $rtrim |
Definition at line 883 of file class.ilDBPdoFieldDefinition.php.
References array.
Referenced by convertResult().
ilDBPdoFieldDefinition::checkColumnDefinition | ( | $a_def | ) |
$a_def |
Definition at line 712 of file class.ilDBPdoFieldDefinition.php.
References $allowed_attributes, $max_length, getAllowedAttributes(), getAvailableTypes(), and getMaxLength().
ilDBPdoFieldDefinition::checkColumnName | ( | $column_name | ) |
$column_name |
Definition at line 663 of file class.ilDBPdoFieldDefinition.php.
References isReserved().
ilDBPdoFieldDefinition::checkIndexName | ( | $a_name | ) |
$a_name |
Definition at line 690 of file class.ilDBPdoFieldDefinition.php.
References isReserved().
|
protected |
$types |
Definition at line 861 of file class.ilDBPdoFieldDefinition.php.
References array, and getDBInstance().
ilDBPdoFieldDefinition::checkTableName | ( | $table_name | ) |
$table_name |
Definition at line 572 of file class.ilDBPdoFieldDefinition.php.
References isReserved().
|
protected |
$current | |
$previous |
Definition at line 1382 of file class.ilDBPdoFieldDefinition.php.
References compareTextDefinition().
|
protected |
$current | |
$previous |
Definition at line 1422 of file class.ilDBPdoFieldDefinition.php.
References array.
|
protected |
$current | |
$previous |
Definition at line 1372 of file class.ilDBPdoFieldDefinition.php.
References compareTextDefinition().
|
protected |
$current | |
$previous |
Definition at line 1392 of file class.ilDBPdoFieldDefinition.php.
References array.
|
protected |
$current | |
$previous |
Definition at line 1442 of file class.ilDBPdoFieldDefinition.php.
References array.
ilDBPdoFieldDefinition::compareDefinition | ( | $current, | |
$previous | |||
) |
$current | |
$previous |
Definition at line 1281 of file class.ilDBPdoFieldDefinition.php.
References array, and getDBInstance().
|
protected |
$current | |
$previous |
Definition at line 1432 of file class.ilDBPdoFieldDefinition.php.
References array.
|
protected |
$current | |
$previous |
Definition at line 1328 of file class.ilDBPdoFieldDefinition.php.
References array.
|
protected |
$current | |
$previous |
Definition at line 1350 of file class.ilDBPdoFieldDefinition.php.
References array.
Referenced by compareBLOBDefinition(), and compareCLOBDefinition().
|
protected |
$current | |
$previous |
Definition at line 1402 of file class.ilDBPdoFieldDefinition.php.
References array.
|
protected |
$current | |
$previous |
Definition at line 1412 of file class.ilDBPdoFieldDefinition.php.
References array.
ilDBPdoFieldDefinition::convertResult | ( | $value, | |
$type, | |||
$rtrim = true |
|||
) |
$value | ||
$type | ||
bool | $rtrim |
Definition at line 934 of file class.ilDBPdoFieldDefinition.php.
References array, baseConvertResult(), and getDBInstance().
Referenced by convertResultRow().
ilDBPdoFieldDefinition::convertResultRow | ( | $types, | |
$row, | |||
$rtrim = true |
|||
) |
$types | ||
$row | ||
bool | $rtrim |
Definition at line 959 of file class.ilDBPdoFieldDefinition.php.
References $row, convertResult(), and sortResultFieldTypes().
ilDBPdoFieldDefinition::destroyLOB | ( | $lob | ) |
$lob |
Definition at line 1809 of file class.ilDBPdoFieldDefinition.php.
References destroyLOBInternal().
|
protected |
$lob |
Definition at line 1826 of file class.ilDBPdoFieldDefinition.php.
Referenced by destroyLOB().
|
protected |
ilDBPdoFieldDefinition::getAllowedAttributes | ( | ) |
Definition at line 796 of file class.ilDBPdoFieldDefinition.php.
References $allowed_attributes.
Referenced by checkColumnDefinition().
ilDBPdoFieldDefinition::getAllReserved | ( | ) |
Definition at line 605 of file class.ilDBPdoFieldDefinition.php.
References getReservedMysql(), getReservedOracle(), and getReservedPostgres().
Referenced by isReserved().
ilDBPdoFieldDefinition::getAvailableTypes | ( | ) |
Definition at line 780 of file class.ilDBPdoFieldDefinition.php.
References $available_types.
Referenced by checkColumnDefinition().
|
protected |
$name | |
$field |
Definition at line 1205 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and getTypeDeclaration().
|
protected |
$name | |
$field |
Definition at line 1220 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
|
protected |
$charset |
Definition at line 1143 of file class.ilDBPdoFieldDefinition.php.
Referenced by getDeclarationOptions().
|
protected |
$name | |
$field |
Definition at line 1190 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and getTypeDeclaration().
|
protected |
$collation |
Definition at line 1152 of file class.ilDBPdoFieldDefinition.php.
Referenced by getDeclarationOptions().
|
protected |
$name | |
$field |
Definition at line 1230 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
|
protected |
Definition at line 828 of file class.ilDBPdoFieldDefinition.php.
References $db_instance.
Referenced by checkResultTypes(), compareDefinition(), convertResult(), getBLOBDeclaration(), getCLOBDeclaration(), getDeclaration(), getDeclarationOptions(), ilDBPdoPostgresFieldDefinition\getIntegerDeclaration(), ilDBPdoMySQLFieldDefinition\getIntegerDeclaration(), getIntegerDeclaration(), getInternalDeclaration(), ilDBPdoMySQLFieldDefinition\getTypeDeclaration(), ilDBPdoPostgresFieldDefinition\getTypeDeclaration(), getTypeDeclaration(), getValidTypes(), mapNativeDatatype(), mapPrepareDatatype(), matchPattern(), quote(), quoteDate(), quoteText(), quoteTime(), quoteTimestamp(), readFile(), and writeLOBToFile().
|
protected |
$name | |
$field |
Definition at line 1270 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
ilDBPdoFieldDefinition::getDeclaration | ( | $type, | |
$name, | |||
$field | |||
) |
$type | |
$name | |
$field |
Definition at line 1022 of file class.ilDBPdoFieldDefinition.php.
References array, and getDBInstance().
|
protected |
$field |
Definition at line 1101 of file class.ilDBPdoFieldDefinition.php.
References $valid_default_values, getCharsetFieldDeclaration(), getCollationFieldDeclaration(), getDBInstance(), getValidTypes(), and quote().
|
protected |
$name | |
$field |
Definition at line 1260 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
|
protected |
$name | |
$field |
Definition at line 1163 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and getInternalDeclaration().
|
protected |
$name | |
$field |
Definition at line 1086 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 812 of file class.ilDBPdoFieldDefinition.php.
References $max_length.
Referenced by checkColumnDefinition().
|
protected |
ilDBPdoFieldDefinition::getReservedMysql | ( | ) |
Definition at line 613 of file class.ilDBPdoFieldDefinition.php.
References $reserved_mysql.
Referenced by getAllReserved().
ilDBPdoFieldDefinition::getReservedOracle | ( | ) |
Definition at line 645 of file class.ilDBPdoFieldDefinition.php.
References $reserved_oracle.
Referenced by getAllReserved().
ilDBPdoFieldDefinition::getReservedPostgres | ( | ) |
Definition at line 629 of file class.ilDBPdoFieldDefinition.php.
References $reserved_postgres.
Referenced by getAllReserved().
|
protected |
$name | |
$field |
Definition at line 1180 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
|
protected |
$name | |
$field |
Definition at line 1250 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
|
protected |
$name | |
$field |
Definition at line 1240 of file class.ilDBPdoFieldDefinition.php.
References getInternalDeclaration().
ilDBPdoFieldDefinition::getTypeDeclaration | ( | $field | ) |
$field |
Definition at line 1047 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
Referenced by getBLOBDeclaration(), getCLOBDeclaration(), and getInternalDeclaration().
ilDBPdoFieldDefinition::getValidTypes | ( | ) |
Definition at line 836 of file class.ilDBPdoFieldDefinition.php.
References $valid_default_values, array, and getDBInstance().
Referenced by getDeclarationOptions().
ilDBPdoFieldDefinition::implodeArray | ( | $array, | |
$type = false |
|||
) |
$array | ||
bool | $type |
Definition at line 1837 of file class.ilDBPdoFieldDefinition.php.
References quote().
ilDBPdoFieldDefinition::isAllowedAttribute | ( | $attribute, | |
$type | |||
) |
$attribute | |
$type |
Definition at line 772 of file class.ilDBPdoFieldDefinition.php.
ilDBPdoFieldDefinition::isReserved | ( | $table_name | ) |
$table_name |
Definition at line 597 of file class.ilDBPdoFieldDefinition.php.
References getAllReserved().
Referenced by checkColumnName(), checkIndexName(), and checkTableName().
ilDBPdoFieldDefinition::mapNativeDatatype | ( | $field | ) |
$field |
Definition at line 1914 of file class.ilDBPdoFieldDefinition.php.
References array, getDBInstance(), and mapNativeDatatypeInternal().
|
abstractprotected |
$field |
Referenced by mapNativeDatatype().
ilDBPdoFieldDefinition::mapPrepareDatatype | ( | $type | ) |
$type |
Definition at line 1937 of file class.ilDBPdoFieldDefinition.php.
References array, and getDBInstance().
ilDBPdoFieldDefinition::matchPattern | ( | $pattern, | |
$operator = null , |
|||
$field = null |
|||
) |
$pattern | ||
null | $operator | |
null | $field |
Definition at line 1860 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and patternEscapeString().
ilDBPdoFieldDefinition::patternEscapeString | ( | ) |
Definition at line 1905 of file class.ilDBPdoFieldDefinition.php.
Referenced by matchPattern(), and quote().
ilDBPdoFieldDefinition::quote | ( | $value, | |
$type = null , |
|||
$quote = true , |
|||
$escape_wildcards = false |
|||
) |
$value | ||
null | $type | |
bool | $quote | |
bool | $escape_wildcards |
Definition at line 1455 of file class.ilDBPdoFieldDefinition.php.
References array, getDBInstance(), MDB2_PORTABILITY_EMPTY_TO_NULL, and patternEscapeString().
Referenced by getDeclarationOptions(), ilDBPdoPostgresFieldDefinition\getIntegerDeclaration(), ilDBPdoMySQLFieldDefinition\getIntegerDeclaration(), and implodeArray().
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 1615 of file class.ilDBPdoFieldDefinition.php.
References quoteLOB().
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 1626 of file class.ilDBPdoFieldDefinition.php.
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 1604 of file class.ilDBPdoFieldDefinition.php.
References quoteLOB().
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 1637 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and quoteText().
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 1716 of file class.ilDBPdoFieldDefinition.php.
References string.
Referenced by quoteFloat().
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 1696 of file class.ilDBPdoFieldDefinition.php.
References quoteDecimal().
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 1529 of file class.ilDBPdoFieldDefinition.php.
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 1591 of file class.ilDBPdoFieldDefinition.php.
References quoteText(), and readFile().
Referenced by quoteBLOB(), and quoteCLOB().
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 1540 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
Referenced by quoteDate(), quoteLOB(), quoteTime(), and quoteTimestamp().
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 1675 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and quoteText().
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 1654 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and quoteText().
|
protected |
$value |
Definition at line 1557 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
Referenced by quoteLOB().
|
protected |
$lob | |
$length |
Definition at line 1791 of file class.ilDBPdoFieldDefinition.php.
|
protected |
$lob |
Definition at line 1776 of file class.ilDBPdoFieldDefinition.php.
References MDB2_OK.
ilDBPdoFieldDefinition::setAllowedAttributes | ( | $allowed_attributes | ) |
array | $allowed_attributes |
Definition at line 804 of file class.ilDBPdoFieldDefinition.php.
References $allowed_attributes.
ilDBPdoFieldDefinition::setAvailableTypes | ( | $available_types | ) |
array | $available_types |
Definition at line 788 of file class.ilDBPdoFieldDefinition.php.
References $available_types.
ilDBPdoFieldDefinition::setMaxLength | ( | $max_length | ) |
array | $max_length |
Definition at line 820 of file class.ilDBPdoFieldDefinition.php.
References $max_length.
ilDBPdoFieldDefinition::setReservedMysql | ( | $reserved_mysql | ) |
array | $reserved_mysql |
Definition at line 621 of file class.ilDBPdoFieldDefinition.php.
References $reserved_mysql.
ilDBPdoFieldDefinition::setReservedOracle | ( | $reserved_oracle | ) |
array | $reserved_oracle |
Definition at line 653 of file class.ilDBPdoFieldDefinition.php.
References $reserved_oracle.
ilDBPdoFieldDefinition::setReservedPostgres | ( | $reserved_postgres | ) |
array | $reserved_postgres |
Definition at line 637 of file class.ilDBPdoFieldDefinition.php.
References $reserved_postgres.
|
protected |
$columns | |
$types |
Definition at line 981 of file class.ilDBPdoFieldDefinition.php.
References $columns, and array.
Referenced by convertResultRow().
ilDBPdoFieldDefinition::writeLOBToFile | ( | $lob, | |
$file | |||
) |
$lob | |
$file |
Definition at line 1747 of file class.ilDBPdoFieldDefinition.php.
References $file, $read, $result, getDBInstance(), and MDB2_OK.
ilDBPdoFieldDefinition::$allowed_attributes |
Definition at line 46 of file class.ilDBPdoFieldDefinition.php.
Referenced by checkColumnDefinition(), getAllowedAttributes(), and setAllowedAttributes().
ilDBPdoFieldDefinition::$allowed_attributes_old |
Definition at line 33 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 70 of file class.ilDBPdoFieldDefinition.php.
Referenced by getAvailableTypes(), and setAvailableTypes().
|
protected |
Definition at line 59 of file class.ilDBPdoFieldDefinition.php.
Referenced by getDBInstance().
|
staticprotected |
Definition at line 29 of file class.ilDBPdoFieldDefinition.php.
|
protected |
Definition at line 63 of file class.ilDBPdoFieldDefinition.php.
Referenced by checkColumnDefinition(), getMaxLength(), and setMaxLength().
|
protected |
Definition at line 525 of file class.ilDBPdoFieldDefinition.php.
Referenced by getQueryUtils().
|
protected |
Definition at line 83 of file class.ilDBPdoFieldDefinition.php.
Referenced by getReservedMysql(), and setReservedMysql().
|
protected |
Definition at line 411 of file class.ilDBPdoFieldDefinition.php.
Referenced by getReservedOracle(), and setReservedOracle().
|
protected |
Definition at line 311 of file class.ilDBPdoFieldDefinition.php.
Referenced by getReservedPostgres(), and setReservedPostgres().
|
protected |
Definition at line 553 of file class.ilDBPdoFieldDefinition.php.
Referenced by getDeclarationOptions(), and getValidTypes().
const ilDBPdoFieldDefinition::DEFAULT_DECIMAL_PLACES = 2 |
Definition at line 10 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::DEFAULT_TEXT_LENGTH = 4000 |
Definition at line 11 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::DEFINITION_COLUMN_NAME = "/^[a-z]+[_a-z0-9]*$/" |
Definition at line 12 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::DEFINITION_TABLE_NAME = "/^[a-z]+[_a-z0-9]*$/" |
Definition at line 13 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::INDEX_FORMAT = '%s_idx' |
Definition at line 14 of file class.ilDBPdoFieldDefinition.php.
Referenced by ilDBPdoManagerPostgres\fixIndexName(), ilDBPdoManager\fixIndexName(), and ilDBPdo\getIndexName().
const ilDBPdoFieldDefinition::SEQUENCE_COLUMNS_NAME = 'sequence' |
Definition at line 15 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::SEQUENCE_FORMAT = '%s_seq' |
Definition at line 16 of file class.ilDBPdoFieldDefinition.php.
Referenced by ilDBPdo\getSequenceName().
const ilDBPdoFieldDefinition::T_BLOB = 'blob' |
Definition at line 17 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::T_CLOB = 'clob' |
Definition at line 18 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::T_DATE = 'date' |
Definition at line 19 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::T_DATETIME = 'datetime' |
Definition at line 20 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::T_FLOAT = 'float' |
Definition at line 21 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::T_INTEGER = 'integer' |
Definition at line 22 of file class.ilDBPdoFieldDefinition.php.
Referenced by ilDatabaseImplementationBaseTest\testSelectUsrData().
const ilDBPdoFieldDefinition::T_TEXT = 'text' |
Definition at line 23 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::T_TIME = 'time' |
Definition at line 24 of file class.ilDBPdoFieldDefinition.php.
const ilDBPdoFieldDefinition::T_TIMESTAMP = 'timestamp' |
Definition at line 25 of file class.ilDBPdoFieldDefinition.php.