Probably silly question, but how do I avoid having to name attributes and just get all of them for each match? I'm schema-less for a reason ๐
Iโm sorry, I donโt follow what youโre asking for here
(d/q '[:find ?name ?adress :where [?m :name ?name] [?m :adress ?adress]] @asami-conn)Can I avoid listing all attributes and just "select *"? ๐
Is this for every ?m in the system?
Because it looks like you want:
(->> (d/q '[:find ?e ?a ?v :where [?e ?a ?v]] @asami-conn)
(reduce (fn [m [e a v]] (assoc-in m [a e] v)) {}))
Which would get you a map of the identifiers for all values of m, pointing to an attribute/value map. (this presumes single cardinality attributes)i.e. a result like:
{:peter {:name "Peter"
:address "123 Anywhere Ln"}
:mary {:name "Mary"
:age 18
:address "1600 Pennsylvania Ave NW"}}
Woop! Thanks, I'll meditate on this and figure out if I'm asking the wrong question. ๐