-
Notifications
You must be signed in to change notification settings - Fork 277
Add pipeline snippets for web and nodejs #404
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
base: master
Are you sure you want to change the base?
Conversation
MarkDuckworth
left a comment
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.
I did not finish the review, but here is some high level feedback that needs to be addressed. Some across all samples.
MarkDuckworth
left a comment
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.
Approved with comments. There are a few remaining errors and a few nits I commented on.
| field("tags").arrayConcat([ | ||
| field("pages").greaterThan(100) | ||
| .conditional(constant("longRead"), constant("shortRead")) | ||
| ]).as("extendedTags") |
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.
I like this example!
| } | ||
|
|
||
| async function strSplitFunction() { | ||
| // not yet supported until GA |
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.
it is supported now
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.
in SDKs
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.
I wasn't able to find this method after updating both the web and iOS SDKs. I haven't checked the other ones yet.
Add missing START/END for ends_with
* add admin snippets temporarily * write node snippets * run snippets
d5bdfca to
ca4024e
Compare
| // old snippets | ||
|
|
||
| async function basicRead() { | ||
| // [START basic_read] |
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.
Seems like we can just add
// The import/require of 'firebase/firestore/pipelines' has a side effect
// of extending the Firestore class with the `.pipeline()` method.
// Without this import/require, you will not be able to create a Pipeline
const { execute } = require("firebase/firestore/pipelines");
And that will generate the expected snippet with import in snippets/firestore-next/...
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.
Done, though I commented out the import to prevent a CI failure.
No description provided.