From 032b94c4f4a99fa46daeb98f2aef4105fa8cc497 Mon Sep 17 00:00:00 2001 From: David Anthoff Date: Mon, 14 May 2018 13:24:10 -0700 Subject: [PATCH 1/2] Add a collect method for function sinks --- src/sinks/sink_type.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sinks/sink_type.jl b/src/sinks/sink_type.jl index dda9e16e..cb0cd24d 100644 --- a/src/sinks/sink_type.jl +++ b/src/sinks/sink_type.jl @@ -2,6 +2,10 @@ function collect{T}(enumerable::Enumerable, ::Type{T}) return T(enumerable) end +function collect(enumerable::Enumerable, f::Function) + return f(enumerable) +end + function collect{T, TS,Provider}(source::Queryable{TS,Provider}, ::Type{T}) collect(QueryOperators.query(collect(source)), T) end From 2b587734ff419dc5ad0ce883d0582079aa7ffe38 Mon Sep 17 00:00:00 2001 From: David Anthoff Date: Mon, 14 May 2018 15:31:36 -0700 Subject: [PATCH 2/2] Update NEWS --- NEWS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS.md b/NEWS.md index 273f30c1..8aa38a83 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +# Query.jl v0.9.3 Release Notes +* Add the ability to collect into a function from LINQ style queries + # Query.jl v0.9.2 Release Notes * Fix deprecation warning in IndexedTables tests