Skip to content

Commit 14786c5

Browse files
committed
exports
1 parent 1f618b1 commit 14786c5

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

src/QuerySQLite.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Get the names of the tables in `outside`
4545
"""
4646
get_table_names(outside::DB) =
4747
as_symbols(tables(outside).name)
48+
export get_table_names
4849

4950
"""
5051
get_column_names(outside, table_name)::Tuple{Symbol}
@@ -53,22 +54,25 @@ Get column names of `table_name` in `outside`
5354
"""
5455
get_column_names(outside::DB, table_name) =
5556
as_symbols(columns(outside, String(table_name)).name)
57+
export get_column_names
5658

5759
"""
5860
submit_to(outside, text)
5961
6062
Send `text` to `outside`
6163
"""
6264
submit_to(outside::DB, text) = DataFrame(Query(outside, text))
65+
export submit_to
6366

6467
"""
6568
abstract type OutsideTables{Outside} end
6669
67-
`Outside` must support [`get_table_names`](@ref), [`get_column_names`](@ref), and [`evaluate`](@ref).
70+
`Outside` must support [`get_table_names`](@ref), [`get_column_names`](@ref), and [`submit_to`](@ref).
6871
"""
6972
struct OutsideTables{Outside}
7073
outside::Outside
7174
end
75+
export OutsideTables
7276

7377
struct OutsideTable{Outside}
7478
outside::Outside

test/runtests.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
using Query
22
using Test: @test, @testset
3-
4-
@testset "QuerySQLite" begin
3+
using Main.QuerySQLite
4+
using SQLite: DB
5+
using DataFrames: DataFrame
56

67
filename = joinpath(@__DIR__, "Chinook_Sqlite.sqlite")
7-
88
database = NamedTuple(OutsideTables(DB(filename)))
99

10-
database.Album |> @rename(:AlbumId => :AlbumId2) |> @filter(_.AlbumId2 > 3) |> DataFrame
10+
@testset "QuerySQLite" begin
1111

1212
@test names(database.Track |>
1313
@map({_.TrackId, _.Name, _.Composer, _.UnitPrice}) |>

0 commit comments

Comments
 (0)