1

I have retrieve a record from my database (sqlite). When I ran the following code:

from sql_tools import sqlite
sqlite.connect("base.sqlite3")
names = sqlite.execute("SELECT * FROM NAMES")
print(names)
sqlite.disconnect()

It gives me an object instead of my result. How can I get my result instead of this object. Can anybody help me?

1 Answers1

0

You will need to use the .get property. From version 1.0.0, the execute command returns an Exec object instead of the result. This object has some properties & .get is one of them. This property will return you the result in the form of an np array.

Code:

names = sqlite.execute("SELECT * FROM NAMES").get
Yogesh Aggarwal
  • 1,071
  • 2
  • 12
  • 30