What data types does Firestore support?
Answer
Firestore supports the following data types: (1) String — UTF-8 encoded text; (2) Integer — 64-bit signed integer; (3) Floating point — 64-bit IEEE 754 double-precision; (4) Boolean — true or false; (5) Timestamp — date and time (Firestore Timestamp object, not JavaScript Date); (6) Null; (7) Bytes — raw binary data (up to 1MB); (8) Geopoint — latitude/longitude pair; (9) Document Reference — a pointer to another Firestore document; (10) Array — ordered list of values; (11) Map — key-value pairs (nested objects). Arrays in Firestore have limitations: you can't query for documents where an array contains a specific value using standard queries without array-contains operator; arrays can't have array elements. Maps enable nested data structures. Firestore sorts data by type in a specific order for ordering queries: null, boolean, number, timestamp, string, bytes, reference, geopoint, array, map.