Skip to content
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

docs: remove wrapped region tags #1524

Merged
merged 19 commits into from Oct 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 0 additions & 6 deletions samples/solution-counters.js
Expand Up @@ -16,17 +16,14 @@
const {Firestore, FieldValue} = require('@google-cloud/firestore');

async function main() {
// [START increment_counter]
// [START firestore_solution_sharded_counter_increment]
function incrementCounter(docRef, numShards) {
const shardId = Math.floor(Math.random() * numShards);
const shardRef = docRef.collection('shards').doc(shardId.toString());
return shardRef.set({count: FieldValue.increment(1)}, {merge: true});
}
// [END firestore_solution_sharded_counter_increment]
// [END increment_counter]

// [START get_count]
// [START firestore_solution_sharded_counter_get]
async function getCount(docRef) {
const querySnapshot = await docRef.collection('shards').get();
Expand All @@ -39,9 +36,7 @@ async function main() {
return count;
}
// [END firestore_solution_sharded_counter_get]
// [END get_count]

// [START delete_Docs]
// [START firestore_data_delete_doc]
async function deleteDocs(docRef) {
const shardsCollectionRef = docRef.collection('shards');
Expand All @@ -53,7 +48,6 @@ async function main() {
return Promise.all(promises);
}
// [END firestore_data_delete_doc]
// [END delete_Docs]

// Create a new client
const firestore = new Firestore();
Expand Down