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

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