Fork me on GitHub

Does retracting an entity which has {:db/noHistory true} also result in excising that entity from the database?


I read the part that says there are no guarantees about how much is removed (it could have more than it should seem to) but it also says the purpose of noHistory is to reduce storage usage, which seems to suggest that it would be a reasonable optimization.


@sdegutis: it’s not really equivalent to excision :db/noHistory is really just a performance hint that goes into effect with indexing. And :db/noHistory is on an attribute, not an entity. Entities are just projected from all facts about them, but an entity with only :db/noHistory attributes with all facts retracted could result in no facts for that entity in history.


@bkamphaus: Right, and no facts about an entity throughout history is really not much different than having never existed in histoyr.


The query docs ( don't mention that < and > can compare two :db.type/instant values. Is this undefined behavior that just happens to work? I'm pretty sure it's not allowed in plain Clojure, so it must be a Datomic-specific feature.


i quite like clojure, but i also wanna get back to elixir and phoenix for my BE.. but i also cant live without datomic anymore πŸ˜› is there a way to write a peer lib for other langs without using REST api? http is so slow...


or it all ends up to get java interop first, then use java peer lib


i cant look into the source to see how peer caching actually works 😞 im also not that senior to understand if it would make sense to have the lookup caching abstracted away with common things like redis or co, so it eventually could be easier to implement peer libs in other langs, just would be awesome if you could use datomic to full potential in every language!


silly me, i found how to look into source


its java (puke)


AFAIK, at present, a peer library has to be implemented by Cognitect. The wire protocol is not public, and reverse engineering would violate the license.


for one solution, you could look at (not used, just aware of)


@peterromfeld: there's always the REST API


is there a shorthand to retract all values for an attribute?


@peterromfeld: I too have been spending a bit of time with Phoenix and wishing I could back it with Datomic. Doubtful it's high on anyone's list of priorities, but an Erlang peer lib would probably be a pretty huge deal if it ever happened.


We definitely are considering the requests to open up peer lib/full client capabilities to other languages, but no specific plans to share at this time.


if we're voting, +1 for erlang peer lib