Rename $statement in Connection::execute() to $sql

parent abfa0ea0
......@@ -306,11 +306,11 @@ class MasterSlaveConnection extends Connection
/**
* {@inheritDoc}
*/
public function exec($statement)
public function exec($sql)
{
$this->connect('master');
return parent::exec($statement);
return parent::exec($sql);
}
/**
......
......@@ -41,11 +41,11 @@ interface Connection
/**
* Executes an SQL statement and return the number of affected rows.
*
* @param string $statement
* @param string $sql
*
* @return int
*/
public function exec($statement);
public function exec($sql);
/**
* Returns the ID of the last inserted row or sequence value.
......
......@@ -120,9 +120,9 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
/**
* {@inheritdoc}
*/
public function exec($statement)
public function exec($sql)
{
$stmt = @db2_exec($this->conn, $statement);
$stmt = @db2_exec($this->conn, $sql);
if ($stmt === false) {
throw new DB2Exception(db2_stmt_errormsg());
......
......@@ -157,9 +157,9 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
/**
* {@inheritdoc}
*/
public function exec($statement)
public function exec($sql)
{
if ($this->conn->query($statement) === false) {
if ($this->conn->query($sql) === false) {
throw new MysqliException($this->conn->error, $this->conn->sqlstate, $this->conn->errno);
}
......
......@@ -140,9 +140,9 @@ class OCI8Connection implements Connection, ServerInfoAwareConnection
/**
* {@inheritdoc}
*/
public function exec($statement)
public function exec($sql)
{
$stmt = $this->prepare($statement);
$stmt = $this->prepare($sql);
$stmt->execute();
return $stmt->rowCount();
......
......@@ -36,10 +36,10 @@ class PDOConnection extends PDO implements Connection, ServerInfoAwareConnection
/**
* {@inheritdoc}
*/
public function exec($statement)
public function exec($sql)
{
try {
$result = parent::exec($statement);
$result = parent::exec($sql);
assert($result !== false);
return $result;
......
......@@ -108,9 +108,9 @@ class SQLAnywhereConnection implements Connection, ServerInfoAwareConnection
/**
* {@inheritdoc}
*/
public function exec($statement)
public function exec($sql)
{
if (sasql_real_query($this->connection, $statement) === false) {
if (sasql_real_query($this->connection, $sql) === false) {
throw SQLAnywhereException::fromSQLAnywhereError($this->connection);
}
......
......@@ -114,9 +114,9 @@ class SQLSrvConnection implements Connection, ServerInfoAwareConnection
/**
* {@inheritDoc}
*/
public function exec($statement)
public function exec($sql)
{
$stmt = sqlsrv_query($this->conn, $statement);
$stmt = sqlsrv_query($this->conn, $sql);
if ($stmt === false) {
throw SQLSrvException::fromSqlSrvErrors();
......
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