Skip to content

Commit

Permalink
docs: remove wrapped region tags (#1524)
Browse files Browse the repository at this point in the history
Remove region tags that are unused in docs. New tags are already proliferated into docs with firestore prefix.
  • Loading branch information
Strykrol committed Oct 7, 2022
1 parent 973a199 commit 80cfca9
Showing 1 changed file with 0 additions and 6 deletions.
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

0 comments on commit 80cfca9

Please sign in to comment.