/**
  * Compile field definition
  *
  * @param	array		Field definition parts
  * @return	string		Field definition string
  */
 public function compileFieldCfg($fieldCfg)
 {
     switch ((string) $GLOBALS['TYPO3_DB']->handlerCfg[$GLOBALS['TYPO3_DB']->lastHandlerKey]['type']) {
         case 'native':
             $cfg = parent::compileFieldCfg($fieldCfg);
             break;
         case 'adodb':
             // Set type:
             $type = $GLOBALS['TYPO3_DB']->MySQLMetaType($fieldCfg['fieldType']);
             $cfg = $type;
             // Add value, if any:
             if (strlen($fieldCfg['value']) && in_array($type, array('C', 'C2'))) {
                 $cfg .= ' ' . $fieldCfg['value'];
             } elseif (!isset($fieldCfg['value']) && in_array($type, array('C', 'C2'))) {
                 $cfg .= ' 255';
                 // add 255 as length for varchar without specified length (e.g. coming from tinytext, tinyblob)
             }
             // Add additional features:
             $noQuote = TRUE;
             if (is_array($fieldCfg['featureIndex'])) {
                 // MySQL assigns DEFAULT value automatically if NOT NULL, fake this here
                 // numeric fields get 0 as default, other fields an empty string
                 if (isset($fieldCfg['featureIndex']['NOTNULL']) && !isset($fieldCfg['featureIndex']['DEFAULT']) && !isset($fieldCfg['featureIndex']['AUTO_INCREMENT'])) {
                     switch ($type) {
                         case 'I8':
                         case 'F':
                         case 'N':
                             $fieldCfg['featureIndex']['DEFAULT'] = array('keyword' => 'DEFAULT', 'value' => array('0', ''));
                             break;
                         default:
                             $fieldCfg['featureIndex']['DEFAULT'] = array('keyword' => 'DEFAULT', 'value' => array('', '\''));
                     }
                 }
                 foreach ($fieldCfg['featureIndex'] as $feature => $featureDef) {
                     switch (TRUE) {
                         // unsigned only for mysql, as it is mysql specific
                         case $feature === 'UNSIGNED' && !$GLOBALS['TYPO3_DB']->runningADOdbDriver('mysql'):
                             // auto_increment is removed, it is handled by (emulated) sequences
                         // auto_increment is removed, it is handled by (emulated) sequences
                         case $feature === 'AUTO_INCREMENT':
                             // never add NOT NULL if running on Oracle and we have an empty string as default
                         // never add NOT NULL if running on Oracle and we have an empty string as default
                         case $feature === 'NOTNULL' && $GLOBALS['TYPO3_DB']->runningADOdbDriver('oci8'):
                             continue;
                         case $feature === 'NOTNULL':
                             $cfg .= ' NOTNULL';
                             break;
                         default:
                             $cfg .= ' ' . $featureDef['keyword'];
                     }
                     // Add value if found:
                     if (is_array($featureDef['value'])) {
                         if ($featureDef['value'][0] === '') {
                             $cfg .= ' "\'\'"';
                         } else {
                             $cfg .= ' ' . $featureDef['value'][1] . $this->compileAddslashes($featureDef['value'][0]) . $featureDef['value'][1];
                             if (!is_numeric($featureDef['value'][0])) {
                                 $noQuote = FALSE;
                             }
                         }
                     }
                 }
             }
             if ($noQuote) {
                 $cfg .= ' NOQUOTE';
             }
             break;
     }
     // Return field definition string:
     return $cfg;
 }