Skip to content

Commit

Permalink
wip: skip empty queries
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Oct 17, 2023
1 parent 8ab44c9 commit 3b31219
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Query/SqlQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ public function execute(array $bindings = []):ResultSet {

$statement = $lastInsertId = null;
foreach($splitSqlQueryList as $sql) {
$sql = trim($sql);
if(!$sql) {
continue;

Check warning on line 62 in src/Query/SqlQuery.php

View check run for this annotation

Codecov / codecov/patch

src/Query/SqlQuery.php#L62

Added line #L62 was not covered by tests
}
$statement = $this->prepareStatement($pdo, $sql);
$preparedBindings = $this->prepareBindings($bindings);
$preparedBindings = $this->ensureParameterCharacter($preparedBindings);
Expand Down

0 comments on commit 3b31219

Please sign in to comment.