aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DB/QueryBuilder/QueryBuilder.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/DB/QueryBuilder/QueryBuilder.php')
-rw-r--r--lib/private/DB/QueryBuilder/QueryBuilder.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/DB/QueryBuilder/QueryBuilder.php b/lib/private/DB/QueryBuilder/QueryBuilder.php
index 56c860bc42c..1d44c049793 100644
--- a/lib/private/DB/QueryBuilder/QueryBuilder.php
+++ b/lib/private/DB/QueryBuilder/QueryBuilder.php
@@ -96,6 +96,7 @@ class QueryBuilder implements IQueryBuilder {
return match($this->connection->getDatabaseProvider()) {
IDBConnection::PLATFORM_ORACLE => new OCIExpressionBuilder($this->connection, $this, $this->logger),
IDBConnection::PLATFORM_POSTGRES => new PgSqlExpressionBuilder($this->connection, $this, $this->logger),
+ IDBConnection::PLATFORM_MARIADB,
IDBConnection::PLATFORM_MYSQL => new MySqlExpressionBuilder($this->connection, $this, $this->logger),
IDBConnection::PLATFORM_SQLITE => new SqliteExpressionBuilder($this->connection, $this, $this->logger),
};
@@ -121,6 +122,7 @@ class QueryBuilder implements IQueryBuilder {
return match($this->connection->getDatabaseProvider()) {
IDBConnection::PLATFORM_ORACLE => new OCIFunctionBuilder($this->connection, $this, $this->helper),
IDBConnection::PLATFORM_POSTGRES => new PgSqlFunctionBuilder($this->connection, $this, $this->helper),
+ IDBConnection::PLATFORM_MARIADB,
IDBConnection::PLATFORM_MYSQL => new FunctionBuilder($this->connection, $this, $this->helper),
IDBConnection::PLATFORM_SQLITE => new SqliteFunctionBuilder($this->connection, $this, $this->helper),
};
@@ -161,7 +163,7 @@ class QueryBuilder implements IQueryBuilder {
try {
$params = [];
foreach ($this->getParameters() as $placeholder => $value) {
- if ($value instanceof \DateTime) {
+ if ($value instanceof \DateTimeInterface) {
$params[] = $placeholder . ' => DateTime:\'' . $value->format('c') . '\'';
} elseif (is_array($value)) {
$params[] = $placeholder . ' => (\'' . implode('\', \'', $value) . '\')';
@@ -1339,6 +1341,8 @@ class QueryBuilder implements IQueryBuilder {
/**
* Returns the table name with database prefix as needed by the implementation
*
+ * Was protected until version 30.
+ *
* @param string $table
* @return string
*/