datascript

Immutable database and Datalog query engine for Clojure, ClojureScript and JS
magra 2020-03-05T10:37:15.017200Z

Have you considered namespacing the keys.

:twitter.person/id vs. :my-ns.person/id

magra 2020-03-05T10:38:06.017700Z

Wilker Lucio has talked about something that might be related in his pathom talks.

magra 2020-03-05T10:40:33.018300Z

He talks about having/joining data sources.

lilactown 2020-03-05T15:45:38.018800Z

@magra I don’t understand what you’re saying about namespacing. yes they are namespaced. how does that help?

lilactown 2020-03-05T15:46:25.019800Z

pathom is specifically built to solve basically this problem. I’m wondering if I could also have the power of a full datalog, while being able to ascertain which keys to resolve to which data source

lilactown 2020-03-05T15:46:58.020300Z

I think I see what you mean. I’m not worried about different instances of person/id

lilactown 2020-03-05T15:47:23.020900Z

I’m worried about if there’s some way to write a query where a namespaced keyword would be depended on, but not show up in the query at all

magra 2020-03-05T15:56:58.023700Z

I am not sure I understand what you are trying to achieve. I sounds to me like a sort of "routing" to databases. I use pathom on top of two datahike dbs, one 'normal' db and a second db with legacy-data. I am not at all suggesting pathom is for you, just that the talks might yield ideas how to tackle your goal. I am just guessing here.

lilactown 2020-03-05T16:04:22.024400Z

you are correct in what I am trying to achieve. I am asking about specific behavior about datalog. This answered my question in another channel: https://clojurians.slack.com/archives/C03RZMDSH/p1583387062240800?thread_ts=1583366406.238900&cid=C03RZMDSH

lilactown 2020-03-05T16:04:54.025Z

so I cannot statically analyze an arbitrary datalog query and know all of the attributes it depends on