Why does limiting a query by 1 still return a list of documents? #8011
Unanswered
FXschwartz
asked this question in
Feature request
Replies: 1 comment
-
I don't think it's a good idea to have an API that returns a dynamic type.
Imagine that I have to do a type check everytime I use that call.
I would encapsulate that functionality in a mixin , and call it a day.
…On Thu, Feb 3, 2022, 8:45 PM Preston ***@***.***> wrote:
If I have a collection reference I am querying, and I limit it by 1, it
would be really nice if this returned a single document.
final licenseAgreements = (await reference.whereIsDefault(isEqualTo:
true).limit(1).get()).docs;
—
Reply to this email directly, view it on GitHub
<#8011>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB6SVIQRZSU2HUUPWKLPQ7LUZMVTLANCNFSM5NQQ4CEA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If I have a collection reference I am querying, and I limit it by 1, it would be really nice if this returned a single document.
final licenseAgreements = (await reference.whereIsDefault(isEqualTo: true).limit(1).get()).docs;
Beta Was this translation helpful? Give feedback.
All reactions