Simplify id-literal?, avoid some consing.
This commit is contained in:
parent
f63719d3de
commit
bd3a6d49f2
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