Code interpreter, including functions and macros useful for command line and query/transaction functions.
Code interpreter, including functions and macros useful for command line and query/transaction functions.
(definterfn fn-name args & body)
Create a named inter-fn
Create a named `inter-fn`
(exec-code code)
Execute code and print results. code
is a string. Acceptable code includes
Datalevin functions and some Clojure core functions.
Execute code and print results. `code` is a string. Acceptable code includes Datalevin functions and some Clojure core functions.
(inter-fn args & body)
Same signature as fn
. Create a function that can be serialized in
source code form.
Such a function can be used as an input in Datalevin queries or transactions, e.g. as a filtering predicate or as a transaction function, and be stored in the database. This function can also be sent over the wire if the database is on a remote server or as a babashka pod. It runs in an interpreter.
Symbols referred in inter-fn needs to be fully-qualified.
Same signature as `fn`. Create a function that can be serialized in source code form. Such a function can be used as an input in Datalevin queries or transactions, e.g. as a filtering predicate or as a transaction function, and be stored in the database. This function can also be sent over the wire if the database is on a remote server or as a babashka pod. It runs in an interpreter. Symbols referred in inter-fn needs to be fully-qualified.
(inter-fn-from-reader x)
Read a printed inter-fn
back in.
Read a printed `inter-fn` back in.
(inter-fn? x)
Return true if x
is an inter-fn
Return true if `x` is an `inter-fn`
(load-edn f)
Same as clojure.core/load-file
,
useful for e.g. loading schema from a file
Same as [`clojure.core/load-file`](https://clojuredocs.org/clojure.core/load-file), useful for e.g. loading schema from a file
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close