aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/Public
diff options
context:
space:
mode:
authorGravatar Sebastian Schmidt <mrschmidt@google.com>2017-12-12 08:03:59 +0800
committerGravatar Sebastian Schmidt <mrschmidt@google.com>2017-12-12 08:03:59 +0800
commite019a9461ad834bfe42962e4e2dc8fe60d7a25b5 (patch)
tree2f94d2a2b4094a0f763696a2a7dd6a48dcf6b310 /Firestore/Source/Public
parent5b1ca51e7264b5ac581c7a0382beb44ed65bdf14 (diff)
parentc73770cac8c959d95579e0701791e272cb45ce89 (diff)
Merge branch 'firestore-api-changes' into mrschmidt-timestamps
Diffstat (limited to 'Firestore/Source/Public')
-rw-r--r--Firestore/Source/Public/FIRDocumentReference.h2
-rw-r--r--Firestore/Source/Public/FIRQuery.h13
-rw-r--r--Firestore/Source/Public/FIRWriteBatch.h7
-rw-r--r--Firestore/Source/Public/FirebaseFirestore.h33
4 files changed, 52 insertions, 3 deletions
diff --git a/Firestore/Source/Public/FIRDocumentReference.h b/Firestore/Source/Public/FIRDocumentReference.h
index 439e727..7fcc7a8 100644
--- a/Firestore/Source/Public/FIRDocumentReference.h
+++ b/Firestore/Source/Public/FIRDocumentReference.h
@@ -36,8 +36,6 @@ NS_SWIFT_NAME(DocumentListenOptions)
- (instancetype)init;
-@property(nonatomic, assign, readonly) BOOL includeMetadataChanges;
-
/**
* Sets the includeMetadataChanges option which controls whether metadata-only changes (i.e. only
* `FIRDocumentSnapshot.metadata` changed) should trigger snapshot events. Default is NO.
diff --git a/Firestore/Source/Public/FIRQuery.h b/Firestore/Source/Public/FIRQuery.h
index 0f3aeed..ff15ac6 100644
--- a/Firestore/Source/Public/FIRQuery.h
+++ b/Firestore/Source/Public/FIRQuery.h
@@ -256,6 +256,19 @@ NS_SWIFT_NAME(Query)
isGreaterThanOrEqualTo:(id)value NS_SWIFT_NAME(whereField(_:isGreaterThanOrEqualTo:));
// clang-format on
+/**
+ * Creates and returns a new `FIRQuery` with the additional filter that documents must
+ * satisfy the specified predicate.
+ *
+ * @param predicate The predicate the document must satisfy. Can be either comparison
+ * or compound of comparison. In particular, block-based predicate is not supported.
+ *
+ * @return The created `FIRQuery`.
+ */
+// clang-format off
+- (FIRQuery *)queryFilteredUsingPredicate:(NSPredicate *)predicate NS_SWIFT_NAME(filter(using:));
+// clang-format on
+
#pragma mark - Sorting Data
/**
* Creates and returns a new `FIRQuery` that's additionally sorted by the specified field.
diff --git a/Firestore/Source/Public/FIRWriteBatch.h b/Firestore/Source/Public/FIRWriteBatch.h
index 5f0034c..8ff1bec 100644
--- a/Firestore/Source/Public/FIRWriteBatch.h
+++ b/Firestore/Source/Public/FIRWriteBatch.h
@@ -94,6 +94,11 @@ NS_SWIFT_NAME(WriteBatch)
/**
* Commits all of the writes in this write batch as a single atomic unit.
+ */
+- (void)commit;
+
+/**
+ * Commits all of the writes in this write batch as a single atomic unit.
*
* @param completion A block to be called once all of the writes in the batch have been
* successfully written to the backend as an atomic unit. This block will only execute
@@ -101,7 +106,7 @@ NS_SWIFT_NAME(WriteBatch)
* completion handler will not be called when the device is offline, though local
* changes will be visible immediately.
*/
-- (void)commitWithCompletion:(void (^)(NSError *_Nullable error))completion;
+- (void)commitWithCompletion:(nullable void (^)(NSError *_Nullable error))completion;
@end
diff --git a/Firestore/Source/Public/FirebaseFirestore.h b/Firestore/Source/Public/FirebaseFirestore.h
new file mode 100644
index 0000000..ff110fd
--- /dev/null
+++ b/Firestore/Source/Public/FirebaseFirestore.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#import "FIRCollectionReference.h"
+#import "FIRDocumentChange.h"
+#import "FIRDocumentReference.h"
+#import "FIRDocumentSnapshot.h"
+#import "FIRFieldPath.h"
+#import "FIRFieldValue.h"
+#import "FIRFirestore.h"
+#import "FIRFirestoreErrors.h"
+#import "FIRFirestoreSettings.h"
+#import "FIRGeoPoint.h"
+#import "FIRListenerRegistration.h"
+#import "FIRQuery.h"
+#import "FIRQuerySnapshot.h"
+#import "FIRSetOptions.h"
+#import "FIRSnapshotMetadata.h"
+#import "FIRTransaction.h"
+#import "FIRWriteBatch.h"