Skip to content
Permalink
Browse files

Add stub methods for enabling/disabling foreign keys

  • Loading branch information...
markstory committed Sep 4, 2014
1 parent be8b966 commit 5de8eee6d89f562dad121bcf568eac1f851f5478
@@ -469,6 +469,24 @@ public function rollbackSavepoint($name) {
$this->execute($this->_driver->rollbackSavePointSQL($name));
}
/**
* Run driver specific SQL to disable foreign key checks.
*
* @return void
*/
public function disableForeignKeys() {
$this->execute($this->_driver->disableForeignKeySql());
}
/**
* Run driver specific SQL to enable foreign key checks.
*
* @return void
*/
public function enableForeignKeys() {
$this->execute($this->_driver->enableForeignKeySql());
}
/**
* Executes a callable function inside a transaction, if any exception occurs
* while executing the passed callable, the transaction will be rolled back
@@ -62,4 +62,16 @@ public function schemaDialect() {
return $this->_schemaDialect;
}
/**
* {@inheritDoc}
*/
public function disableForeignKeySQL() {
}
/**
* {@inheritDoc}
*/
public function enableForeignKeySQL() {
}
}
@@ -136,4 +136,16 @@ public function schemaDialect() {
}
return $this->_schemaDialect;
}
/**
* {@inheritDoc}
*/
public function disableForeignKeySQL() {
}
/**
* {@inheritDoc}
*/
public function enableForeignKeySQL() {
}
}
@@ -159,4 +159,16 @@ public function schemaDialect() {
return $this->_schemaDialect;
}
/**
* {@inheritDoc}
*/
public function disableForeignKeySQL() {
}
/**
* {@inheritDoc}
*/
public function enableForeignKeySQL() {
}
}
@@ -233,4 +233,16 @@ public function newCompiler() {
return new SqlserverCompiler();
}
/**
* {@inheritDoc}
*/
public function disableForeignKeySQL() {
}
/**
* {@inheritDoc}
*/
public function enableForeignKeySQL() {
}
}
@@ -144,6 +144,20 @@ public function __construct($config = []) {
*/
public abstract function rollbackSavePointSQL($name);
/**
* Get the SQL for disabling foreign keys
*
* @return string
*/
public abstract function disableForeignKeySQL();
/**
* Get the SQL for enabling foreign keys
*
* @return string
*/
public abstract function enableForeignKeySQL();
/**
* Returns whether this driver supports save points for nested transactions
*

0 comments on commit 5de8eee

Please sign in to comment.
You can’t perform that action at this time.