datascript

Immutable database and Datalog query engine for Clojure, ClojureScript and JS
richiardiandrea 2020-02-25T03:35:47.001Z

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

whilo 2020-02-25T05:40:28.002200Z

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

oconn 2020-02-25T11:41:30.005900Z

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

bartuka 2020-02-25T14:54:31.006800Z

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

🙂 1
richiardiandrea 2020-02-25T15:26:15.007200Z

@iagwanderson 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?

bartuka 2020-02-25T16:38:17.007400Z

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.