Quote identifiers for oracle

This commit is contained in:
Robin Appelman 2014-12-09 17:26:39 +01:00
parent b66c0a1631
commit 6984fa8a19
1 changed files with 27 additions and 0 deletions

View File

@ -47,4 +47,31 @@ class OracleConnection extends Connection {
$identifier = $this->quoteKeys($identifier);
return parent::delete($tableName, $identifier);
}
/**
* Drop a table from the database if it exists
*
* @param string $table table name without the prefix
*/
public function dropTable($table) {
$table = $this->tablePrefix . trim($table);
$table = $this->quoteIdentifier($table);
$schema = $this->getSchemaManager();
if($schema->tablesExist(array($table))) {
$schema->dropTable($table);
}
}
/**
* Check if a table exists
*
* @param string $table table name without the prefix
* @return bool
*/
public function tableExists($table){
$table = $this->tablePrefix . trim($table);
$table = $this->quoteIdentifier($table);
$schema = $this->getSchemaManager();
return $schema->tablesExist(array($table));
}
}