precept icon indicating copy to clipboard operation
precept copied to clipboard

Rename transaction id to fact id

Open alex-dixon opened this issue 7 years ago • 2 comments

Currently we are not assigning ids to facts based upon the group that they are inserted into the session with. In other words, if we insert 100 facts into a session, each fact will have a separate id. Because this is more useful to us than a transaction id for the foreseeable future, we should rename all instances of t tx-id etc. to fact-id and reintroduce the concept of assigning ids to transactions when the need arises.

alex-dixon avatar May 01 '17 00:05 alex-dixon

I have a use case where we very much want transaction ids and the ability to annotate transaction entities with metadata about the provenance of a transaction. This will allow us to both note what sources were used in a particular derivation of facts as well as to be able to provide helpful error reporting in the case of conflicting or invalid facts. Ideally, we'd like a behavior that matches Datomic's ability to treat transactions as entities themselves. Our use case has nothing to do with keeping database history, only the provenance of the current set of facts in the working memory.

I'd like to discuss what the options are and would be happy to help with the implementation.

Thanks!

abrooks avatar Oct 09 '18 15:10 abrooks

@abrooks Very cool! Sounds similar to ideas @mikegai and I have been interested in previously.

I'd like to discuss what the options are and would be happy to help with the implementation.

That'd be great! I want to make sure I'm not assuming too much about what you have in mind. Can you tell us more about your specific use case? What specific problem or problems are you looking to solve? How you might envision implementing it in the current codebase? What might the public API look like? Any information you could provide along these lines would be welcome and helpful. Thanks!

alex-dixon avatar Oct 09 '18 19:10 alex-dixon