437 questions
3 votes
0 answers
129 views
Fast lazy sort & deduplication over multiple sorted lazy sequences in Clojure
I implemented a few lazy sort & merge functions that are used heavily in my ReBAC authorization library, EACL, to lazily "merge" & deduplicate ~1M datoms emitted from Datomic's d/...
1 vote
1 answer
90 views
What's the purpose of a datomic multiple head rule? What's the difference between those kind of rules and a or-clause query?
I'm studying Datomic and I got stuck in Multiple Head Rules. In Datomic Documentation, it's said that a Multiple Head Rule is a rule that has multiple "heads" and each head has a different ...
1 vote
1 answer
91 views
Using lazy-seq with Datomic Query Results: Is this the right approach?
I'm working with Datomic and need to process a large result set from a query. I want to make the processing lazy to handle the large output efficiently. Here's my current approach: (let [normalized-...
0 votes
0 answers
47 views
How to debug 'Ion execution failed' error in Datomic Ion HTTP endpoint?
I'm setting up a Datomic Ions system and encountering an error when trying to access the HTTP direct endpoint. Here's my current setup: Successfully established client and connection Completed push ...
1 vote
1 answer
85 views
Cannot transact data to my datomic database
I am using the Datomic client api com.datomic/local {:mvn/version "1.0.285"} and clojure version org.clojure/clojure {:mvn/version "1.11.1"} i am importing like this [datomic....
1 vote
1 answer
67 views
Datomic and Paramaterized :where clauses
I have this: (defn entities [entity-map] (db/q '[:find [(pull ?e pattern) ...] :in $ pattern ?primary-field :where [?e ?primary-field]] (:pattern entity-map) (:primary entity-...
0 votes
1 answer
118 views
Aggregate multiple card-many attributes
With the following data [ [:db/add #db/id[db.part/user -1] :Ns/i 0] [:db/add #db/id[db.part/user -1] :Ns/ii 1] [:db/add #db/id[db.part/user -1] :Ns/ii 2] [:db/add #db/id[db.part/user -1] :Ns/...
0 votes
1 answer
116 views
Datomic/Datascript/Datalog: How can I check predicate is valid for all edges?
I am working with a fairly straightforward To-Do database. It has a hierarchical tree-like structure. Each entity is a block; every block as a children attribute for all its children, and a checked ...
3 votes
0 answers
66 views
datalevin function expression re-binds variable
I am using Datalevin 0.8.16 as a database for my application. I have inserted some data: (datalevin.core/transact! conn [{:hello "some value" :data {:k "other value"}}]) ...
1 vote
0 answers
50 views
Find entities that not have a value in properties
Think about this problem, I have a database with people and his friends: ['Bart" :person/friend "Milhouse"] ['Bart" :person/friend "Homer"] ['Homer" :person/friend &...
0 votes
2 answers
167 views
Slow query using `pull` (datahike) to retrieve attributes on 400 entities
I am using Datahike 0.6.1531 (not Datomic) on the JVM. I have a list of book titles to display in a web app. If the book is "notable", I do something special, like apply a background-color ...
3 votes
1 answer
99 views
Why do values of :db.type/uri return as com.cognitect.transit.impl.URIImpl?
I'm working with Datomic Cloud and I noticed the following scenario, whenever I transact a fact that is of the java.net.URI type and try to query it back I get com.cognitect.transit.impl.URIImpl back ...
0 votes
1 answer
85 views
Working on nested vector of vectors - Clojure
(def order-info-query (->> (d/q '[:find ?si ?ia ?os ?p :where [?e :proposal/id _] [?e :proposal/supplier-id ?s] [?e :proposal/item-amount ?...
-1 votes
1 answer
158 views
Adding entities and 1:M references in Datomic
I have a situation where I have an entity A with a cardinality:many ref to an entity B. A is already transacted to the database. I'm looking for the most efficient way to add entity B and add it to ...
1 vote
1 answer
113 views
Datomic query on UUID field not returning expected result
I'm persisting an entity to Datomic, and I can pull it back out as expected. The entity has a unique UUID field :student/id, and if I try to query with a match on that field's value, I'm not getting ...