Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
f12171a0
Unverified
Commit
f12171a0
authored
Jul 17, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename $statement and $prepareString in Connection::prepare() to $sql
parent
478d4f0f
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
19 additions
and
19 deletions
+19
-19
Connection.php
lib/Doctrine/DBAL/Connection.php
+4
-4
MasterSlaveConnection.php
lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php
+2
-2
Connection.php
lib/Doctrine/DBAL/Driver/Connection.php
+2
-2
MysqliConnection.php
lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
+2
-2
OCI8Connection.php
lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php
+2
-2
PDOConnection.php
lib/Doctrine/DBAL/Driver/PDOConnection.php
+3
-3
SQLAnywhereConnection.php
...octrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php
+2
-2
Connection.php
lib/Doctrine/DBAL/Portability/Connection.php
+2
-2
No files found.
lib/Doctrine/DBAL/Connection.php
View file @
f12171a0
...
@@ -849,18 +849,18 @@ class Connection implements DriverConnection
...
@@ -849,18 +849,18 @@ class Connection implements DriverConnection
/**
/**
* Prepares an SQL statement.
* Prepares an SQL statement.
*
*
* @param string $s
tatement
The SQL statement to prepare.
* @param string $s
ql
The SQL statement to prepare.
*
*
* @return Statement The prepared statement.
* @return Statement The prepared statement.
*
*
* @throws DBALException
* @throws DBALException
*/
*/
public
function
prepare
(
$s
tatement
)
public
function
prepare
(
$s
ql
)
{
{
try
{
try
{
$stmt
=
new
Statement
(
$s
tatement
,
$this
);
$stmt
=
new
Statement
(
$s
ql
,
$this
);
}
catch
(
Throwable
$ex
)
{
}
catch
(
Throwable
$ex
)
{
throw
DBALException
::
driverExceptionDuringQuery
(
$this
->
_driver
,
$ex
,
$s
tatement
);
throw
DBALException
::
driverExceptionDuringQuery
(
$this
->
_driver
,
$ex
,
$s
ql
);
}
}
$stmt
->
setFetchMode
(
$this
->
defaultFetchMode
);
$stmt
->
setFetchMode
(
$this
->
defaultFetchMode
);
...
...
lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php
View file @
f12171a0
...
@@ -372,10 +372,10 @@ class MasterSlaveConnection extends Connection
...
@@ -372,10 +372,10 @@ class MasterSlaveConnection extends Connection
/**
/**
* {@inheritDoc}
* {@inheritDoc}
*/
*/
public
function
prepare
(
$s
tatement
)
public
function
prepare
(
$s
ql
)
{
{
$this
->
connect
(
'master'
);
$this
->
connect
(
'master'
);
return
parent
::
prepare
(
$s
tatement
);
return
parent
::
prepare
(
$s
ql
);
}
}
}
}
lib/Doctrine/DBAL/Driver/Connection.php
View file @
f12171a0
...
@@ -15,11 +15,11 @@ interface Connection
...
@@ -15,11 +15,11 @@ interface Connection
/**
/**
* Prepares a statement for execution and returns a Statement object.
* Prepares a statement for execution and returns a Statement object.
*
*
* @param string $
prepareString
* @param string $
sql
*
*
* @return Statement
* @return Statement
*/
*/
public
function
prepare
(
$
prepareString
);
public
function
prepare
(
$
sql
);
/**
/**
* Executes an SQL statement, returning a result set as a Statement object.
* Executes an SQL statement, returning a result set as a Statement object.
...
...
lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
View file @
f12171a0
...
@@ -128,9 +128,9 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
...
@@ -128,9 +128,9 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
/**
/**
* {@inheritdoc}
* {@inheritdoc}
*/
*/
public
function
prepare
(
$
prepareString
)
public
function
prepare
(
$
sql
)
{
{
return
new
MysqliStatement
(
$this
->
conn
,
$
prepareString
);
return
new
MysqliStatement
(
$this
->
conn
,
$
sql
);
}
}
/**
/**
...
...
lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php
View file @
f12171a0
...
@@ -104,9 +104,9 @@ class OCI8Connection implements Connection, ServerInfoAwareConnection
...
@@ -104,9 +104,9 @@ class OCI8Connection implements Connection, ServerInfoAwareConnection
/**
/**
* {@inheritdoc}
* {@inheritdoc}
*/
*/
public
function
prepare
(
$
prepareString
)
public
function
prepare
(
$
sql
)
{
{
return
new
OCI8Statement
(
$this
->
dbh
,
$
prepareString
,
$this
);
return
new
OCI8Statement
(
$this
->
dbh
,
$
sql
,
$this
);
}
}
/**
/**
...
...
lib/Doctrine/DBAL/Driver/PDOConnection.php
View file @
f12171a0
...
@@ -57,15 +57,15 @@ class PDOConnection extends PDO implements Connection, ServerInfoAwareConnection
...
@@ -57,15 +57,15 @@ class PDOConnection extends PDO implements Connection, ServerInfoAwareConnection
}
}
/**
/**
* @param string $
prepareString
* @param string $
sql
* @param array<int, int> $driverOptions
* @param array<int, int> $driverOptions
*
*
* @return \PDOStatement
* @return \PDOStatement
*/
*/
public
function
prepare
(
$
prepareString
,
$driverOptions
=
[])
public
function
prepare
(
$
sql
,
$driverOptions
=
[])
{
{
try
{
try
{
$statement
=
parent
::
prepare
(
$
prepareString
,
$driverOptions
);
$statement
=
parent
::
prepare
(
$
sql
,
$driverOptions
);
assert
(
$statement
instanceof
\PDOStatement
);
assert
(
$statement
instanceof
\PDOStatement
);
return
$statement
;
return
$statement
;
...
...
lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php
View file @
f12171a0
...
@@ -144,9 +144,9 @@ class SQLAnywhereConnection implements Connection, ServerInfoAwareConnection
...
@@ -144,9 +144,9 @@ class SQLAnywhereConnection implements Connection, ServerInfoAwareConnection
/**
/**
* {@inheritdoc}
* {@inheritdoc}
*/
*/
public
function
prepare
(
$
prepareString
)
public
function
prepare
(
$
sql
)
{
{
return
new
SQLAnywhereStatement
(
$this
->
connection
,
$
prepareString
);
return
new
SQLAnywhereStatement
(
$this
->
connection
,
$
sql
);
}
}
/**
/**
...
...
lib/Doctrine/DBAL/Portability/Connection.php
View file @
f12171a0
...
@@ -113,9 +113,9 @@ class Connection extends \Doctrine\DBAL\Connection
...
@@ -113,9 +113,9 @@ class Connection extends \Doctrine\DBAL\Connection
*
*
* @return Statement
* @return Statement
*/
*/
public
function
prepare
(
$s
tatement
)
public
function
prepare
(
$s
ql
)
{
{
$stmt
=
new
Statement
(
parent
::
prepare
(
$s
tatement
),
$this
);
$stmt
=
new
Statement
(
parent
::
prepare
(
$s
ql
),
$this
);
$stmt
->
setFetchMode
(
$this
->
defaultFetchMode
);
$stmt
->
setFetchMode
(
$this
->
defaultFetchMode
);
return
$stmt
;
return
$stmt
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment