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

Commit

Permalink
Fix name clash between code type parameter and code type extractor fu…
Browse files Browse the repository at this point in the history
…nction. (#88)
  • Loading branch information
blakeriley authored and quinnj committed Oct 10, 2018
1 parent 47e7ba2 commit 9a3e8f4
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 9a3e8f4

Please sign in to comment.