Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
6 changes: 6 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading