My code
conn = SQLite.DB(dbn)
query = "SELECT * FROM $(tn)"
r = SQLite.execute(conn, query)
df = DataFrame(r)
Getting error
ArgumentError: ‘Int32’ iterates ‘Int32’ values, which doesn’t satisfy the Tables.jl AbstractRow
interface
Table is exists and created with
CREATE TABLE "Test" (
"Ts" text,
"PosId" string,
"Op" string,
"Price" float,
"Volume" float,
"Balance" float,
PRIMARY KEY("Ts")
);
SQLite.DBInterface.execute… instead of SQLite.execute works, but it is very confusing
You could try:
dump(SQLite.execute(db,"select * from Test1"))
That will show you the object. My guess is they implemented a show method for whatever that method returns…and it’s not showing much. Again looking at the code maybe try:
a = SQLite.execute(db,"select * from Test1")
getvalue(a, 1, Int)
Not sure if getvalue() should be prefixed with SQLite.
1 Like
quinnj
June 27, 2023, 8:19pm
3
Sorry about this; we have an open issue to remove/rename SQLite.execute
, but as a general note, the DBInterface.jl functions should be preferred for general querying/database management.