datascript

Immutable database and Datalog query engine for Clojure, ClojureScript and JS
2019-10-07T21:52:06.043800Z

seems like the same issue there always is mapping lists to a relational model, and people do that all the time. I think I would abandon the vector, insert each part of the vector as a fact, and add some kind of join relation that tracks which list and what position in the list each item is in

Quest 2019-10-10T00:51:27.000300Z

I'm assuming you mean something like :modal/arg1, :modal/arg2, ... along with a :modal/numArgs? I can see how you'd reconstruct the arglist, though I'm not sure what :db/type you'd make the args in this case. (FYI I ended up just serializing the :arguments to a Transit string. Some perf loss but acceptable for my use case.)

2019-10-10T00:54:59.000500Z

Say n is some member of the vector, have facts like [n :vector/member-of somenameoridforvector] and [n :vector/index somenumber]

2019-10-10T00:55:23.000700Z

And then you can have whatever other facts you want to store the actual value whatever that is

2019-10-10T00:58:06.000900Z

This is classic data normalization from SQL databases https://stackoverflow.com/questions/3070384/how-to-store-a-list-in-a-column-of-a-database-table

👍 1