Firestore Document
The Firestore Document structure represents a raw Firestore document as a collection of named fields. Each field is stored as a typed FFirestoreValue, allowing documents to contain primitive values, arrays, and nested objects.
This structure is used internally by the Firestore API and can be accessed both from C++ and Blueprints.
The document fields themselves are shared between C++ and Blueprint workflows. However, the native setters and getters of this structure are intended for C++ usage only.
In Blueprint, all interactions with a Firestore Document must be performed through the Firestore Document Library, which provides the public and supported Blueprint interface.
FFirestoreDocument
This struct acts as a low-level container for Firestore document data. It stores document fields as a map of field names to Firestore values and provides native helper functions for accessing and modifying them in C++.
Blueprint users should not call these methods directly and must use the Blueprint wrapper functions instead.
Fields
| Field | Type | Description |
|---|---|---|
| Fields | TMap<FString, FFirestoreValue> |
Map containing all document fields. Each field value is represented by a FFirestoreValue. |
Setters (C++ Only)
These functions modify document fields directly and are intended for C++ usage only.
| Function | Parameters | Description |
|---|---|---|
| SetInt | Key, Value |
Sets an integer field. |
| SetBool | Key, Value |
Sets a boolean field. |
| SetDouble | Key, Value |
Sets a double field. |
| SetString | Key, Value |
Sets a string field. |
| SetObject | Key, Value |
Sets a nested object field represented as a map of values. |
| SetArray | Key, Value |
Sets an array field. |
| SetNull | Key |
Sets the field value to null. |
Getters (C++ Only)
These functions retrieve document field values directly and are intended for C++ usage only.
| Function | Returns | Description |
|---|---|---|
| GetInt | int32 |
Returns an integer field value. |
| GetBool | bool |
Returns a boolean field value. |
| GetDouble | double |
Returns a double field value. |
| GetString | FString |
Returns a string field value. |
| GetObject | TMap<FString, FFirestoreValue> |
Returns a nested object field. |
| GetArray | TArray<FFirestoreValue> |
Returns an array field. |
Helper Functions (C++ Only)
| Function | Returns | Description |
|---|---|---|
| HasField | bool |
Checks whether the document contains a field with the given key. |
| GetFieldType | EFirestoreValueType |
Returns the type of a field stored in the document. |
Blueprint Access
In Blueprint, this structure is manipulated exclusively through the Firestore Document Library. The Blueprint library internally operates on the same document data but exposes a safe and supported Blueprint API.
C++ users may choose to use either:
- the native methods of FFirestoreDocument, or
- the Blueprint library wrappers for consistency with Blueprint workflows.