asami

sb 2021-12-03T18:23:52.213Z

Is that possible drop the entity query drop after [?name :tg/contains ?h] line? My code is:

(map #(d/entity db-p6 %)
     (q '[:find [?h ...]
          :where [?full :p-id :user-id]
          [?full :p-tel ?name]
          [?name :tg/contains ?h]]
        db-p6))
; >> I get: ({..data..}{..data..}{..data..}) > that is ok 

sb 2021-12-03T18:24:11.213500Z

as eg. [?h :tg/entity ..?i don't know?..] or that isn’t possible?

quoll 2021-12-03T18:26:27.214Z

sorry, I’m not clear on what you’re asking?

sb 2021-12-03T18:28:43.214200Z

Sorry! I would like to get the data of the nodes without the first line ([:tg/node-59385] [:tg/node-59388] [:tg/node-59391]) is that possible add this at the end (:where part)?

quoll 2021-12-03T18:29:41.214400Z

Can you explain what you mean please? That line doesn’t exist in that query

quoll 2021-12-03T18:29:51.214600Z

And the query doesn’t return it

sb 2021-12-03T18:30:43.214800Z

(q '[:find [?h ...]
          :where [?full :p-id :user-id]
          [?full :p-tel ?name]
          [?name :tg/contains ?h]
          --> can I add here [?h :tg/entity or similar here?]
        db-p6))

quoll 2021-12-03T18:31:15.215Z

OK… I can see that might return (:tg/node-59385 :tg/node-59388 :tg/node-59391)

sb 2021-12-03T18:31:44.215300Z

Yes, this is what I get, therefore I added the first line. I’m new in datalog.. maybe my mistake

quoll 2021-12-03T18:31:53.215600Z

you can add that. It will ensure that the object in the collection are only entities

quoll 2021-12-03T18:32:03.215800Z

what are you looking for then?

sb 2021-12-03T18:37:08.216400Z

I’m thinking about. I read the spec and I’m back.

quoll 2021-12-03T18:46:29.216600Z

OK. Happy to help. I’m just trying to figure out what you’re looking for

sb 2021-12-03T18:47:19.216800Z

I do apologise, I queried a bad key… always 😞 🤯 That was my mistake! everything ok!

👍 1