Liking cljdoc? Tell your friends :D

mamulengo.utils


bring-back-consistent-databaseclj/s

(bring-back-consistent-database datoms)

There is a problem when some datoms has been added and retracted from different databases across time.

This function manages to bring back consistency to the loaded database by removing datoms that cancel each other The following example was happening and it should not!:

(ds/conn-from-datoms [#datascript/Datom [1 :maker/name 'BMW' 536870913 true] #datascript/Datom [1 :maker/name 'BMW' 536870914 false]]) #datascript/DB{:datoms [[1 :maker/name BMW 536870913] [1 :maker/name BMW 536870914]]}

The correct answer here is none. The datascript/DB should be empty after loading those datoms.

There is a problem when some datoms has been added and retracted from different databases across time.

This function manages to bring back consistency to the loaded database by removing datoms that cancel each other
The following example was happening and it should not!:

(ds/conn-from-datoms [#datascript/Datom [1 :maker/name 'BMW' 536870913 true]
                      #datascript/Datom [1 :maker/name 'BMW' 536870914 false]])
#datascript/DB{:datoms [[1 :maker/name BMW 536870913] [1 :maker/name BMW 536870914]]}

The correct answer here is none. The datascript/DB should be empty after loading those datoms.
sourceraw docstring

check-state!clj/s

(check-state!)
source

sql-datoms-formattingclj

(sql-datoms-formatting sql-conf sql-query)
source

try-returnclj/smacro

(try-return & body)

Executes body and returns exception as value

Executes body and returns exception as value
source (clj)source (cljs)raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close