Fork me on GitHub
#crux
<
2020-03-02
>
vsined07:03:20

I'm using namespaced ids, and I'm trying to use a predicate to return all the ids from a particular namespace (such as :person/...). But this query returns nothing: '{:find [id] :where [[e :crux.db/id id] [(= (namespace id) "person")]]}

ordnungswidrig07:03:27

Even if this worked, I think crux could not make use of any index.

✔️ 1
vsined08:03:21

What's the recommended way of getting all docs in the same namespace?

ordnungswidrig14:03:24

I would add this as a key to the document e.g. {:foo/ns :person}

👍 1
1
ordnungswidrig14:03:57

This would also allow you to more types as the actual id value e.g. UUIDs.