datalog

2026-02-28T00:55:58.042639Z

is there a way to query all datoms that share a namespace?

Joe Lane 2026-02-28T02:01:09.643639Z

How big is your database?

2026-02-28T03:43:51.353109Z

right now? like 400 datoms.

2026-02-28T03:44:41.515789Z

but i'm interested in the general question, i know how to do this in sql (select * from table;) but not in datalog

maybenot 2026-02-28T03:48:03.733179Z

okwori 2026-02-28T04:33:38.865529Z

Do you mean without providing the meta data (eg :https://clojurians.slack.com/archives/C03RZMDSH/p1765163594157179?thread_ts=1765153757.922309&cid=C03RZMDSH) within transactions in that namespace as at transaction time?

2026-02-28T11:59:41.136329Z

i'm using datalevin at the moment and haven't done any schema construction yet

🆗 1
okwori 2026-02-28T04:38:45.924809Z

That is particularly helpful if you cannot guarantee strict naming convention with schema over time, otherwise maybe a full scan, eg: (all :student/... attr)

(d/q '[:find ?e ?a ?v ?t
       :where
       [?e ?a ?v ?t]
       [?a :db/ident ?ident]
       [(namespace ?ident) ?ns]
       [(= ?ns "student")]]
     (d/db conn))

👍 1
2026-02-28T11:59:51.384939Z

this looks good, thank you