This is a long planned small feature that I now need in a downstream app, and we are ready for, Datahike links that allow us to concisely refer to entities/values globally: https://github.com/replikativ/datahike/pull/852 I could keep it out of Datahike, but I think having a standardized link format for Datahike inside of Datahike makes more sense. I want to merge this in the next days, but feedback is welcome 🙂
dh://<db-id>/<attr>/<value>[@tx:<n>|@date:<iso>|@branch:<name>]
Format feels really intuitive to me, E->A->V + opts. I'm assuming all three components are always required, otherwise we'll just use the DB URL as a way to browse/query. Few questions that came top of mind to me:
• Should we enforce versioning from the beginning, e.g.
• Since we're leaning into URL encoding, the @ and : could be swapped for the more traditional params ? and &= . We could also borrow more https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Syntax over Clojure-y ones in general
Good point, yes these should be URLs by standard, no @ . I will fix this. Also the db should be addressable by commit-id as well, I think, not just time-stamp, but not sure. These are two different (but equivalent) ways to do time-travel and get as-of databases.
This is now merged with proper URL syntax.