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:
parent
984911946a
commit
808f52765c
2 changed files with 2 additions and 2 deletions
|
|
@ -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}'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue