The \'Embedded\' section of the Datomic Queries and Rules document says:
Query languages like SQL are oriented around a client-server model where, in a
I haven't tested it, but if I remember correctly you can just put a variable as the attribute name
(datomic.api/q '[:find ?key ?value :where [?e ?key ?value]] (db conn))