Always SELECT DISTINCT.
This commit is contained in:
parent
6b4f3cb396
commit
fbd8c0bfbb
1 changed files with 6 additions and 1 deletions
|
@ -23,7 +23,12 @@
|
||||||
|
|
||||||
(defn context->sql-clause [context]
|
(defn context->sql-clause [context]
|
||||||
(merge
|
(merge
|
||||||
{:select (projection/sql-projection context)}
|
{:select (projection/sql-projection context)
|
||||||
|
|
||||||
|
;; Always SELECT DISTINCT, because Datalog is set-based.
|
||||||
|
;; TODO: determine from schema analysis whether we can avoid
|
||||||
|
;; the need to do this.
|
||||||
|
:modifiers [:distinct]}
|
||||||
(clauses/cc->partial-subquery (:cc context))))
|
(clauses/cc->partial-subquery (:cc context))))
|
||||||
|
|
||||||
(defn context->sql-string [context]
|
(defn context->sql-string [context]
|
||||||
|
|
Loading…
Reference in a new issue