Simplify id-literal?, avoid some consing.
This commit is contained in:
parent
b4112bbe52
commit
587959d1ff
2 changed files with 4 additions and 2 deletions
|
@ -58,7 +58,7 @@
|
|||
(->TempId part idx)))
|
||||
|
||||
(defn id-literal? [x]
|
||||
(and (instance? TempId x)))
|
||||
(instance? TempId x))
|
||||
|
||||
(defprotocol IClock
|
||||
(now
|
||||
|
|
|
@ -284,7 +284,9 @@
|
|||
report
|
||||
|
||||
(and (not= op :db/add)
|
||||
(not (empty? (filter id-literal? [e a v]))))
|
||||
(or (id-literal? e)
|
||||
(id-literal? a)
|
||||
(id-literal? v)))
|
||||
(raise "id-literals are resolved for :db/add only"
|
||||
{:error :transact/syntax
|
||||
:op entity })
|
||||
|
|
Loading…
Reference in a new issue