diff --git a/pydb/pydb/pydb.py b/pydb/pydb/pydb.py index 02440ff..01d0c00 100644 --- a/pydb/pydb/pydb.py +++ b/pydb/pydb/pydb.py @@ -22,10 +22,15 @@ logger.addHandler(handler) def convert_query_result(query_res): """Return List(elements) from query result List(Tuples(element)).""" + logger.debug("Converting %s", query_res) if len(query_res) == 0: logger.warning("Received empty result set from DB") return [] - return [list(i) for i in query_res] if len(query_res) > 1 else query_res[0][0] + if len(query_res) == 1: + res = list(query_res[0]) + else: + res = [list(row) for row in query_res] + return res class DbWrapper: diff --git a/pydb/pyproject.toml b/pydb/pyproject.toml index 99edda2..3b429bf 100644 --- a/pydb/pyproject.toml +++ b/pydb/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "pydb" -version = "0.0.1" +version = "0.0.3" authors = [ { name="Kyle Yasuda", email="suda@sudacode.com" }, ]