/home/desid573/public_html/ims2/system/database/drivers/pdo/subdrivers
NameSizeModeActions
index.html1310644editdlrm
pdo_4d_driver.php57570644editdlrm
pdo_4d_forge.php54410644editdlrm
pdo_cubrid_driver.php56140644editdlrm
pdo_cubrid_forge.php59210644editdlrm
pdo_dblib_driver.php103020644editdlrm
pdo_dblib_forge.php44050644editdlrm
pdo_firebird_driver.php78330644editdlrm
pdo_firebird_forge.php63440644editdlrm
pdo_ibm_driver.php67030644editdlrm
pdo_ibm_forge.php41440644editdlrm
pdo_informix_driver.php85900644editdlrm
pdo_informix_forge.php43990644editdlrm
pdo_mysql_driver.php101210644editdlrm
pdo_mysql_forge.php64510644editdlrm
pdo_oci_driver.php85590644editdlrm
pdo_oci_forge.php55600644editdlrm
pdo_odbc_driver.php59610644editdlrm
pdo_odbc_forge.php23960644editdlrm
pdo_pgsql_driver.php98190644editdlrm
pdo_pgsql_forge.php59920644editdlrm
pdo_sqlite_driver.php57170644editdlrm
pdo_sqlite_forge.php62460644editdlrm
pdo_sqlsrv_driver.php110180644editdlrm
pdo_sqlsrv_forge.php44070644editdlrm
Edit: /home/desid573/public_html/ims2/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php (5560B)
db->escape_identifiers($table); $sqls = array(); for ($i = 0, $c = count($field); $i < $c; $i++) { if ($field[$i]['_literal'] !== FALSE) { $field[$i] = "\n\t".$field[$i]['_literal']; } else { $field[$i]['_literal'] = "\n\t".$this->_process_column($field[$i]); if ( ! empty($field[$i]['comment'])) { $sqls[] = 'COMMENT ON COLUMN ' .$this->db->escape_identifiers($table).'.'.$this->db->escape_identifiers($field[$i]['name']) .' IS '.$field[$i]['comment']; } if ($alter_type === 'MODIFY' && ! empty($field[$i]['new_name'])) { $sqls[] = $sql.' RENAME COLUMN '.$this->db->escape_identifiers($field[$i]['name']) .' TO '.$this->db->escape_identifiers($field[$i]['new_name']); } } } $sql .= ' '.$alter_type.' '; $sql .= (count($field) === 1) ? $field[0] : '('.implode(',', $field).')'; // RENAME COLUMN must be executed after MODIFY array_unshift($sqls, $sql); return $sql; } // -------------------------------------------------------------------- /** * Field attribute AUTO_INCREMENT * * @param array &$attributes * @param array &$field * @return void */ protected function _attr_auto_increment(&$attributes, &$field) { if ( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE && stripos($field['type'], 'number') !== FALSE && version_compare($this->db->version(), '12.1', '>=')) { $field['auto_increment'] = ' GENERATED ALWAYS AS IDENTITY'; } } // -------------------------------------------------------------------- /** * Process column * * @param array $field * @return string */ protected function _process_column($field) { return $this->db->escape_identifiers($field['name']) .' '.$field['type'].$field['length'] .$field['unsigned'] .$field['default'] .$field['auto_increment'] .$field['null'] .$field['unique']; } // -------------------------------------------------------------------- /** * Field attribute TYPE * * Performs a data type mapping between different databases. * * @param array &$attributes * @return void */ protected function _attr_type(&$attributes) { switch (strtoupper($attributes['TYPE'])) { case 'TINYINT': $attributes['TYPE'] = 'NUMBER'; return; case 'MEDIUMINT': $attributes['TYPE'] = 'NUMBER'; return; case 'INT': $attributes['TYPE'] = 'NUMBER'; return; case 'BIGINT': $attributes['TYPE'] = 'NUMBER'; return; default: return; } } }