Closed yugantar7 closed 7 years ago
Thanks. I have refactored the code a little bit, so use a pattern similar to what it's used in psycopg2 or PyMySQL.
Now you can use this:
db = phoenixdb.connect(..., cursor_factory=phoenixdb.cursor.DictCursor)
cursor = db.cursor()
Or this:
cursor = db.cursor(cursor_factory=phoenixdb.cursor.DictCursor)
In both cases, all the fetch*
methods will return dicts instead of lists.
The result we were getting were of list format and difficult to map the column names, added a new method docResult to give a dictionary type result. By default it'll be a list like it is now, but if you give doc=True in fetchall(), fetchmany() or fetchone(), it'll return a dictionary type result.