diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2023-11-03 08:26:34 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-11-09 17:33:03 +0000 |
commit | c1574ae46f7a5701d79f2c1d333094a5d5919a46 (patch) | |
tree | 1dd237ed9b65dd29000fbf9acdd3c5d4eb86f4f3 /bitbake/lib/hashserv/client.py | |
parent | 3a2c5a6fa2e0081c28d5f2f43e1d9a79d093ea37 (diff) | |
download | poky-c1574ae46f7a5701d79f2c1d333094a5d5919a46.tar.gz |
bitbake: hashserv: Add database column query API
Adds an API to retrieve the columns that can be queried on from the
database backend. This prevents front end applications from needing to
hardcode the query columns
(Bitbake rev: abfce2b68bdab02ea2e9a63fbb3b9e270428a0a6)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/hashserv/client.py')
-rw-r--r-- | bitbake/lib/hashserv/client.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/hashserv/client.py b/bitbake/lib/hashserv/client.py index 5e0a462b1c..35a97687fb 100644 --- a/bitbake/lib/hashserv/client.py +++ b/bitbake/lib/hashserv/client.py | |||
@@ -190,6 +190,10 @@ class AsyncClient(bb.asyncrpc.AsyncClient): | |||
190 | await self._set_mode(self.MODE_NORMAL) | 190 | await self._set_mode(self.MODE_NORMAL) |
191 | return (await self.invoke({"get-db-usage": {}}))["usage"] | 191 | return (await self.invoke({"get-db-usage": {}}))["usage"] |
192 | 192 | ||
193 | async def get_db_query_columns(self): | ||
194 | await self._set_mode(self.MODE_NORMAL) | ||
195 | return (await self.invoke({"get-db-query-columns": {}}))["columns"] | ||
196 | |||
193 | 197 | ||
194 | class Client(bb.asyncrpc.Client): | 198 | class Client(bb.asyncrpc.Client): |
195 | def __init__(self, username=None, password=None): | 199 | def __init__(self, username=None, password=None): |
@@ -219,6 +223,7 @@ class Client(bb.asyncrpc.Client): | |||
219 | "delete_user", | 223 | "delete_user", |
220 | "become_user", | 224 | "become_user", |
221 | "get_db_usage", | 225 | "get_db_usage", |
226 | "get_db_query_columns", | ||
222 | ) | 227 | ) |
223 | 228 | ||
224 | def _get_async_client(self): | 229 | def _get_async_client(self): |