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/sqlite.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/sqlite.py')
-rw-r--r-- | bitbake/lib/hashserv/sqlite.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bitbake/lib/hashserv/sqlite.py b/bitbake/lib/hashserv/sqlite.py index dfdccbbaa0..f65036be93 100644 --- a/bitbake/lib/hashserv/sqlite.py +++ b/bitbake/lib/hashserv/sqlite.py | |||
@@ -399,3 +399,10 @@ class Database(object): | |||
399 | "rows": cursor.fetchone()[0], | 399 | "rows": cursor.fetchone()[0], |
400 | } | 400 | } |
401 | return usage | 401 | return usage |
402 | |||
403 | async def get_query_columns(self): | ||
404 | columns = set() | ||
405 | for name, typ, _ in UNIHASH_TABLE_DEFINITION + OUTHASH_TABLE_DEFINITION: | ||
406 | if typ.startswith("TEXT"): | ||
407 | columns.add(name) | ||
408 | return list(columns) | ||