Bug #20636 ยป 11366.diff
typo3/sysext/dbal/class.ux_t3lib_sqlparser.php (working copy) | ||
---|---|---|
function compileINSERT($components) {
|
||
switch((string)$GLOBALS['TYPO3_DB']->handlerCfg[$GLOBALS['TYPO3_DB']->lastHandlerKey]['type']) {
|
||
case 'native':
|
||
parent::compileINSERT($components);
|
||
$query = parent::compileINSERT($components);
|
||
break;
|
||
case 'adodb':
|
||
if(isset($components['VALUES_ONLY']) && is_array($components['VALUES_ONLY'])) {
|
||
... | ... | |
}
|
||
} elseif ($v['calc']) {
|
||
$output.=trim(($v['table']?$v['table'].'.':'').$v['field']).$v['calc'].$v['calc_value'][1].$this->compileAddslashes($v['calc_value'][0]).$v['calc_value'][1];
|
||
} else {
|
||
} elseif(!($GLOBALS['TYPO3_DB']->runningADOdbDriver('oci8') && $v['comparator']==='LIKE' && $functionMapping)) {
|
||
$output.=trim(($v['table']?$v['table'].'.':'').$v['field']);
|
||
}
|
||
// Set comparator:
|
||
if ($v['comparator']) {
|
||
switch(true) {
|
||
case ($GLOBALS['TYPO3_DB']->runningADOdbDriver('oci8') && $v['comparator']==='LIKE' && $functionMapping):
|
||
... | ... | |
}
|
||
break;
|
||
}
|
||
} }
|
||
}
|
||
}
|
||
}
|
||
}
|
||
break;
|
typo3/sysext/dbal/class.ux_t3lib_sqlengine.php (working copy) | ||
---|---|---|
foreach($components['FIELDS'] as $fN => $fCfg) {
|
||
// the backticks get converted to the correct quote char automatically
|
||
$fieldsKeys[$fN] = '`'.$fN.'` '.$this->compileFieldCfg($fCfg['definition']);
|
||
$fieldsKeys[$fN] = $GLOBALS['TYPO3_DB']->handlerInstance[$GLOBALS['TYPO3_DB']->handler_getFromTableList($components['TABLE'])]->DataDictionary->nameQuote('`'.$fN.'`').' '.$this->compileFieldCfg($fCfg['definition']);
|
||
}
|
||
if(isset($components['KEYS']) && is_array($components['KEYS'])) {
|
||
... | ... | |
return $cfg;
|
||
}
|
||
/**
|
||
* Checks if the submitted feature index contains a default value definition and the default value
|
||
*
|
||
* @param array $featureIndex A feature index as produced by parseFieldDef()
|
||
* @return boolean
|
||
* @see t3lib_sqlparser::parseFieldDef()
|
||
*/
|
||
function checkEmptyDefaultValue($featureIndex) {
|
||
if (is_array($featureIndex['DEFAULT']['value'])) {
|
||
if(!is_numeric($featureIndex['DEFAULT']['value'][0]) && empty($featureIndex['DEFAULT']['value'][0])) {
|
||
... | ... | |
/**
|
||
* Implodes an array of WHERE clause configuration into a WHERE clause.
|
||
*
|
||
* DBAL-specific: The only(!) handled "calc" operator supported by parseWhereClause() is the bitwise
|
||
* logical and (&), and only this one is supported here!
|
||
* DBAL-specific: The only(!) handled "calc" operators supported by parseWhereClause() are:
|
||
* - the bitwise logical and (&)
|
||
* - the addition (+)
|
||
* - the substraction (-)
|
||
* - the multiplication (*)
|
||
* - the division (/)
|
||
* - the modulo (%)
|
||
*
|
||
* @param array WHERE clause configuration
|
||
* @return string WHERE clause as string.
|
||
... | ... | |
$output.=' '.trim($v['modifier']).' ';
|
||
// DBAL-specific: Set calculation, if any:
|
||
if ($v['calc'] && $functionMapping) {
|
||
if ($v['calc'] === '&' && $functionMapping) {
|
||
switch(true) {
|
||
case $GLOBALS['TYPO3_DB']->runningADOdbDriver('oci8'):
|
||
// Oracle only knows BITAND(x,y) - sigh
|