Remove unnecessary method overrides in PrimaryReplicaConnection

All removed methods are implemented via executeStatement() that ensures connection to the primary instance.
parent 45736a18
...@@ -308,16 +308,6 @@ class PrimaryReadReplicaConnection extends Connection ...@@ -308,16 +308,6 @@ class PrimaryReadReplicaConnection extends Connection
return parent::rollBack(); return parent::rollBack();
} }
/**
* {@inheritDoc}
*/
public function delete($tableName, array $identifier, array $types = [])
{
$this->ensureConnectedToPrimary();
return parent::delete($tableName, $identifier, $types);
}
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
...@@ -331,33 +321,6 @@ class PrimaryReadReplicaConnection extends Connection ...@@ -331,33 +321,6 @@ class PrimaryReadReplicaConnection extends Connection
$this->connections = ['primary' => null, 'replica' => null]; $this->connections = ['primary' => null, 'replica' => null];
} }
/**
* {@inheritDoc}
*/
public function update($tableName, array $data, array $identifier, array $types = [])
{
$this->ensureConnectedToPrimary();
return parent::update($tableName, $data, $identifier, $types);
}
/**
* {@inheritDoc}
*/
public function insert($tableName, array $data, array $types = [])
{
$this->ensureConnectedToPrimary();
return parent::insert($tableName, $data, $types);
}
public function exec(string $statement): int
{
$this->ensureConnectedToPrimary();
return parent::exec($statement);
}
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment