-
-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Heterogenous tuples with :db/tupleTypes supporting :db.type/refs #364
Comments
Interesting! I haven’t thought about it. Yes this makes sense, thank you! |
Would be interested in this exact use case: storing a tuple |
I wouldn’t mind it. Care to provide a PR? |
Hey, I'm back to thinking about this. I'm no longer sure tuples are the best approach, so I would appreciate if you could provide some clarity. My use case can be described in Clojure data as
My queries would target all combinations, e.g. querying for entities matching Currently I use an intermediary entity, e.g:
Which has the obvious downside of polluting indexes, but is nicely used in queries. Alternative would be to store many 4-tuples |
Well it’s either all possible tuples or hash-join using queries. I’d probably prefer tuples |
I'd love to take a crack at this feature. Do you have any guidance as to how you would go about it, and/or any tips on understanding and navigating the code base? |
@seepel that would be fantastic! I don’t have many tips, but I’d probably start by listing all the places where having refs in tuples would make a difference (transact, query, pull, entity), then writing tests for each and finally finding the best place to implement the logic. Happy to accept partial PRs! |
That sounds like some solid advice, thank you! I’ll admit, I started by greping for |
In datomic there is a way to combine data as
I understand the
types
are more friendly in js but is there a way to support ref resolution?hacking around for this will make code less clean.
The text was updated successfully, but these errors were encountered: