Fork me on GitHub
#asami
<
2021-10-27
>
cjsauer16:10:49

Is there a more efficient way to get all the datoms out of a database than this?

(defn db-datoms
  [db]
  (let [graph (d/graph db)]
    (node/find-triple graph '[?e ?a ?v])))

quoll16:10:09

Efficient? No

quoll16:10:19

That’s as fast as I could possibly extract them

quoll16:10:28

Oh, that’s not my function

cjsauer16:10:38

Okay just checking. It doesn’t have to be too crazy fast because I only have to do it once on load.

quoll16:10:25

asami.core/export-data

cjsauer16:10:04

I was grep’ing for something with “datoms” in the name and missed that one.

quoll17:10:05

To be honest, I don’t really use datoms. I just provide them in some APIs because I’m trying to make Asami look like Datomic 😜

cjsauer17:10:56

I may not either…I’m experimenting with something with a 99% chance of being thrown away hehe

quoll17:10:18

most experiments are 🙂

🧪 1