1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-05-06 15:24:03 +00:00

Use select() instead of selectOne() in databaseExists() and userExists()

This is just for consistency, since all the other DB managers use select().
This commit is contained in:
lukinovec 2026-04-29 10:08:45 +02:00
parent 984911946a
commit 808f52765c
2 changed files with 2 additions and 2 deletions

View file

@ -77,6 +77,6 @@ trait ManagesPostgresUsers
public function userExists(string $username): bool public function userExists(string $username): bool
{ {
return (bool) $this->connection()->selectOne("SELECT usename FROM pg_user WHERE usename = '{$username}'"); return (bool) $this->connection()->select("SELECT usename FROM pg_user WHERE usename = '{$username}'");
} }
} }

View file

@ -20,6 +20,6 @@ class PostgreSQLDatabaseManager extends TenantDatabaseManager
public function databaseExists(string $name): bool public function databaseExists(string $name): bool
{ {
return (bool) $this->connection()->selectOne("SELECT datname FROM pg_database WHERE datname = '$name'"); return (bool) $this->connection()->select("SELECT datname FROM pg_database WHERE datname = '$name'");
} }
} }