Skip to content
This repository has been archived by the owner on Jul 17, 2019. It is now read-only.

Fix name clash between code type parameter and code type extractor function #88

Merged
merged 1 commit into from
Oct 10, 2018
Merged
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
4 changes: 2 additions & 2 deletions src/query.jl
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,13 @@ unwk(::Type{WeakRefString{T}}, wk) where {T} = wk ? WeakRefString{T} : String
unwk(::Type{Union{Missing,WeakRefString{T}}}, wk) where {T} = wk ? Union{Missing,WeakRefString{T}} : Union{Missing,String}

"Compute the Data.Schema of the resultset of executing Data.Query `q` against its source"
function schema(source::S, q::Query{code, columns, e, limit, offset}, wk=true) where {code, S, columns, e, limit, offset}
function schema(source::S, q::Query{c, columns, e, limit, offset}, wk=true) where {c, S, columns, e, limit, offset}
types = Tuple(unwk(T(col), wk) for col in columns.parameters if selected(col))
header = Tuple(String(name(col)) for col in columns.parameters if selected(col))
off = have(offset) ? offset : 0
rows = size(Data.schema(source), 1)
rows = have(limit) ? min(limit, rows - off) : rows - off
rows = (scalarfiltered(code) | grouped(code)) ? missing : rows
rows = (scalarfiltered(c) | grouped(c)) ? missing : rows
return Schema(types, header, rows)
end

Expand Down