-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
How to accomplish a (full) outer join? #278
Comments
Datascript has a different model of where the schema is kept, but this should be translatable. |
You can always pass your own fn to the query:
There are also I guess it really depends on your task, but what exactly are you trying to accomplish? |
I'm basically looking at ways to do a full outer join in the traditional sense.. For example given "widgets":
and "gadgets":
I'm trying to investigate if it would be possible to produce a full outer join (say on
If that makes sense? |
The thing about datomic and datascript is that you often can create two queries on the exact same dereffed db, then merge the two result sets, either by a third query or some other means. In this particular example, I would create two result-sets for id:s, make a union of them and then do pull in a query to get the outer join. Like:
|
This worked for me
Unfortunately |
Hi there,
I am trying to evaluate if Datascript is the right tool for a problem I'm trying to solve.. and I was wondering how I might accomplish a (full) outer join or equivalent.
For Datomic I found the following article, which mentions two approaches (entity navigation or extension function), and I was wondering if either of these would work with Datascript:
https://support.cognitect.com/hc/en-us/articles/215581518-Outer-Joins
For example, regarding the extension function approach, I didn't find any reference to a
maybe
function in the Datascript api.Thanks!
The text was updated successfully, but these errors were encountered: