Add Phase 2 remote browse scaffolding for /Clients
This commit is contained in:
@@ -97,6 +97,20 @@ class RemoteClientRepository:
|
||||
).fetchall()
|
||||
return [self._to_dict(row) for row in rows]
|
||||
|
||||
def get_client(self, client_id: str) -> dict | None:
|
||||
with self._connection() as conn:
|
||||
row = conn.execute(
|
||||
"""
|
||||
SELECT *
|
||||
FROM remote_clients
|
||||
WHERE client_id = ?
|
||||
""",
|
||||
(client_id,),
|
||||
).fetchone()
|
||||
if row is None:
|
||||
return None
|
||||
return self._to_dict(row)
|
||||
|
||||
def _ensure_schema(self) -> None:
|
||||
db_path = Path(self._db_path)
|
||||
if db_path.parent and str(db_path.parent) not in {"", "."}:
|
||||
|
||||
Reference in New Issue
Block a user