From 57a8fc37651da947b3c198015056c5c89d6d8400 Mon Sep 17 00:00:00 2001 From: Jesus Pulido Date: Tue, 17 Dec 2024 12:47:18 -0700 Subject: [PATCH] added wildfire query example to return table with col names --- examples/wildfire/wildfire_terminal.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/wildfire/wildfire_terminal.py b/examples/wildfire/wildfire_terminal.py index cb90e0b4..c555fd88 100644 --- a/examples/wildfire/wildfire_terminal.py +++ b/examples/wildfire/wildfire_terminal.py @@ -9,9 +9,8 @@ cnames = a.artifact_handler(interaction_type='get', query = "PRAGMA table_info(wfdata);") data = a.artifact_handler(interaction_type='get', query = "SELECT * FROM wfdata;")#, isVerbose = True) -# a.artifact_handler(interaction_type="read") clist = [i[1] for i in cnames] -dlist = list(data) -print(clist) -print(dlist) -# a.unload_module('backend', 'Sqlite', 'back-write') +table = [clist] + [list(row) for row in data] + +print(table) +# a.unload_module('backend', 'Sqlite', 'back-write') \ No newline at end of file