Skip to content

Commit

Permalink
Merge pull request #10 from manowark/support-debug-middleware-in-doct…
Browse files Browse the repository at this point in the history
…rine-data-loader

Use Platform type instead of Driver in DoctrineDataLoader
  • Loading branch information
javer authored Oct 3, 2022
2 parents ff8a027 + cb1bbf2 commit d9158cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Loader/DoctrineDataLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Javer\SphinxBundle\Loader;

use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Driver\PDO\SQLite\Driver as SqliteDriver;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Result;
use Javer\SphinxBundle\Sphinx\Manager;
use Javer\SphinxBundle\Sphinx\Query;
Expand Down Expand Up @@ -179,7 +179,7 @@ protected function executeDatabaseQuery(string $query): Result

protected function adaptQuery(string $query): string
{
if ($this->database->getDriver() instanceof SqliteDriver) {
if ($this->database->getDatabasePlatform() instanceof SqlitePlatform) {
$query = preg_replace("/UNIX_TIMESTAMP\(/i", "strftime('%s', ", $query);
}

Expand Down

0 comments on commit d9158cd

Please sign in to comment.