diff --git a/src/tables.jl b/src/tables.jl index 4ff80cb..4105d71 100644 --- a/src/tables.jl +++ b/src/tables.jl @@ -2,7 +2,7 @@ using Tables sym(ptr) = ccall(:jl_symbol, Ref{Symbol}, (Ptr{UInt8},), ptr) -struct Query{strict} +struct Query{strict} <: DBInterface.Cursor stmt::Stmt status::Base.RefValue{Cint} names::Vector{Symbol} diff --git a/test/runtests.jl b/test/runtests.jl index 6c6e723..9f8df46 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -446,6 +446,12 @@ end end end + @testset "Query is a DBInterface.Cursor" begin + setup_clean_test_db() do db + @test DBInterface.execute(db, "SELECT * FROM Employee") isa DBInterface.Cursor + end + end + @testset "isempty(::Query)" begin setup_clean_test_db() do db @test !DBInterface.execute(