nobrainer
nobrainer copied to clipboard
First class support for distinct?
This is easy enough to do in ReQL, just wondering if it's worth offering NoBrainer syntax for it:
NoBrainer.run { |r| r.table("model").distinct({"index" => "foo"})
Maybe something like:
Model.distinct(index: :foo)
hum.. dinstinct kinda break down the notion of objects mapped to documents. I'm not sure I can do an API that makes sense. distinct() kinda makes sense only when used with .raw() right?
Yeah, there wouldn't be any mapping, just returning a raw value (array). So more like Model.count().
Like I said, it's easy enough right now, so it's not a huge deal.
Shall we close this issue?