Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ private function executeQuery(string $sql, array $parameters = [], array $types
return $stmt;
}

private function executeStatement(string $sql, array $parameters = [], array $types = [])
protected function executeStatement(string $sql, array $parameters = [], array $types = [])
{
try {
if (method_exists($this->driverConnection, 'executeStatement')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function get(): ?array
if (!$this->listening) {
// This is secure because the table name must be a valid identifier:
// https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
$this->driverConnection->exec(sprintf('LISTEN "%s"', $this->configuration['table_name']));
$this->executeStatement(sprintf('LISTEN "%s"', $this->configuration['table_name']));
$this->listening = true;
}

Expand All @@ -87,7 +87,7 @@ public function setup(): void
{
parent::setup();

$this->driverConnection->exec(implode("\n", $this->getTriggerSql()));
$this->executeStatement(implode("\n", $this->getTriggerSql()));
}

/**
Expand Down Expand Up @@ -134,7 +134,7 @@ private function unlisten()
return;
}

$this->driverConnection->exec(sprintf('UNLISTEN "%s"', $this->configuration['table_name']));
$this->executeStatement(sprintf('UNLISTEN "%s"', $this->configuration['table_name']));
$this->listening = false;
}
}