Add (currently unused) ability to generate CTEs.
This commit is contained in:
parent
f225dbe734
commit
a9b26f154a
2 changed files with 4 additions and 0 deletions
|
@ -65,6 +65,7 @@
|
|||
known-types ; {?var1 :db.type/integer}
|
||||
extracted-types ; {?var2 :datoms123.value_type_tag}
|
||||
wheres ; [[:= :datoms123.v 15]]
|
||||
ctes ; {:name {:select …}}
|
||||
])
|
||||
|
||||
(defn bind-column-to-var [cc variable table position]
|
||||
|
|
|
@ -255,6 +255,7 @@
|
|||
:extracted-types {}
|
||||
:external-bindings (or external-bindings {})
|
||||
:bindings {}
|
||||
:ctes {}
|
||||
:wheres []})
|
||||
patterns)))
|
||||
|
||||
|
@ -265,6 +266,8 @@
|
|||
[cc]
|
||||
(merge
|
||||
{:from (:from cc)}
|
||||
(when-not (empty? (:ctes cc))
|
||||
{:with (:ctes cc)})
|
||||
(when-not (empty? (:wheres cc))
|
||||
{:where (cons :and (:wheres cc))})))
|
||||
|
||||
|
|
Loading…
Reference in a new issue