datalevin

DerTev 2024-08-13T11:36:40.680149Z

Is there a way to get an entitie by its id? This does not seem to work:

[:find (pull ?e [*])
                :in $ ?id
                :where
                [?e :db/id ?id]]

Huahai 2024-08-13T12:09:03.025599Z

:db/id is not an attribute. ?e is already entity id in your query.

Huahai 2024-08-13T12:15:02.375579Z

You don't need a query for this, just pull directly, e.g.

Huahai 2024-08-13T12:17:45.201549Z

(pull db '[*] 1234) where 1234 is the entity id

DerTev 2024-08-13T13:26:11.979149Z

Ok, thanks