|
LuxChat
2.0
Instant messenger for iOS
|
#import <FIRDataSnapshot.h>
Instance Methods | |
Navigating and inspecting a snapshot | |
| (FIRDataSnapshot *) | - childSnapshotForPath: |
| (BOOL) | - hasChild: |
| (BOOL) | - hasChildren |
| (BOOL) | - exists |
Data export | |
| (id __nullable) | - valueInExportFormat |
Properties | |
Properties | |
| id | value |
| NSUInteger | childrenCount |
| FIRDatabaseReference * | ref |
| NSString * | key |
| NSEnumerator * | children |
| id | priority |
A FIRDataSnapshot contains data from a Firebase Database location. Any time you read Firebase data, you receive the data as a FIRDataSnapshot.
FIRDataSnapshots are passed to the blocks you attach with observeEventType:withBlock: or observeSingleEvent:withBlock:. They are efficiently-generated immutable copies of the data at a Firebase Database location. They can't be modified and will never change. To modify data at a location, use a FIRDatabaseReference (e.g. with setValue:).
| - (FIRDataSnapshot *) childSnapshotForPath: | (NSString *) | childPathString |
Gets a FIRDataSnapshot for the location at the specified relative path. The relative path can either be a simple child key (e.g. 'fred') or a deeper slash-separated path (e.g. 'fred/name/first'). If the child location has no data, an empty FIRDataSnapshot is returned.
| childPathString | A relative path to the location of child data. |
| - (BOOL) exists |
Return YES if the DataSnapshot contains a non-null value.
| - (BOOL) hasChild: | (NSString *) | childPathString |
Return YES if the specified child exists.
| childPathString | A relative path to the location of a potential child. |
| - (BOOL) hasChildren |
Return YES if the DataSnapshot has any children.
| - (id __nullable) valueInExportFormat |
Returns the raw value at this location, coupled with any metadata, such as priority.
Priorities, where they exist, are accessible under the ".priority" key in instances of NSDictionary. For leaf locations with priorities, the value will be under the ".value" key.
|
readnonatomicstrong |
An iterator for snapshots of the child nodes in this snapshot. You can use the native for..in syntax:
for (FIRDataSnapshot* child in snapshot.children) { ... }
|
readnonatomicassign |
Gets the number of children for this DataSnapshot.
|
readnonatomicstrong |
The key of the location that generated this FIRDataSnapshot.
|
readnonatomicstrong |
The priority of the data in this FIRDataSnapshot.
|
readnonatomicstrong |
Gets a FIRDatabaseReference for the location that this data came from
|
readnonatomicstrong |
Returns the contents of this data snapshot as native types.
Data types returned:
1.8.9.1