Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

query_result() returns deleted entries #2190

Open
ddd-mtl opened this issue May 14, 2020 · 0 comments
Open

query_result() returns deleted entries #2190

ddd-mtl opened this issue May 14, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@ddd-mtl
Copy link
Contributor

ddd-mtl commented May 14, 2020

After creating and deleting an entry, query_result() will return that entry.
There is no way to find out the state of the entry. I currently call get_entry() on each returned result to check if it still exists which is not very optimal.
Maybe add an argument so we can specify that we don't want deleted entries?

Code I used:

    let query_names = QueryList([entry_kind::InMail.to_owned(), entry_kind::OutMail.to_owned()].to_vec());
    let query_args = QueryArgsOptions {
        start: 0,
        limit: 0,
        headers: true,
        entries: true,
    };
    let maybe_query_result = hdk::query_result(query_names, query_args);
@ddd-mtl ddd-mtl added the bug Something isn't working label May 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant