Add missing operators to list and add more error handling.
This commit is contained in:
parent
4a06ad489f
commit
5ff1fed578
|
@ -1,4 +1,4 @@
|
|||
(defproject views "0.4.8"
|
||||
(defproject views "0.4.9"
|
||||
:description "You underestimate the power of the SQL side"
|
||||
|
||||
:url "https://github.com/diligenceengine/views"
|
||||
|
|
|
@ -85,10 +85,15 @@
|
|||
|
||||
(defn- calculate-delete-deltas
|
||||
[db view-map]
|
||||
(->> (:delete-deltas-map view-map)
|
||||
hsql/format
|
||||
(j/query db)
|
||||
(assoc view-map :delete-deltas)))
|
||||
(try
|
||||
(->> (:delete-deltas-map view-map)
|
||||
hsql/format
|
||||
(j/query db)
|
||||
(assoc view-map :delete-deltas))
|
||||
(catch Exception e
|
||||
(error "computing delete deltas for" view-map)
|
||||
(log-exception e)
|
||||
(throw e))))
|
||||
|
||||
(defn compute-delete-deltas-for-insert
|
||||
"Computes and returns a sequence of delete deltas for a single view and insert."
|
||||
|
|
|
@ -7,8 +7,10 @@
|
|||
(def table-clauses
|
||||
[:from :insert-into :update :delete-from :join :left-join :right-join])
|
||||
|
||||
;; This list doesn't support custom operators. Is there something else we can do?
|
||||
(def pred-ops
|
||||
#{:= :< :> :<> :>= :<= :in :between :match :ltree-match :and :or :not=})
|
||||
#{:= :< :> :<> :>= :<= :in :between :match :ltree-match :and :or :not= :like :xor :regexp :not-in :not-like
|
||||
:!= :is :is-not})
|
||||
|
||||
(defn process-complex-clause
|
||||
[tables clause]
|
||||
|
|
Loading…
Reference in a new issue