Skip to content

Conversation

mattiuusitalo
Copy link

Adds option for doing SELECT DISTINCT and SELECT DISTINCT ON in fetch, see #45 for more details.

Here's the initial implementation idea. I'm a little bit hesitant because of the stuff in all-cols, which is like this in the test.

{:par2
 ["wit1.\"parent_id\""
  [:with-possible-duplicates/parent_id] ;; <- column key is inside a vector, why?
  {:category "N",
   :not-null? false,
   :has-default? false,
   :primary-key? false,
   :number 1,
   :name "parent_id",
   :type "int4",
   :enum? false,
   :type-specific-data -1}],
 :tag3
 ["wit1.\"tag\""
  [:with-possible-duplicates/tag]
  {:category "S",
   :not-null? false,
   :has-default? false,
   :primary-key? false,
   :number 2,
   :name "tag",
   :type "text",
   :enum? false,
   :type-specific-data -1}]}

Can I assume the column name will always be first element in that vector? Or should I translate the column list to look like :par2, :par3 instead of the column keys?

when false or omitted, does SELECT ALL
when true, does SELECT DISTINCT
when a sequence, does SELECT DISTINCT ON (columns in that sequence)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant