Sorry you find that a turnoff, but, the same sentiment can be expressed saying There are no known crashing bugs in JavaCall, but there are no warranties in open source software. I suppose this is a “glass half full” situation
But seriously, since this was written a couple of years ago, I’ve not had any reports of memory corruption.
In fact, given such observation I would argue to remove that statement entirely. There’s no 100% bug free software and if anyone bump into such a problem it would definitely surface and become visible.
This is great, thanks! I’m excited by the possibilities for this. I’ve added some thoughts as comments or issues, feel free to use or disregard as you see fit.
There is collect(Oracle.query(...)), but the result is not a DataFrame. I’ll add some methods to make it easier to convert to DataFrame, but I’ll avoid a dependency on DataFrames in this package.
Now this will return an instance of ResultSet. It will fetch all data from the query.
data = Oracle.query(conn, "select * from table")
There’s also the original implementation that is stream-based:
Oracle.query(conn, "select * from table") do cursor
for row in cursor
println(row["column_name"])
end
end
I don’t see anything in the documentation about transactions. How, if possible, would one go about making multiple inserts/updates within a transaction in this interface?
By the way, I tested out the performance of this interface, vs ODBC on a large extraction with a lot of mixed data types and it looks very good compared to ODBC in terms of time, although not sure why there are so many more allocations
This query involves 1 million rows and 150 columns of mixed data types (numbers and long strings)
julia> @time data = ODBC.query(dsn, querystring);
751.219655 seconds (83.12 M allocations: 7.166 GiB, 0.59% gc time)
julia> @time data = Oracle.query(conn, querystring);
146.536639 seconds (1.07 G allocations: 23.228 GiB, 7.91% gc time)
The thing is that Oracle.query returns a ResultSet that stores all resulting rows in memory. Maybe you wanna use a cursor for querying big data and avoid allocations.
Oracle.query(conn, "SELECT * FROM TB_BIND") do cursor
for row in cursor
# row values can be accessed using column name or position
println( row["ID"] ) # same as row[1]
println( row["FLT"] )
println( row["STR"] )
println( row["DT"] ) # same as row[4]
end
end
Sorry, one more question the documentation isn’t clear about. Is there a way to access the keys of the Oracle resultset? i.e. the column names and types returned from the query?
Yes… The package still lacks some API to access these information in an easy manner. See Issues · felipenoris/Oracle.jl · GitHub . Hopefully I’ll be able to work on that soon.
Please feel free to open issues at Issues · felipenoris/Oracle.jl · GitHub on API that is missing or things that the docs are lacking. I’ll be glad to work on them.