Flowdock
method

columns_for_distinct

Importance_1
columns_for_distinct(columns, orders) public

Given a set of columns and an ORDER BY clause, returns the columns for a SELECT DISTINCT. Both PostgreSQL and Oracle overrides this for custom DISTINCT syntax - they require the order columns appear in the SELECT.

columns_for_distinct("posts.id", ["posts.created_at desc"])
Show source
Register or log in to add new notes.