Skip to content
Snippets Groups Projects
Commit 6984fa8a authored by Robin Appelman's avatar Robin Appelman
Browse files

Quote identifiers for oracle

parent b66c0a16
No related branches found
No related tags found
No related merge requests found
...@@ -47,4 +47,31 @@ class OracleConnection extends Connection { ...@@ -47,4 +47,31 @@ class OracleConnection extends Connection {
$identifier = $this->quoteKeys($identifier); $identifier = $this->quoteKeys($identifier);
return parent::delete($tableName, $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));
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment