Skip to content

Commit

Permalink
Add postgres filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
abnegate committed Apr 5, 2023
1 parent 60b49ff commit ffc446b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Database/Adapter/Postgres.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ public function createRelationship(
$table = $this->getSQLTable($name);
$relatedTable = $this->getSQLTable($relatedName);
$id = $this->filter($id);
$twoWayKey = $this->filter($twoWayKey);
$sqlType = $this->getSQLType(Database::VAR_RELATIONSHIP, 0, false);

switch ($type) {
Expand Down Expand Up @@ -342,6 +343,8 @@ public function updateRelationship(
$relatedName = $this->filter($relatedCollection);
$table = $this->getSQLTable($name);
$relatedTable = $this->getSQLTable($relatedName);
$id = $this->filter($id);
$twoWayKey = $this->filter($twoWayKey);

if (!\is_null($newKey)) {
$newKey = $this->filter($newKey);
Expand Down Expand Up @@ -407,6 +410,8 @@ public function deleteRelationship(
$relatedName = $this->filter($relatedCollection);
$table = $this->getSQLTable($name);
$relatedTable = $this->getSQLTable($relatedName);
$id = $this->filter($id);
$twoWayKey = $this->filter($twoWayKey);

switch ($type) {
case Database::RELATION_ONE_TO_ONE:
Expand Down

0 comments on commit ffc446b

Please sign in to comment.