Skip to content

Commit

Permalink
Including pgsql match option in getSqlDate function
Browse files Browse the repository at this point in the history
  • Loading branch information
devatreides committed Oct 15, 2021
1 parent ba62e0c commit 4611b2b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Trend.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Carbon\CarbonPeriod;
use Error;
use Flowframe\Trend\Adapters\MySqlAdapter;
use Flowframe\Trend\Adapters\PgsqlAdapter;
use Flowframe\Trend\Adapters\SqliteAdapter;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Carbon;
Expand Down Expand Up @@ -157,6 +158,7 @@ protected function getSqlDate(): string
$adapter = match ($this->builder->getConnection()->getDriverName()) {
'mysql' => new MySqlAdapter(),
'sqlite' => new SqliteAdapter(),
'pgsql' => new PgsqlAdapter(),
default => throw new Error('Unsupported database driver.'),
};

Expand Down

0 comments on commit 4611b2b

Please sign in to comment.