-
Notifications
You must be signed in to change notification settings - Fork 927
Mila/count add api interface #6499
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
Conversation
|
@@ -17,6 +17,30 @@ export type AddPrefixToKeys<Prefix extends string, T extends Record<string, unkn | |||
[K in keyof T & string as `${Prefix}.${K}`]+?: T[K]; | |||
}; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto-updated file by API Extractor
import {DocumentData, Query, queryEqual} from './reference'; | ||
|
||
|
||
export class AggregateQuery<T = DocumentData>{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created class only, hasn't implement the internal methods
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1This report is too large (134,688 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.Test Logs |
query | ||
} from '../util/firebase_export'; | ||
import { apiDescribe, withTestCollection } from '../util/helpers'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both tests will fail as the count API internal logic is not implemented yet, and only returning 42 as dummy count.
This count query interface is implemented based on the COUNT Query API proposal.
Based on the demo provided:
countQuery
function will accept a collection or query referencecountQuery
will create aaggregateQuery
instance, and return it. (class AggregateQuery)getAggregateFromServerDirect
function will take aggregateQuery object, createAggregateQuerySnapshot
instance, and return a promiseAggregateQuerySnapshot
object hasgetCount
public method to access the document count