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
45736a18
Unverified
Commit
45736a18
authored
Jul 10, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace $conn->exec() and $conn->executeUpdate() with $conn->executeStatement()
parent
d47675e2
Changes
22
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
64 additions
and
66 deletions
+64
-66
Connection.php
src/Connection.php
+3
-20
SQLSessionInit.php
src/Event/Listeners/SQLSessionInit.php
+1
-1
SQLServerSchemaManager.php
src/Schema/SQLServerSchemaManager.php
+1
-1
AbstractSchemaSynchronizer.php
src/Schema/Synchronizer/AbstractSchemaSynchronizer.php
+2
-2
SQLSessionInitTest.php
tests/Events/SQLSessionInitTest.php
+1
-1
DataAccessTest.php
tests/Functional/DataAccessTest.php
+2
-2
ExceptionTest.php
tests/Functional/ExceptionTest.php
+7
-7
ModifyLimitQueryTest.php
tests/Functional/ModifyLimitQueryTest.php
+9
-2
DefaultExpressionTest.php
tests/Functional/Platform/DefaultExpressionTest.php
+1
-1
NewPrimaryKeyWithNewAutoIncrementColumnTest.php
.../Platform/NewPrimaryKeyWithNewAutoIncrementColumnTest.php
+1
-1
ForeignKeyTest.php
tests/Functional/Schema/ForeignKeyTest.php
+1
-1
OracleSchemaManagerTest.php
tests/Functional/Schema/OracleSchemaManagerTest.php
+1
-1
PostgreSqlSchemaManagerTest.php
tests/Functional/Schema/PostgreSqlSchemaManagerTest.php
+7
-7
SchemaManagerFunctionalTestCase.php
tests/Functional/Schema/SchemaManagerFunctionalTestCase.php
+3
-3
SqliteSchemaManagerTest.php
tests/Functional/Schema/SqliteSchemaManagerTest.php
+2
-2
TableGeneratorTest.php
tests/Functional/TableGeneratorTest.php
+1
-1
TemporaryTableTest.php
tests/Functional/TemporaryTableTest.php
+13
-5
DBAL202Test.php
tests/Functional/Ticket/DBAL202Test.php
+1
-1
DBAL630Test.php
tests/Functional/Ticket/DBAL630Test.php
+2
-2
DBAL752Test.php
tests/Functional/Ticket/DBAL752Test.php
+1
-1
WriteTest.php
tests/Functional/WriteTest.php
+3
-3
TestUtil.php
tests/TestUtil.php
+1
-1
No files found.
src/Connection.php
View file @
45736a18
...
...
@@ -1027,23 +1027,6 @@ class Connection
return
new
Result
(
$result
,
$this
);
}
/**
* Executes an SQL INSERT/UPDATE/DELETE query with the given parameters
* and returns the number of affected rows.
*
* @deprecated Use {@link executeStatement()} instead.
*
* @param string $query The SQL query.
* @param array<mixed> $params The query parameters.
* @param array<int|string|null> $types The parameter types.
*
* @throws DBALException
*/
public
function
executeUpdate
(
string
$query
,
array
$params
=
[],
array
$types
=
[])
:
int
{
return
$this
->
executeStatement
(
$query
,
$params
,
$types
);
}
/**
* Executes an SQL statement with the given parameters and returns the number of affected rows.
*
...
...
@@ -1410,7 +1393,7 @@ class Connection
throw
ConnectionException
::
savepointsNotSupported
();
}
$this
->
execute
Update
(
$this
->
platform
->
createSavePoint
(
$savepoint
));
$this
->
execute
Statement
(
$this
->
platform
->
createSavePoint
(
$savepoint
));
}
/**
...
...
@@ -1432,7 +1415,7 @@ class Connection
return
;
}
$this
->
execute
Update
(
$this
->
platform
->
releaseSavePoint
(
$savepoint
));
$this
->
execute
Statement
(
$this
->
platform
->
releaseSavePoint
(
$savepoint
));
}
/**
...
...
@@ -1450,7 +1433,7 @@ class Connection
throw
ConnectionException
::
savepointsNotSupported
();
}
$this
->
execute
Update
(
$this
->
platform
->
rollbackSavePoint
(
$savepoint
));
$this
->
execute
Statement
(
$this
->
platform
->
rollbackSavePoint
(
$savepoint
));
}
/**
...
...
src/Event/Listeners/SQLSessionInit.php
View file @
45736a18
...
...
@@ -30,7 +30,7 @@ class SQLSessionInit implements EventSubscriber
*/
public
function
postConnect
(
ConnectionEventArgs
$args
)
{
$args
->
getConnection
()
->
execute
Update
(
$this
->
sql
);
$args
->
getConnection
()
->
execute
Statement
(
$this
->
sql
);
}
/**
...
...
src/Schema/SQLServerSchemaManager.php
View file @
45736a18
...
...
@@ -278,7 +278,7 @@ class SQLServerSchemaManager extends AbstractSchemaManager
foreach
(
$tableDiff
->
removedColumns
as
$col
)
{
$columnConstraintSql
=
$this
->
getColumnConstraintSQL
(
$tableDiff
->
name
,
$col
->
getName
());
foreach
(
$this
->
_conn
->
fetchAllAssociative
(
$columnConstraintSql
)
as
$constraint
)
{
$this
->
_conn
->
exec
(
$this
->
_conn
->
exec
uteStatement
(
sprintf
(
'ALTER TABLE %s DROP CONSTRAINT %s'
,
$tableDiff
->
name
,
...
...
src/Schema/Synchronizer/AbstractSchemaSynchronizer.php
View file @
45736a18
...
...
@@ -28,7 +28,7 @@ abstract class AbstractSchemaSynchronizer implements SchemaSynchronizer
{
foreach
(
$sql
as
$s
)
{
try
{
$this
->
conn
->
exec
(
$s
);
$this
->
conn
->
exec
uteStatement
(
$s
);
}
catch
(
Throwable
$e
)
{
}
}
...
...
@@ -44,7 +44,7 @@ abstract class AbstractSchemaSynchronizer implements SchemaSynchronizer
protected
function
processSql
(
array
$sql
)
{
foreach
(
$sql
as
$s
)
{
$this
->
conn
->
exec
(
$s
);
$this
->
conn
->
exec
uteStatement
(
$s
);
}
}
}
tests/Events/SQLSessionInitTest.php
View file @
45736a18
...
...
@@ -17,7 +17,7 @@ class SQLSessionInitTest extends TestCase
{
$connectionMock
=
$this
->
createMock
(
Connection
::
class
);
$connectionMock
->
expects
(
self
::
once
())
->
method
(
'execute
Update
'
)
->
method
(
'execute
Statement
'
)
->
with
(
self
::
equalTo
(
"SET SEARCH_PATH TO foo, public, TIMEZONE TO 'Europe/Berlin'"
));
$eventArgs
=
new
ConnectionEventArgs
(
$connectionMock
);
...
...
tests/Functional/DataAccessTest.php
View file @
45736a18
...
...
@@ -546,7 +546,7 @@ class DataAccessTest extends FunctionalTestCase
*/
public
function
testBitComparisonExpressionSupport
()
:
void
{
$this
->
connection
->
exec
(
'DELETE FROM fetch_table'
);
$this
->
connection
->
exec
uteStatement
(
'DELETE FROM fetch_table'
);
$platform
=
$this
->
connection
->
getDatabasePlatform
();
$bitmap
=
[];
...
...
@@ -612,7 +612,7 @@ class DataAccessTest extends FunctionalTestCase
public
function
testEmptyFetchOneReturnsFalse
()
:
void
{
$this
->
connection
->
beginTransaction
();
$this
->
connection
->
exec
(
'DELETE FROM fetch_table'
);
$this
->
connection
->
exec
uteStatement
(
'DELETE FROM fetch_table'
);
self
::
assertFalse
(
$this
->
connection
->
fetchOne
(
'SELECT test_int FROM fetch_table'
));
$this
->
connection
->
rollBack
();
}
...
...
tests/Functional/ExceptionTest.php
View file @
45736a18
...
...
@@ -86,7 +86,7 @@ class ExceptionTest extends FunctionalTestCase
public
function
testForeignKeyConstraintViolationExceptionOnInsert
()
:
void
{
if
(
$this
->
connection
->
getDatabasePlatform
()
->
getName
()
===
'sqlite'
)
{
$this
->
connection
->
exec
(
'PRAGMA foreign_keys=ON'
);
$this
->
connection
->
exec
uteStatement
(
'PRAGMA foreign_keys=ON'
);
}
$this
->
setUpForeignKeyConstraintViolationExceptionTest
();
...
...
@@ -231,7 +231,7 @@ class ExceptionTest extends FunctionalTestCase
$table
->
setPrimaryKey
([
'id'
]);
foreach
(
$schema
->
toSql
(
$this
->
connection
->
getDatabasePlatform
())
as
$sql
)
{
$this
->
connection
->
exec
(
$sql
);
$this
->
connection
->
exec
uteStatement
(
$sql
);
}
$this
->
expectException
(
Exception\NotNullConstraintViolationException
::
class
);
...
...
@@ -246,7 +246,7 @@ class ExceptionTest extends FunctionalTestCase
$table
->
addColumn
(
'id'
,
'integer'
,
[]);
foreach
(
$schema
->
toSql
(
$this
->
connection
->
getDatabasePlatform
())
as
$sql
)
{
$this
->
connection
->
exec
(
$sql
);
$this
->
connection
->
exec
uteStatement
(
$sql
);
}
$this
->
expectException
(
Exception\InvalidFieldNameException
::
class
);
...
...
@@ -264,7 +264,7 @@ class ExceptionTest extends FunctionalTestCase
$table2
->
addColumn
(
'id'
,
'integer'
);
foreach
(
$schema
->
toSql
(
$this
->
connection
->
getDatabasePlatform
())
as
$sql
)
{
$this
->
connection
->
exec
(
$sql
);
$this
->
connection
->
exec
uteStatement
(
$sql
);
}
$sql
=
'SELECT id FROM ambiguous_list_table, ambiguous_list_table_2'
;
...
...
@@ -281,7 +281,7 @@ class ExceptionTest extends FunctionalTestCase
$table
->
addUniqueIndex
([
'id'
]);
foreach
(
$schema
->
toSql
(
$this
->
connection
->
getDatabasePlatform
())
as
$sql
)
{
$this
->
connection
->
exec
(
$sql
);
$this
->
connection
->
exec
uteStatement
(
$sql
);
}
$this
->
connection
->
insert
(
'unique_field_table'
,
[
'id'
=>
5
]);
...
...
@@ -345,7 +345,7 @@ EOT
try
{
foreach
(
$schema
->
toSql
(
$conn
->
getDatabasePlatform
())
as
$sql
)
{
$conn
->
exec
(
$sql
);
$conn
->
exec
uteStatement
(
$sql
);
}
}
finally
{
$this
->
cleanupReadOnlyFile
(
$filename
);
...
...
@@ -390,7 +390,7 @@ EOT
$this
->
expectException
(
Exception\ConnectionException
::
class
);
foreach
(
$schema
->
toSql
(
$conn
->
getDatabasePlatform
())
as
$sql
)
{
$conn
->
exec
(
$sql
);
$conn
->
exec
uteStatement
(
$sql
);
}
}
...
...
tests/Functional/ModifyLimitQueryTest.php
View file @
45736a18
...
...
@@ -35,8 +35,15 @@ class ModifyLimitQueryTest extends FunctionalTestCase
self
::
$tableCreated
=
true
;
}
$this
->
connection
->
exec
(
$this
->
connection
->
getDatabasePlatform
()
->
getTruncateTableSQL
(
'modify_limit_table'
));
$this
->
connection
->
exec
(
$this
->
connection
->
getDatabasePlatform
()
->
getTruncateTableSQL
(
'modify_limit_table2'
));
$platform
=
$this
->
connection
->
getDatabasePlatform
();
$this
->
connection
->
executeStatement
(
$platform
->
getTruncateTableSQL
(
'modify_limit_table'
)
);
$this
->
connection
->
executeStatement
(
$platform
->
getTruncateTableSQL
(
'modify_limit_table2'
)
);
}
public
function
testModifyLimitQuerySimpleQuery
()
:
void
...
...
tests/Functional/Platform/DefaultExpressionTest.php
View file @
45736a18
...
...
@@ -62,7 +62,7 @@ class DefaultExpressionTest extends FunctionalTestCase
$table
->
addColumn
(
'default_value'
,
$type
,
[
'default'
=>
$defaultSql
]);
$this
->
connection
->
getSchemaManager
()
->
dropAndCreateTable
(
$table
);
$this
->
connection
->
exec
(
$this
->
connection
->
exec
uteStatement
(
sprintf
(
'INSERT INTO default_expr_test (actual_value) VALUES (%s)'
,
$defaultSql
...
...
tests/Functional/Platform/NewPrimaryKeyWithNewAutoIncrementColumnTest.php
View file @
45736a18
...
...
@@ -48,7 +48,7 @@ final class NewPrimaryKeyWithNewAutoIncrementColumnTest extends FunctionalTestCa
$diff
=
(
new
Comparator
())
->
compare
(
$schema
,
$newSchema
);
foreach
(
$diff
->
toSql
(
$this
->
getPlatform
())
as
$sql
)
{
$this
->
connection
->
exec
(
$sql
);
$this
->
connection
->
exec
uteStatement
(
$sql
);
}
$validationSchema
=
$schemaManager
->
createSchema
();
...
...
tests/Functional/Schema/ForeignKeyTest.php
View file @
45736a18
...
...
@@ -26,7 +26,7 @@ class ForeignKeyTest extends FunctionalTestCase
);
foreach
(
$schema
->
toSql
(
$this
->
connection
->
getDatabasePlatform
())
as
$sql
)
{
$this
->
connection
->
exec
(
$sql
);
$this
->
connection
->
exec
uteStatement
(
$sql
);
}
self
::
assertCount
(
...
...
tests/Functional/Schema/OracleSchemaManagerTest.php
View file @
45736a18
...
...
@@ -28,7 +28,7 @@ class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase
}
TestUtil
::
getPrivilegedConnection
()
->
exec
(
'GRANT ALL PRIVILEGES TO '
.
$GLOBALS
[
'db_user'
]);
->
exec
uteStatement
(
'GRANT ALL PRIVILEGES TO '
.
$GLOBALS
[
'db_user'
]);
self
::
$privilegesGranted
=
true
;
}
...
...
tests/Functional/Schema/PostgreSqlSchemaManagerTest.php
View file @
45736a18
...
...
@@ -66,10 +66,10 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
public
function
testSupportDomainTypeFallback
()
:
void
{
$createDomainTypeSQL
=
'CREATE DOMAIN MyMoney AS DECIMAL(18,2)'
;
$this
->
connection
->
exec
(
$createDomainTypeSQL
);
$this
->
connection
->
exec
uteStatement
(
$createDomainTypeSQL
);
$createTableSQL
=
'CREATE TABLE domain_type_test (id INT PRIMARY KEY, value MyMoney)'
;
$this
->
connection
->
exec
(
$createTableSQL
);
$this
->
connection
->
exec
uteStatement
(
$createTableSQL
);
$table
=
$this
->
connection
->
getSchemaManager
()
->
listTableDetails
(
'domain_type_test'
);
self
::
assertInstanceOf
(
DecimalType
::
class
,
$table
->
getColumn
(
'value'
)
->
getType
());
...
...
@@ -154,7 +154,7 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
*/
public
function
testTableWithSchema
()
:
void
{
$this
->
connection
->
exec
(
'CREATE SCHEMA nested'
);
$this
->
connection
->
exec
uteStatement
(
'CREATE SCHEMA nested'
);
$nestedRelatedTable
=
new
Table
(
'nested.schemarelated'
);
$column
=
$nestedRelatedTable
->
addColumn
(
'id'
,
'integer'
);
...
...
@@ -190,10 +190,10 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
public
function
testReturnQuotedAssets
()
:
void
{
$sql
=
'create table dbal91_something ( id integer CONSTRAINT id_something PRIMARY KEY NOT NULL ,"table" integer );'
;
$this
->
connection
->
exec
(
$sql
);
$this
->
connection
->
exec
uteStatement
(
$sql
);
$sql
=
'ALTER TABLE dbal91_something ADD CONSTRAINT something_input FOREIGN KEY( "table" ) REFERENCES dbal91_something ON UPDATE CASCADE;'
;
$this
->
connection
->
exec
(
$sql
);
$this
->
connection
->
exec
uteStatement
(
$sql
);
$table
=
$this
->
schemaManager
->
listTableDetails
(
'dbal91_something'
);
...
...
@@ -349,8 +349,8 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
public
function
testListTableDetailsWhenCurrentSchemaNameQuoted
()
:
void
{
$this
->
connection
->
exec
(
'CREATE SCHEMA "001_test"'
);
$this
->
connection
->
exec
(
'SET search_path TO "001_test"'
);
$this
->
connection
->
exec
uteStatement
(
'CREATE SCHEMA "001_test"'
);
$this
->
connection
->
exec
uteStatement
(
'SET search_path TO "001_test"'
);
try
{
$this
->
testListQuotedTable
();
...
...
tests/Functional/Schema/SchemaManagerFunctionalTestCase.php
View file @
45736a18
...
...
@@ -86,7 +86,7 @@ abstract class SchemaManagerFunctionalTestCase extends FunctionalTestCase
//TODO: SchemaDiff does not drop removed namespaces?
try
{
//sql server versions below 2016 do not support 'IF EXISTS' so we have to catch the exception here
$this
->
connection
->
exec
(
'DROP SCHEMA testschema'
);
$this
->
connection
->
exec
uteStatement
(
'DROP SCHEMA testschema'
);
}
catch
(
DBALException
$e
)
{
return
;
}
...
...
@@ -643,7 +643,7 @@ abstract class SchemaManagerFunctionalTestCase extends FunctionalTestCase
$diff
->
newNamespaces
[]
=
'testschema'
;
foreach
(
$diff
->
toSql
(
$this
->
schemaManager
->
getDatabasePlatform
())
as
$sql
)
{
$this
->
connection
->
exec
(
$sql
);
$this
->
connection
->
exec
uteStatement
(
$sql
);
}
//test if table is create in namespace
...
...
@@ -1505,7 +1505,7 @@ abstract class SchemaManagerFunctionalTestCase extends FunctionalTestCase
$sqls
=
$diff
->
toSql
(
$platform
);
foreach
(
$sqls
as
$sql
)
{
$this
->
connection
->
exec
(
$sql
);
$this
->
connection
->
exec
uteStatement
(
$sql
);
}
$schema
=
new
Schema
([
...
...
tests/Functional/Schema/SqliteSchemaManagerTest.php
View file @
45736a18
...
...
@@ -77,7 +77,7 @@ class SqliteSchemaManagerTest extends SchemaManagerFunctionalTestCase
public
function
testListForeignKeysFromExistingDatabase
()
:
void
{
$this
->
connection
->
exec
(
<<<EOS
$this
->
connection
->
exec
uteStatement
(
<<<EOS
CREATE TABLE user (
id INTEGER PRIMARY KEY AUTOINCREMENT,
page INTEGER CONSTRAINT FK_1 REFERENCES page (key) DEFERRABLE INITIALLY DEFERRED,
...
...
@@ -165,7 +165,7 @@ CREATE TABLE dbal_1779 (
)
SQL;
$this
->
connection
->
exec
(
$sql
);
$this
->
connection
->
exec
uteStatement
(
$sql
);
$columns
=
$this
->
schemaManager
->
listTableColumns
(
'dbal_1779'
);
...
...
tests/Functional/TableGeneratorTest.php
View file @
45736a18
...
...
@@ -31,7 +31,7 @@ class TableGeneratorTest extends FunctionalTestCase
$schema
->
visit
(
$visitor
);
foreach
(
$schema
->
toSql
(
$platform
)
as
$sql
)
{
$this
->
connection
->
exec
(
$sql
);
$this
->
connection
->
exec
uteStatement
(
$sql
);
}
}
catch
(
Throwable
$e
)
{
}
...
...
tests/Functional/TemporaryTableTest.php
View file @
45736a18
...
...
@@ -13,7 +13,9 @@ class TemporaryTableTest extends FunctionalTestCase
{
parent
::
setUp
();
try
{
$this
->
connection
->
exec
(
$this
->
connection
->
getDatabasePlatform
()
->
getDropTableSQL
(
'nontemporary'
));
$this
->
connection
->
executeStatement
(
$this
->
connection
->
getDatabasePlatform
()
->
getDropTableSQL
(
'nontemporary'
)
);
}
catch
(
Throwable
$e
)
{
}
}
...
...
@@ -23,7 +25,9 @@ class TemporaryTableTest extends FunctionalTestCase
if
(
$this
->
connection
)
{
try
{
$tempTable
=
$this
->
connection
->
getDatabasePlatform
()
->
getTemporaryTableName
(
'my_temporary'
);
$this
->
connection
->
exec
(
$this
->
connection
->
getDatabasePlatform
()
->
getDropTemporaryTableSQL
(
$tempTable
));
$this
->
connection
->
executeStatement
(
$this
->
connection
->
getDatabasePlatform
()
->
getDropTemporaryTableSQL
(
$tempTable
)
);
}
catch
(
Throwable
$e
)
{
}
}
...
...
@@ -56,7 +60,9 @@ class TemporaryTableTest extends FunctionalTestCase
$this
->
connection
->
beginTransaction
();
$this
->
connection
->
insert
(
'nontemporary'
,
[
'id'
=>
1
]);
$this
->
connection
->
exec
(
$platform
->
getDropTemporaryTableSQL
(
$tempTable
));
$this
->
connection
->
executeStatement
(
$platform
->
getDropTemporaryTableSQL
(
$tempTable
)
);
$this
->
connection
->
insert
(
'nontemporary'
,
[
'id'
=>
2
]);
$this
->
connection
->
rollBack
();
...
...
@@ -90,13 +96,15 @@ class TemporaryTableTest extends FunctionalTestCase
$this
->
connection
->
beginTransaction
();
$this
->
connection
->
insert
(
'nontemporary'
,
[
'id'
=>
1
]);
$this
->
connection
->
exec
(
$createTempTableSQL
);
$this
->
connection
->
exec
uteStatement
(
$createTempTableSQL
);
$this
->
connection
->
insert
(
'nontemporary'
,
[
'id'
=>
2
]);
$this
->
connection
->
rollBack
();
try
{
$this
->
connection
->
exec
(
$platform
->
getDropTemporaryTableSQL
(
$tempTable
));
$this
->
connection
->
executeStatement
(
$platform
->
getDropTemporaryTableSQL
(
$tempTable
)
);
}
catch
(
Throwable
$e
)
{
}
...
...
tests/Functional/Ticket/DBAL202Test.php
View file @
45736a18
...
...
@@ -19,7 +19,7 @@ class DBAL202Test extends FunctionalTestCase
}
if
(
$this
->
connection
->
getSchemaManager
()
->
tablesExist
(
'DBAL202'
))
{
$this
->
connection
->
exec
(
'DELETE FROM DBAL202'
);
$this
->
connection
->
exec
uteStatement
(
'DELETE FROM DBAL202'
);
}
else
{
$table
=
new
Table
(
'DBAL202'
);
$table
->
addColumn
(
'id'
,
'integer'
);
...
...
tests/Functional/Ticket/DBAL630Test.php
View file @
45736a18
...
...
@@ -26,8 +26,8 @@ class DBAL630Test extends FunctionalTestCase
}
try
{
$this
->
connection
->
exec
(
'CREATE TABLE dbal630 (id SERIAL, bool_col BOOLEAN NOT NULL);'
);
$this
->
connection
->
exec
(
'CREATE TABLE dbal630_allow_nulls (id SERIAL, bool_col BOOLEAN);'
);
$this
->
connection
->
exec
uteStatement
(
'CREATE TABLE dbal630 (id SERIAL, bool_col BOOLEAN NOT NULL);'
);
$this
->
connection
->
exec
uteStatement
(
'CREATE TABLE dbal630_allow_nulls (id SERIAL, bool_col BOOLEAN);'
);
}
catch
(
DBALException
$e
)
{
}
...
...
tests/Functional/Ticket/DBAL752Test.php
View file @
45736a18
...
...
@@ -23,7 +23,7 @@ class DBAL752Test extends FunctionalTestCase
public
function
testUnsignedIntegerDetection
()
:
void
{
$this
->
connection
->
exec
(
<<<SQL
$this
->
connection
->
exec
uteStatement
(
<<<SQL
CREATE TABLE dbal752_unsigneds (
small SMALLINT,
small_unsigned SMALLINT UNSIGNED,
...
...
tests/Functional/WriteTest.php
View file @
45736a18
...
...
@@ -277,7 +277,7 @@ class WriteTest extends FunctionalTestCase
}
foreach
(
$platform
->
getCreateTableSQL
(
$table
)
as
$sql
)
{
$this
->
connection
->
exec
(
$sql
);
$this
->
connection
->
exec
uteStatement
(
$sql
);
}
$seqName
=
$platform
->
usesSequenceEmulatedIdentityColumns
()
...
...
@@ -286,11 +286,11 @@ class WriteTest extends FunctionalTestCase
$sql
=
$platform
->
getEmptyIdentityInsertSQL
(
'test_empty_identity'
,
'id'
);
$this
->
connection
->
exec
(
$sql
);
$this
->
connection
->
exec
uteStatement
(
$sql
);
$firstId
=
$this
->
lastInsertId
(
$seqName
);
$this
->
connection
->
exec
(
$sql
);
$this
->
connection
->
exec
uteStatement
(
$sql
);
$secondId
=
$this
->
lastInsertId
(
$seqName
);
...
...
tests/TestUtil.php
View file @
45736a18
...
...
@@ -106,7 +106,7 @@ class TestUtil
$stmts
=
$schema
->
toDropSql
(
$testConn
->
getDatabasePlatform
());
foreach
(
$stmts
as
$stmt
)
{
$testConn
->
exec
(
$stmt
);
$testConn
->
exec
uteStatement
(
$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