Skip to content

Commit

Permalink
Resolve executeUpdate deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
norkunas committed Aug 24, 2021
1 parent 89ece49 commit 1a85577
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 1a85577

Please sign in to comment.