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
3c07b4ad
Unverified
Commit
3c07b4ad
authored
Jul 11, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace $conn->query() with $conn->executeQuery() and $conn->executeStatement()
parent
2d6967f0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
12 deletions
+12
-12
bootstrap.php
ci/continuousphp/bootstrap.php
+1
-1
ConnectionLostTest.php
tests/Functional/Connection/ConnectionLostTest.php
+1
-1
PortabilityTest.php
tests/Functional/PortabilityTest.php
+3
-3
MySqlSchemaManagerTest.php
tests/Functional/Schema/MySqlSchemaManagerTest.php
+4
-4
SchemaManagerFunctionalTestCase.php
tests/Functional/Schema/SchemaManagerFunctionalTestCase.php
+1
-1
SqliteSchemaManagerTest.php
tests/Functional/Schema/SqliteSchemaManagerTest.php
+1
-1
TransactionTest.php
tests/Functional/TransactionTest.php
+1
-1
No files found.
ci/continuousphp/bootstrap.php
View file @
3c07b4ad
...
...
@@ -12,5 +12,5 @@ use Doctrine\DBAL\DriverManager;
'user'
=>
'ORACLE'
,
'password'
=>
'ORACLE'
,
'dbname'
=>
'XE'
,
])
->
query
(
'ALTER USER ORACLE IDENTIFIED BY ORACLE'
);
])
->
executeStatement
(
'ALTER USER ORACLE IDENTIFIED BY ORACLE'
);
})();
tests/Functional/Connection/ConnectionLostTest.php
View file @
3c07b4ad
...
...
@@ -30,7 +30,7 @@ class ConnectionLostTest extends FunctionalTestCase
public
function
testConnectionLost
()
:
void
{
$this
->
connection
->
query
(
'SET SESSION wait_timeout=1'
);
$this
->
connection
->
executeStatement
(
'SET SESSION wait_timeout=1'
);
sleep
(
2
);
...
...
tests/Functional/PortabilityTest.php
View file @
3c07b4ad
...
...
@@ -53,7 +53,7 @@ class PortabilityTest extends FunctionalTestCase
$rows
=
$this
->
connection
->
fetchAllAssociative
(
'SELECT * FROM portability_table'
);
$this
->
assertFetchResultRows
(
$rows
);
$result
=
$this
->
connection
->
q
uery
(
'SELECT * FROM portability_table'
);
$result
=
$this
->
connection
->
executeQ
uery
(
'SELECT * FROM portability_table'
);
while
((
$row
=
$result
->
fetchAssociative
()))
{
$this
->
assertFetchResultRow
(
$row
);
...
...
@@ -73,7 +73,7 @@ class PortabilityTest extends FunctionalTestCase
$rows
=
$this
->
connection
->
fetchAllAssociative
(
'SELECT * FROM portability_table'
);
$this
->
assertFetchResultRows
(
$rows
);
$result
=
$this
->
connection
->
q
uery
(
'SELECT * FROM portability_table'
);
$result
=
$this
->
connection
->
executeQ
uery
(
'SELECT * FROM portability_table'
);
while
((
$row
=
$result
->
fetchAssociative
()))
{
$this
->
assertFetchResultRow
(
$row
);
}
...
...
@@ -120,7 +120,7 @@ class PortabilityTest extends FunctionalTestCase
*/
public
function
testFetchColumn
(
string
$field
,
array
$expected
)
:
void
{
$result
=
$this
->
connection
->
q
uery
(
'SELECT '
.
$field
.
' FROM portability_table'
);
$result
=
$this
->
connection
->
executeQ
uery
(
'SELECT '
.
$field
.
' FROM portability_table'
);
$column
=
$result
->
fetchFirstColumn
();
self
::
assertEquals
(
$expected
,
$column
);
...
...
tests/Functional/Schema/MySqlSchemaManagerTest.php
View file @
3c07b4ad
...
...
@@ -520,7 +520,7 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
public
function
testEnsureTableOptionsAreReflectedInMetadata
()
:
void
{
$this
->
connection
->
query
(
'DROP TABLE IF EXISTS test_table_metadata'
);
$this
->
connection
->
executeStatement
(
'DROP TABLE IF EXISTS test_table_metadata'
);
$sql
=
<<<'SQL'
CREATE TABLE test_table_metadata(
...
...
@@ -534,7 +534,7 @@ AUTO_INCREMENT=42
PARTITION BY HASH (col1)
SQL;
$this
->
connection
->
query
(
$sql
);
$this
->
connection
->
executeStatement
(
$sql
);
$onlineTable
=
$this
->
schemaManager
->
listTableDetails
(
'test_table_metadata'
);
self
::
assertEquals
(
'InnoDB'
,
$onlineTable
->
getOption
(
'engine'
));
...
...
@@ -549,9 +549,9 @@ SQL;
public
function
testEnsureTableWithoutOptionsAreReflectedInMetadata
()
:
void
{
$this
->
connection
->
query
(
'DROP TABLE IF EXISTS test_table_empty_metadata'
);
$this
->
connection
->
executeStatement
(
'DROP TABLE IF EXISTS test_table_empty_metadata'
);
$this
->
connection
->
query
(
'CREATE TABLE test_table_empty_metadata(col1 INT NOT NULL)'
);
$this
->
connection
->
executeStatement
(
'CREATE TABLE test_table_empty_metadata(col1 INT NOT NULL)'
);
$onlineTable
=
$this
->
schemaManager
->
listTableDetails
(
'test_table_empty_metadata'
);
self
::
assertNotEmpty
(
$onlineTable
->
getOption
(
'engine'
));
...
...
tests/Functional/Schema/SchemaManagerFunctionalTestCase.php
View file @
3c07b4ad
...
...
@@ -1444,7 +1444,7 @@ abstract class SchemaManagerFunctionalTestCase extends FunctionalTestCase
"SELECT id FROM test_pk_auto_increment WHERE text = '1'"
);
$this
->
connection
->
query
(
'DELETE FROM test_pk_auto_increment'
);
$this
->
connection
->
executeStatement
(
'DELETE FROM test_pk_auto_increment'
);
$this
->
connection
->
insert
(
'test_pk_auto_increment'
,
[
'text'
=>
'2'
]);
...
...
tests/Functional/Schema/SqliteSchemaManagerTest.php
View file @
3c07b4ad
...
...
@@ -234,7 +234,7 @@ SQL;
$this
->
connection
->
insert
(
'test_pk_auto_increment'
,
[
'text'
=>
'1'
]);
$this
->
connection
->
query
(
'DELETE FROM test_pk_auto_increment'
);
$this
->
connection
->
executeStatement
(
'DELETE FROM test_pk_auto_increment'
);
$this
->
connection
->
insert
(
'test_pk_auto_increment'
,
[
'text'
=>
'2'
]);
...
...
tests/Functional/TransactionTest.php
View file @
3c07b4ad
...
...
@@ -29,7 +29,7 @@ class TransactionTest extends FunctionalTestCase
public
function
testCommitFalse
()
:
void
{
$this
->
connection
->
query
(
'SET SESSION wait_timeout=1'
);
$this
->
connection
->
executeStatement
(
'SET SESSION wait_timeout=1'
);
self
::
assertTrue
(
$this
->
connection
->
beginTransaction
());
...
...
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