Skip to content

Commit

Permalink
Merge pull request #7 from norkunas/resolve-deprecation
Browse files Browse the repository at this point in the history
Resolve `executeUpdate` deprecation
  • Loading branch information
franzose authored Aug 24, 2021
2 parents 89ece49 + 1a85577 commit d3c8216
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ public function execute(string $table, array $dataset, array $types = []): int

$sql = sql($this->connection->getDatabasePlatform(), new Identifier($table), $dataset);

if (method_exists($this->connection, 'executeStatement')) {
return $this->connection->executeStatement($sql, parameters($dataset), types($types, count($dataset)));
}

return $this->connection->executeUpdate($sql, parameters($dataset), types($types, count($dataset)));
}

Expand Down

0 comments on commit d3c8216

Please sign in to comment.