Clojurescript in :view takes over Datalog’s output, and Datalog outputs its own thing, it doesn’t try to satisfy our assumptions. I cannot answer beyond that.
There’s an assumption that the :find outputs a tuple. But this is not what happens.
I cannot speak to why this doesn’t happen, but that has probably to do with the implementation Logseq uses.
So instead you just get a list of values for your result.
Consider my test:
Now there are actually 3 results. Same can be achieved with :keys as mentioned by @mentaloid .
That just leaves me with the question of… why?
Why would you want to retrieve this information in the first place? It shouldn’t be something users are otherwise concerned with.
I need to be able to ask questions to the database and get answers
As the database schema provided doesn’t tell me almost anything
Because it’s very brief
Because I’m not a Clojure geek to see through
So I need to start with something. I don’t feel comfortable with monkey-editing requests I don’t understand scattered here and there. I’m still trying to find a ground to start with.
Thanks to your help folks, this process is evolving. Otherwise I would have dropped it, because honestly - it looks like a geek tool for Clojure geeks.
I really hope I will come up with a working system soon and before I give up
Now I see! Well, I was getting the same results but I thought that the reason was the view-function used by default. But now I understand it’s how results provided by :find. Thanks!
And as for keys, I see now the reason as well. Cool.