aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php')
-rw-r--r--tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php b/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php
index ed6e328881b..392fe9ff937 100644
--- a/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php
+++ b/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php
@@ -7,9 +7,9 @@
namespace Test\DB\QueryBuilder;
use Doctrine\DBAL\Schema\SchemaException;
-use Doctrine\DBAL\Types\Types;
use OC\DB\QueryBuilder\Literal;
use OCP\DB\QueryBuilder\IQueryBuilder;
+use OCP\DB\Types;
use OCP\IConfig;
use OCP\Server;
use Test\TestCase;
@@ -145,13 +145,13 @@ class ExpressionBuilderDBTest extends TestCase {
$dateTime = new \DateTime('2023-01-01');
$insert = $this->connection->getQueryBuilder();
$insert->insert('testing')
- ->values(['datetime' => $insert->createNamedParameter($dateTime, IQueryBuilder::PARAM_DATE)])
+ ->values(['datetime' => $insert->createNamedParameter($dateTime, IQueryBuilder::PARAM_DATETIME_MUTABLE)])
->executeStatement();
$query = $this->connection->getQueryBuilder();
$result = $query->select('*')
->from('testing')
- ->where($query->expr()->eq('datetime', $query->createNamedParameter($dateTime, IQueryBuilder::PARAM_DATE)))
+ ->where($query->expr()->eq('datetime', $query->createNamedParameter($dateTime, IQueryBuilder::PARAM_DATETIME_MUTABLE)))
->executeQuery();
$entries = $result->fetchAll();
$result->closeCursor();
@@ -163,13 +163,13 @@ class ExpressionBuilderDBTest extends TestCase {
$dateTimeCompare = new \DateTime('2022-01-02');
$insert = $this->connection->getQueryBuilder();
$insert->insert('testing')
- ->values(['datetime' => $insert->createNamedParameter($dateTime, IQueryBuilder::PARAM_DATE)])
+ ->values(['datetime' => $insert->createNamedParameter($dateTime, IQueryBuilder::PARAM_DATETIME_MUTABLE)])
->executeStatement();
$query = $this->connection->getQueryBuilder();
$result = $query->select('*')
->from('testing')
- ->where($query->expr()->lt('datetime', $query->createNamedParameter($dateTimeCompare, IQueryBuilder::PARAM_DATE)))
+ ->where($query->expr()->lt('datetime', $query->createNamedParameter($dateTimeCompare, IQueryBuilder::PARAM_DATETIME_MUTABLE)))
->executeQuery();
$entries = $result->fetchAll();
$result->closeCursor();
@@ -181,13 +181,13 @@ class ExpressionBuilderDBTest extends TestCase {
$dateTimeCompare = new \DateTime('2023-01-01');
$insert = $this->connection->getQueryBuilder();
$insert->insert('testing')
- ->values(['datetime' => $insert->createNamedParameter($dateTime, IQueryBuilder::PARAM_DATE)])
+ ->values(['datetime' => $insert->createNamedParameter($dateTime, IQueryBuilder::PARAM_DATETIME_MUTABLE)])
->executeStatement();
$query = $this->connection->getQueryBuilder();
$result = $query->select('*')
->from('testing')
- ->where($query->expr()->gt('datetime', $query->createNamedParameter($dateTimeCompare, IQueryBuilder::PARAM_DATE)))
+ ->where($query->expr()->gt('datetime', $query->createNamedParameter($dateTimeCompare, IQueryBuilder::PARAM_DATETIME_MUTABLE)))
->executeQuery();
$entries = $result->fetchAll();
$result->closeCursor();
@@ -223,7 +223,7 @@ class ExpressionBuilderDBTest extends TestCase {
'notnull' => true,
]);
- $table->addColumn('datetime', Types::DATETIME_MUTABLE, [
+ $table->addColumn('datetime', Types::DATETIME, [
'notnull' => false,
]);