Skip to content

Commit

Permalink
Clone when calling distinct
Browse files Browse the repository at this point in the history
  • Loading branch information
bnjamin committed Sep 8, 2020
1 parent b1ac5ab commit 10446b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/avram/queryable.cr
Expand Up @@ -46,6 +46,10 @@ module Avram::Queryable(T)
end

def distinct : self
clone.distinct!
end

protected def distinct! : self
query.distinct
self
end
Expand Down

0 comments on commit 10446b9

Please sign in to comment.