diff --git a/src/DQLQueryBuilder.php b/src/DQLQueryBuilder.php index b0d2aa2..2496a35 100644 --- a/src/DQLQueryBuilder.php +++ b/src/DQLQueryBuilder.php @@ -60,6 +60,15 @@ public function selectExists(string $rawSql): string return 'SELECT CASE WHEN EXISTS(' . $rawSql . ') THEN 1 ELSE 0 END FROM DUAL'; } + public function buildFrom(array|null $tables, array &$params): string + { + if (empty($tables)) { + return 'FROM DUAL'; + } + + return parent::buildFrom($tables, $params); + } + protected function defaultExpressionBuilders(): array { return array_merge(