Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

117
Visualizações
Firestore - Am I charged for documents obtained without finishing reading their data?

Imagine you perform a query and retrieve 1000 docs from the database.

const querySnapshot = await query.get();

If I do not execute the .data() method of each doc to read their data, would it still be treated as 1000 reads?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Yes, the get() retrieves documents from Firestore and you'll be charged N reads where N is number of documents returned by your query. The .data() just returns the document's data in JSON format from the snapshots.

Do note that, just creating the query neither retrieves the data nor charges you anything.

// This is just a Query
const query = db.collection('').where(...); 


// QuerySnapshot - contains the documents matching your query.
// fetches from Firestore (unless you have any offline persistence)
const querySnapshot = await query.get();


// Array of objects - parsed from the querySnapshot
const data = querySnapshot.docs.map((d) => d.data())
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda