-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moebius.DocumentQuery return only one entry? #98
Comments
I think you should be able to tack on db(:my_db)
|> search(for: "/users/accounts", in: [:name])
|> sort(:id, :desc)
|> Polo.Db.first This is missing from the docs... which I really need to update. |
Thanks for the speedy reply! Looks like it doesn't work:
Also, it looks like the Oh well! :) Thanks anyway, maybe I can figure out a workaround that doesn't involve returning all entries of a given key and sorting it after the fact... Ideally, what I'd want is a
I would imagine this would be a useful thing to have! Best, |
Sorry for the delay on this for some reason I wasn't notified of your response :(. Yes, definitely useful and I don't have time to dig in currently but would welcome any help! |
Not sure if this is a bug or a feature request, but I'm wondering how to return a single entry. For example, I have a series of entries that are similar but just have different ids and "created_at" fields (e.g. like a log file). I only want to get the most recent one. I thought it would work like this:
but this returns all entries that match "/users/accounts".
When I inserted it, I used:
Any help is most appreciated!
The text was updated successfully, but these errors were encountered: