datalevin

wvdlaan 2024-10-14T19:39:20.602319Z

Hello all, I just started with datalevin (0.9.12) and am trying to store additional info with transactions, like e.g. user-id and timestamp. The first problem I have is that all transactions are using the same :tx value as shown in this example:

(def conn (dl/get-conn "foo" {:name {:db/valueType :db.type/string}}))
(dl/transact! conn [{:db/id -1 :name "bar"}])
(dl/transact! conn [{:db/id -1 :name "baz"}])
(map :tx (dl/datoms @conn :eav)) ;;=> (1 1)
Also, I get an exception when using :tx in a query like this:
(dl/q '[:find ?e ?v ?t :where [?e :name ?v ?t]] @conn)
Any ideas on how :tx should be used? Thanks. Walter

Huahai 2024-10-14T21:12:04.434879Z

:tx is not used in Datalevin, we do not store it and does not manage it. Whatever data you want to add, add them as transaction data.