@@ -117,27 +117,27 @@ + (FIRQuery *)parseQueryWithParameters:(nonnull PigeonQueryParameters *)paramete
117
117
// Limit
118
118
id limit = parameters.limit ;
119
119
if (limit) {
120
- query = [query queryLimitedTo: ((NSNumber *)limit).intValue];
120
+ query = [query queryLimitedTo: ((NSNumber *)limit).intValue];
121
121
}
122
122
123
123
// Limit To Last
124
124
id limitToLast = parameters.limitToLast ;
125
125
if (limitToLast) {
126
- query = [query queryLimitedToLast: ((NSNumber *)limitToLast).intValue];
126
+ query = [query queryLimitedToLast: ((NSNumber *)limitToLast).intValue];
127
127
}
128
128
129
129
// Ordering
130
130
NSArray *orderBy = parameters.orderBy ;
131
131
if (!orderBy) {
132
- // We return early if no ordering set as cursor queries below require at least one orderBy
133
- // set
134
- return query;
132
+ // We return early if no ordering set as cursor queries below require at least one orderBy
133
+ // set
134
+ return query;
135
135
}
136
136
137
137
for (NSArray *orderByParameters in orderBy) {
138
- FIRFieldPath *fieldPath = (FIRFieldPath *)orderByParameters[0 ];
139
- NSNumber *descending = orderByParameters[1 ];
140
- query = [query queryOrderedByFieldPath: fieldPath descending: [descending boolValue ]];
138
+ FIRFieldPath *fieldPath = (FIRFieldPath *)orderByParameters[0 ];
139
+ NSNumber *descending = orderByParameters[1 ];
140
+ query = [query queryOrderedByFieldPath: fieldPath descending: [descending boolValue ]];
141
141
}
142
142
143
143
// Start At
@@ -165,15 +165,15 @@ + (FIRQuery *)parseQueryWithParameters:(nonnull PigeonQueryParameters *)paramete
165
165
+ (FIRFirestoreSource)parseSource : (Source)source {
166
166
switch (source) {
167
167
case SourceServerAndCache:
168
- return FIRFirestoreSourceDefault;
168
+ return FIRFirestoreSourceDefault;
169
169
case SourceServer:
170
- return FIRFirestoreSourceServer;
170
+ return FIRFirestoreSourceServer;
171
171
case SourceCache:
172
- return FIRFirestoreSourceCache;
172
+ return FIRFirestoreSourceCache;
173
173
default :
174
- @throw [NSException exceptionWithName: @" Invalid Source"
175
- reason: @" This source is not supported by the SDK"
176
- userInfo: nil ];
174
+ @throw [NSException exceptionWithName: @" Invalid Source"
175
+ reason: @" This source is not supported by the SDK"
176
+ userInfo: nil ];
177
177
}
178
178
}
179
179
@@ -190,16 +190,16 @@ + (FIRServerTimestampBehavior)parseServerTimestampBehavior:
190
190
(ServerTimestampBehavior)serverTimestampBehavior {
191
191
switch (serverTimestampBehavior) {
192
192
case ServerTimestampBehaviorNone:
193
- return FIRServerTimestampBehaviorNone;
193
+ return FIRServerTimestampBehaviorNone;
194
194
case ServerTimestampBehaviorEstimate:
195
- return FIRServerTimestampBehaviorEstimate;
195
+ return FIRServerTimestampBehaviorEstimate;
196
196
case ServerTimestampBehaviorPrevious:
197
- return FIRServerTimestampBehaviorPrevious;
197
+ return FIRServerTimestampBehaviorPrevious;
198
198
default :
199
- @throw [NSException
200
- exceptionWithName: @" Invalid Server Timestamp Behavior"
201
- reason: @" This Server Timestamp Behavior is not supported by the SDK"
202
- userInfo: nil ];
199
+ @throw [NSException
200
+ exceptionWithName: @" Invalid Server Timestamp Behavior"
201
+ reason: @" This Server Timestamp Behavior is not supported by the SDK"
202
+ userInfo: nil ];
203
203
}
204
204
}
205
205
@@ -221,15 +221,15 @@ + (PigeonDocumentSnapshot *)toPigeonDocumentSnapshot:(FIRDocumentSnapshot *)docu
221
221
+ (DocumentChangeType)toPigeonDocumentChangeType : (FIRDocumentChangeType)documentChangeType {
222
222
switch (documentChangeType) {
223
223
case FIRDocumentChangeTypeAdded:
224
- return DocumentChangeTypeAdded;
224
+ return DocumentChangeTypeAdded;
225
225
case FIRDocumentChangeTypeModified:
226
- return DocumentChangeTypeModified;
226
+ return DocumentChangeTypeModified;
227
227
case FIRDocumentChangeTypeRemoved:
228
- return DocumentChangeTypeRemoved;
228
+ return DocumentChangeTypeRemoved;
229
229
default :
230
- @throw [NSException exceptionWithName: @" InvalidDocumentChangeType"
231
- reason: @" Invalid document change type"
232
- userInfo: nil ];
230
+ @throw [NSException exceptionWithName: @" InvalidDocumentChangeType"
231
+ reason: @" Invalid document change type"
232
+ userInfo: nil ];
233
233
}
234
234
}
235
235
0 commit comments