Fork me on GitHub
#datascript
<
2020-02-25
>
richiardiandrea03:02:47

Hi there, it looks like Datascript does not provide d/history and d/search yet - can anybody confirm it please?

whilo05:02:28

No, we had to add history support to Datahike because it is not in DataScript yet. Do you mean fulltext search with d/search ?

oconn11:02:30

Is there a plan to add history as an option? The Readme makes a pretty good case for not supporting it generally (memory constraints). https://github.com/tonsky/datascript/blob/master/README.md#differences-from-datomic

bartuka14:02:31

I just merged a PR with support to history and I am bumping the version to clojars to include that. [Done =)]

🙂 4
richiardiandrea15:02:15

@UBSREKQ5Q I don't know anything about this, but do you need durable persistence for that feature? In other words, could it be implemented in Datascript as it is today?

bartuka16:02:17

I think this is not possible. If you have a :db/unique :db.unique/identity field, the current database of datascript will make an "upsert" if you try to save a new datom and you cannot access the old value anymore. Also, the transactions does not return a timestamp of when it happened. These two are basically what was added to mamulengo. You can use it on memory on the backend side with H2 and the persistence will be happening in memory.