Skip to content

Allow calling clojure.core functions in queries #424

@zoren

Description

@zoren

In Datomic:

(q
 '[:where
   [(ground {}) ?m]
   [(assoc ?m :x 5) ?m2]
   :find ?m2 .])

returns {:x 5}. But it fails in datascript with clojure.lang.ExceptionInfo: Unknown function 'assoc in [(assoc ?m :x 5) ?m2]

Should we allow all functions in clojure.core (except eval) in datascript as well?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions