modifs.mineures sans commentaires

This commit is contained in:
Jephté Clain 2025-05-06 17:03:07 +04:00
parent a587f99e42
commit c78196450e

View File

@ -40,12 +40,20 @@ class SqliteStorage extends CapacitorStorage {
return new _sqliteMigration($migrations, $channel->getName()); return new _sqliteMigration($migrations, $channel->getName());
} }
function channelExists(string $name): bool { function channelExists(string $name, ?array &$row=null): bool {
return null !== $this->db->get([ $row = $this->db->one([
"select name", "select",
"from" => static::CHANNELS_TABLE, "from" => static::CHANNELS_TABLE,
"where" => ["name" => $name], "where" => ["name" => $name],
]); ]);
return $row !== null;
}
function getChannels(): iterable {
return $this->db->all([
"select",
"from" => static::CHANNELS_TABLE,
]);
} }
protected function _addToChannelsSql(CapacitorChannel $channel): array { protected function _addToChannelsSql(CapacitorChannel $channel): array {