ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
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 935 of file class.ilDBPdoFieldDefinition.php.
|
protected |
$value | ||
$type | ||
bool | $rtrim |
Definition at line 1309 of file class.ilDBPdoFieldDefinition.php.
Referenced by convertResult().
ilDBPdoFieldDefinition::checkColumnDefinition | ( | $a_def | ) |
$a_def |
Definition at line 1127 of file class.ilDBPdoFieldDefinition.php.
References $allowed_attributes, $max_length, getAllowedAttributes(), getAvailableTypes(), and getMaxLength().
ilDBPdoFieldDefinition::checkColumnName | ( | $column_name | ) |
$column_name |
Definition at line 1076 of file class.ilDBPdoFieldDefinition.php.
References isReserved().
ilDBPdoFieldDefinition::checkIndexName | ( | $a_name | ) |
$a_name |
Definition at line 1104 of file class.ilDBPdoFieldDefinition.php.
References isReserved().
|
protected |
$types |
Definition at line 1286 of file class.ilDBPdoFieldDefinition.php.
References $key, $type, array, and getDBInstance().
ilDBPdoFieldDefinition::checkTableName | ( | $table_name | ) |
$table_name |
Definition at line 976 of file class.ilDBPdoFieldDefinition.php.
References isReserved().
|
protected |
$current | |
$previous |
Definition at line 1832 of file class.ilDBPdoFieldDefinition.php.
References $current, and compareTextDefinition().
|
protected |
$current | |
$previous |
Definition at line 1876 of file class.ilDBPdoFieldDefinition.php.
References array.
|
protected |
$current | |
$previous |
Definition at line 1821 of file class.ilDBPdoFieldDefinition.php.
References $current, and compareTextDefinition().
|
protected |
$current | |
$previous |
Definition at line 1843 of file class.ilDBPdoFieldDefinition.php.
References array.
|
protected |
$current | |
$previous |
Definition at line 1898 of file class.ilDBPdoFieldDefinition.php.
References array.
ilDBPdoFieldDefinition::compareDefinition | ( | $current, | |
$previous | |||
) |
$current | |
$previous |
Definition at line 1727 of file class.ilDBPdoFieldDefinition.php.
References $current, $type, array, and getDBInstance().
|
protected |
$current | |
$previous |
Definition at line 1887 of file class.ilDBPdoFieldDefinition.php.
References array.
|
protected |
$current | |
$previous |
Definition at line 1775 of file class.ilDBPdoFieldDefinition.php.
|
protected |
$current | |
$previous |
Definition at line 1798 of file class.ilDBPdoFieldDefinition.php.
References $current, and array.
Referenced by compareBLOBDefinition(), and compareCLOBDefinition().
|
protected |
$current | |
$previous |
Definition at line 1854 of file class.ilDBPdoFieldDefinition.php.
References array.
|
protected |
$current | |
$previous |
Definition at line 1865 of file class.ilDBPdoFieldDefinition.php.
References array.
ilDBPdoFieldDefinition::convertResult | ( | $value, | |
$type, | |||
$rtrim = true |
|||
) |
$value | ||
$type | ||
bool | $rtrim |
Definition at line 1361 of file class.ilDBPdoFieldDefinition.php.
References $type, array, baseConvertResult(), and getDBInstance().
Referenced by convertResultRow().
ilDBPdoFieldDefinition::convertResultRow | ( | $types, | |
$row, | |||
$rtrim = true |
|||
) |
$types | ||
$row | ||
bool | $rtrim |
Definition at line 1387 of file class.ilDBPdoFieldDefinition.php.
References $key, $row, convertResult(), and sortResultFieldTypes().
ilDBPdoFieldDefinition::destroyLOB | ( | $lob | ) |
$lob |
Definition at line 2284 of file class.ilDBPdoFieldDefinition.php.
References destroyLOBInternal().
|
protected |
$lob |
Definition at line 2302 of file class.ilDBPdoFieldDefinition.php.
Referenced by destroyLOB().
|
protected |
ilDBPdoFieldDefinition::getAllowedAttributes | ( | ) |
Definition at line 1215 of file class.ilDBPdoFieldDefinition.php.
References $allowed_attributes.
Referenced by checkColumnDefinition().
ilDBPdoFieldDefinition::getAllReserved | ( | ) |
Definition at line 1011 of file class.ilDBPdoFieldDefinition.php.
References getReservedMysql(), getReservedOracle(), and getReservedPostgres().
ilDBPdoFieldDefinition::getAvailableTypes | ( | ) |
Definition at line 1197 of file class.ilDBPdoFieldDefinition.php.
References $available_types.
Referenced by checkColumnDefinition().
|
protected |
$name | |
$field |
Definition at line 1644 of file class.ilDBPdoFieldDefinition.php.
References $name, getDBInstance(), and getTypeDeclaration().
|
protected |
$name | |
$field |
Definition at line 1660 of file class.ilDBPdoFieldDefinition.php.
References $name, and getInternalDeclaration().
|
protected |
$charset |
Definition at line 1577 of file class.ilDBPdoFieldDefinition.php.
Referenced by getDeclarationOptions().
|
protected |
$name | |
$field |
Definition at line 1628 of file class.ilDBPdoFieldDefinition.php.
References $name, getDBInstance(), and getTypeDeclaration().
|
protected |
$collation |
Definition at line 1587 of file class.ilDBPdoFieldDefinition.php.
Referenced by getDeclarationOptions().
|
protected |
$name | |
$field |
Definition at line 1671 of file class.ilDBPdoFieldDefinition.php.
References $name, and getInternalDeclaration().
|
protected |
Definition at line 1251 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 1715 of file class.ilDBPdoFieldDefinition.php.
References $name, and getInternalDeclaration().
ilDBPdoFieldDefinition::getDeclaration | ( | $type, | |
$name, | |||
$field | |||
) |
$type | |
$name | |
$field |
Definition at line 1452 of file class.ilDBPdoFieldDefinition.php.
References $name, $type, array, and getDBInstance().
|
protected |
$field |
Definition at line 1534 of file class.ilDBPdoFieldDefinition.php.
References $valid_default_values, getCharsetFieldDeclaration(), getCollationFieldDeclaration(), getDBInstance(), getValidTypes(), and quote().
|
protected |
$name | |
$field |
Definition at line 1704 of file class.ilDBPdoFieldDefinition.php.
References $name, and getInternalDeclaration().
|
protected |
$name | |
$field |
Definition at line 1599 of file class.ilDBPdoFieldDefinition.php.
References $name, getDBInstance(), and getInternalDeclaration().
|
protected |
$name | |
$field |
Definition at line 1518 of file class.ilDBPdoFieldDefinition.php.
References $name, getDBInstance(), and getTypeDeclaration().
Referenced by getBooleanDeclaration(), getDateDeclaration(), getDecimalDeclaration(), getFloatDeclaration(), getIntegerDeclaration(), getTextDeclaration(), getTimeDeclaration(), and getTimestampDeclaration().
ilDBPdoFieldDefinition::getMaxLength | ( | ) |
Definition at line 1233 of file class.ilDBPdoFieldDefinition.php.
References $max_length.
Referenced by checkColumnDefinition().
|
protected |
ilDBPdoFieldDefinition::getReservedMysql | ( | ) |
Definition at line 1020 of file class.ilDBPdoFieldDefinition.php.
References $reserved_mysql.
Referenced by getAllReserved().
ilDBPdoFieldDefinition::getReservedOracle | ( | ) |
Definition at line 1056 of file class.ilDBPdoFieldDefinition.php.
References $reserved_oracle.
Referenced by getAllReserved().
ilDBPdoFieldDefinition::getReservedPostgres | ( | ) |
Definition at line 1038 of file class.ilDBPdoFieldDefinition.php.
References $reserved_postgres.
Referenced by getAllReserved().
|
protected |
$name | |
$field |
Definition at line 1617 of file class.ilDBPdoFieldDefinition.php.
References $name, and getInternalDeclaration().
|
protected |
$name | |
$field |
Definition at line 1693 of file class.ilDBPdoFieldDefinition.php.
References $name, and getInternalDeclaration().
|
protected |
$name | |
$field |
Definition at line 1682 of file class.ilDBPdoFieldDefinition.php.
References $name, and getInternalDeclaration().
ilDBPdoFieldDefinition::getTypeDeclaration | ( | $field | ) |
$field |
Definition at line 1478 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
Referenced by getBLOBDeclaration(), getCLOBDeclaration(), and getInternalDeclaration().
ilDBPdoFieldDefinition::getValidTypes | ( | ) |
Definition at line 1260 of file class.ilDBPdoFieldDefinition.php.
References $type, $valid_default_values, array, and getDBInstance().
Referenced by getDeclarationOptions().
ilDBPdoFieldDefinition::implodeArray | ( | $array, | |
$type = false |
|||
) |
$array | ||
bool | $type |
Definition at line 2314 of file class.ilDBPdoFieldDefinition.php.
References $type, and quote().
ilDBPdoFieldDefinition::isAllowedAttribute | ( | $attribute, | |
$type | |||
) |
$attribute | |
$type |
Definition at line 1188 of file class.ilDBPdoFieldDefinition.php.
References $type.
ilDBPdoFieldDefinition::isReserved | ( | $table_name | ) |
$table_name |
Definition at line 1002 of file class.ilDBPdoFieldDefinition.php.
Referenced by checkColumnName(), checkIndexName(), and checkTableName().
ilDBPdoFieldDefinition::mapNativeDatatype | ( | $field | ) |
$field |
Definition at line 2394 of file class.ilDBPdoFieldDefinition.php.
References array, getDBInstance(), and mapNativeDatatypeInternal().
|
abstractprotected |
$field |
Referenced by mapNativeDatatype().
ilDBPdoFieldDefinition::mapPrepareDatatype | ( | $type | ) |
$type |
Definition at line 2418 of file class.ilDBPdoFieldDefinition.php.
References $type, array, and getDBInstance().
ilDBPdoFieldDefinition::matchPattern | ( | $pattern, | |
$operator = null , |
|||
$field = null |
|||
) |
$pattern | ||
null | $operator | |
null | $field |
Definition at line 2338 of file class.ilDBPdoFieldDefinition.php.
References $key, getDBInstance(), and patternEscapeString().
ilDBPdoFieldDefinition::patternEscapeString | ( | ) |
Definition at line 2384 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 1912 of file class.ilDBPdoFieldDefinition.php.
References $type, 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 2079 of file class.ilDBPdoFieldDefinition.php.
References quoteLOB().
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 2091 of file class.ilDBPdoFieldDefinition.php.
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 2067 of file class.ilDBPdoFieldDefinition.php.
References quoteLOB().
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 2103 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and quoteText().
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 2186 of file class.ilDBPdoFieldDefinition.php.
References string.
Referenced by quoteFloat().
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 2165 of file class.ilDBPdoFieldDefinition.php.
References quoteDecimal().
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 1988 of file class.ilDBPdoFieldDefinition.php.
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 2053 of file class.ilDBPdoFieldDefinition.php.
References quoteText(), and readFile().
Referenced by quoteBLOB(), and quoteCLOB().
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 2000 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
Referenced by quoteDate(), quoteLOB(), quoteTime(), and quoteTimestamp().
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 2143 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and quoteText().
|
protected |
$value | |
$quote | |
$escape_wildcards |
Definition at line 2121 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance(), and quoteText().
|
protected |
$value |
Definition at line 2018 of file class.ilDBPdoFieldDefinition.php.
References getDBInstance().
Referenced by quoteLOB().
|
protected |
$lob | |
$length |
Definition at line 2264 of file class.ilDBPdoFieldDefinition.php.
|
protected |
$lob |
Definition at line 2248 of file class.ilDBPdoFieldDefinition.php.
References MDB2_OK.
ilDBPdoFieldDefinition::setAllowedAttributes | ( | $allowed_attributes | ) |
array | $allowed_attributes |
Definition at line 1224 of file class.ilDBPdoFieldDefinition.php.
References $allowed_attributes.
ilDBPdoFieldDefinition::setAvailableTypes | ( | $available_types | ) |
array | $available_types |
Definition at line 1206 of file class.ilDBPdoFieldDefinition.php.
References $available_types.
ilDBPdoFieldDefinition::setMaxLength | ( | $max_length | ) |
array | $max_length |
Definition at line 1242 of file class.ilDBPdoFieldDefinition.php.
References $max_length.
ilDBPdoFieldDefinition::setReservedMysql | ( | $reserved_mysql | ) |
array | $reserved_mysql |
Definition at line 1029 of file class.ilDBPdoFieldDefinition.php.
References $reserved_mysql.
ilDBPdoFieldDefinition::setReservedOracle | ( | $reserved_oracle | ) |
array | $reserved_oracle |
Definition at line 1065 of file class.ilDBPdoFieldDefinition.php.
References $reserved_oracle.
ilDBPdoFieldDefinition::setReservedPostgres | ( | $reserved_postgres | ) |
array | $reserved_postgres |
Definition at line 1047 of file class.ilDBPdoFieldDefinition.php.
References $reserved_postgres.
|
protected |
$columns | |
$types |
Definition at line 1410 of file class.ilDBPdoFieldDefinition.php.
References $columns, $i, $name, $type, and array.
Referenced by convertResultRow().
ilDBPdoFieldDefinition::writeLOBToFile | ( | $lob, | |
$file | |||
) |
$lob | |
$file |
Definition at line 2218 of file class.ilDBPdoFieldDefinition.php.
References $file, $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 927 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 813 of file class.ilDBPdoFieldDefinition.php.
Referenced by getReservedOracle(), and setReservedOracle().
|
protected |
Definition at line 713 of file class.ilDBPdoFieldDefinition.php.
Referenced by getReservedPostgres(), and setReservedPostgres().
|
protected |
Definition at line 957 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.