Skip to content

Commit bb72611

Browse files
committed
Fix #157 by fixing deprecation
1 parent ad1e2a0 commit bb72611

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Source.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,21 @@ Will bind `values` to any parameters in `sql`.
8484
"""
8585
function query(db::DB, sql::AbstractString, sink::Union{Type, Nothing}=nothing, args...; values=[], append::Bool=false, transforms::Dict=Dict{Int,Function}(), kwargs...)
8686
if sink === nothing
87-
Base.depwarn("`SQLite.query(db, sql)` will return an `SQLite.Query` object in the future; to materialize a resultset, do `DataFrame(SQLite.query(db, sql))` instead", nothing)
87+
Base.depwarn("`SQLite.query(db, sql)` will return an `SQLite.Query` object in the future; to materialize a resultset, do `DataFrame(SQLite.Query(db, sql))` instead", nothing)
8888
sink = DataFrame
8989
else
90-
Base.depwarn("`SQLite.query(db, sql, $sink, args...)` is deprecated; use `SQLite.query(db, sql) |> $sink(args...)` instead", nothing)
90+
Base.depwarn("`SQLite.query(db, sql, $sink, args...)` is deprecated; use `SQLite.Query(db, sql) |> $sink(args...)` instead", nothing)
9191
end
9292
if append
93-
Base.depwarn("`append=true` is deprecated in favor of sink-specific append support; for a DataFrame, for example, one can do `append!(existing_df, SQLite.query(db, sql))`", nothing)
93+
Base.depwarn("`append=true` is deprecated in favor of sink-specific append support; for a DataFrame, for example, one can do `append!(existing_df, SQLite.Query(db, sql))`", nothing)
9494
end
9595
source = Source(db, sql, values; kwargs...)
9696
sink = Data.stream!(source, sink; append=append, transforms=transforms, args...)
9797
return Data.close!(sink)
9898
end
9999

100100
function query(db::DB, sql::AbstractString, sink::T; values=[], append::Bool=false, transforms::Dict=Dict{Int,Function}(), kwargs...) where {T}
101-
Base.depwarn("`SQLite.query(db, sql, ::$T)` is deprecated; use `SQLite.query(db, sql) |> $T` instead", nothing)
101+
Base.depwarn("`SQLite.query(db, sql, ::$T)` is deprecated; use `SQLite.Query(db, sql) |> $T` instead", nothing)
102102
if append
103103
Base.depwarn("`append=true` is deprecated in favor of sink-specific append support; for a DataFrame, for example, one can do `append!(existing_df, SQLite.query(db, sql))`", nothing)
104104
end
@@ -107,12 +107,12 @@ function query(db::DB, sql::AbstractString, sink::T; values=[], append::Bool=fal
107107
return Data.close!(sink)
108108
end
109109
function query(source::SQLite.Source, sink=DataFrame, args...; append::Bool=false, transforms::Dict=Dict{Int,Function}())
110-
Base.depwarn("`SQLite.query(s::SQLite.Source, args...)` is deprecated; use `SQLite.query(db, sql) |> sink` instead", nothing)
110+
Base.depwarn("`SQLite.query(s::SQLite.Source, args...)` is deprecated; use `SQLite.Query(db, sql) |> sink` instead", nothing)
111111
sink = Data.stream!(source, sink; append=append, transforms=transforms, args...)
112112
return Data.close!(sink)
113113
end
114114
function query(source::SQLite.Source, sink::T; append::Bool=false, transforms::Dict=Dict{Int,Function}()) where {T}
115-
Base.depwarn("`SQLite.query(s::SQLite.Source, args...)` is deprecated; use `SQLite.query(db, sql) |> sink` instead", nothing)
115+
Base.depwarn("`SQLite.query(s::SQLite.Source, args...)` is deprecated; use `SQLite.Query(db, sql) |> sink` instead", nothing)
116116
sink = Data.stream!(source, sink; append=append, transforms=transforms)
117117
return Data.close!(sink)
118118
end

0 commit comments

Comments
 (0)