Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

115
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda