asami

cjsauer 2021-10-27T16:37:49.070100Z

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])))

quoll 2021-10-27T16:38:09.070300Z

Efficient? No

quoll 2021-10-27T16:38:19.070600Z

That’s as fast as I could possibly extract them

quoll 2021-10-27T16:38:28.070900Z

Oh, that’s not my function

cjsauer 2021-10-27T16:38:38.071200Z

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

quoll 2021-10-27T16:39:25.071600Z

asami.core/export-data

cjsauer 2021-10-27T16:39:50.071800Z

Oh nice!

cjsauer 2021-10-27T16:40:04.072100Z

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

cjsauer 2021-10-27T16:40:07.072300Z

Thank you

quoll 2021-10-27T17:02:05.073100Z

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 😜

cjsauer 2021-10-27T17:17:56.073600Z

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

quoll 2021-10-27T17:19:18.073800Z

most experiments are 🙂

🧪 1