[x] Implement pulling :db/id, which means we can avoid using rel results in some cases. Rather than [:find [?person (pull ?person [:person/name])] …] we can do [:find [(pull ?person [:db/id :as :person/id :person/name]) ...] …] and handle the returned maps.
[x] Implement aliases.
[x] Allow for non-namespaced keywords in StructuredMap. This would allow :as :id instead of :as :something/id.
[x] Consider whether it's better to return TypedValue::Ref(12345) or {:db/id 12345} — the former is an advantage of our type system, and simplifies extraction of values, but the latter might be more regular when considering fetching more values, and is the way Datomic represents an entity in pull.
[ ] Single-step pull execution. A query like
[:find (pull ?x [:a/b :c/d]) :where …]
can be executed in a single SQL query. The in-progress implementation will take two.
[ ] Full prepared statement support. This probably looks like inserting the results of the prepared query into a temporary table, and running the pull from there. That makes both queries fixed and allows us to prepare both the 'front' and 'back' of the query.
:db/id
, which means we can avoid using rel results in some cases. Rather than[:find [?person (pull ?person [:person/name])] …]
we can do[:find [(pull ?person [:db/id :as :person/id :person/name]) ...] …]
and handle the returned maps.StructuredMap
. This would allow:as :id
instead of:as :something/id
.TypedValue::Ref(12345)
or{:db/id 12345}
— the former is an advantage of our type system, and simplifies extraction of values, but the latter might be more regular when considering fetching more values, and is the way Datomic represents an entity in pull.[ ] Single-step pull execution. A query like
can be executed in a single SQL query. The in-progress implementation will take two.