Liking cljdoc? Tell your friends :D

mamulengo.durable.local-storage-impl


bring-back-consistent-databasecljs

(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

clearcljs

(clear)
source

get-last-idcljs

(get-last-id table)
source

pos-opposite-statuscljs

(pos-opposite-status status list-statuses)
source

read-storagecljs

(read-storage table-name)

Read the local storage and spec the content to verify if anything anomalous is in there.

:table-name Name of the system table to be read from local storage.

Read the local storage and spec the content to verify if anything anomalous is in there.

:table-name    Name of the system table to be read from local storage.
sourceraw docstring

vec-removecljs

(vec-remove pos coll)

remove elem in coll

remove elem in coll
sourceraw docstring

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

× close