Skip to content

Commit 43cf623

Browse files
var-consta-maurice
authored andcommitted
Don't expose FooLastResult functions in the public C++ API.
Removing the implementation can be done in a follow-up. PiperOrigin-RevId: 307659652
1 parent fff9fbe commit 43cf623

File tree

10 files changed

+0
-139
lines changed

10 files changed

+0
-139
lines changed

firestore/src/common/collection_reference.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,6 @@ Future<DocumentReference> CollectionReference::Add(const MapFieldValue& data) {
8787
return internal()->Add(data);
8888
}
8989

90-
Future<DocumentReference> CollectionReference::AddLastResult() const {
91-
if (!internal()) return FailedFuture<DocumentReference>();
92-
return internal()->AddLastResult();
93-
}
94-
9590
CollectionReferenceInternal* CollectionReference::internal() const {
9691
return static_cast<CollectionReferenceInternal*>(internal_);
9792
}

firestore/src/common/document_reference.cc

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -130,22 +130,12 @@ Future<DocumentSnapshot> DocumentReference::Get(Source source) const {
130130
return internal_->Get(source);
131131
}
132132

133-
Future<DocumentSnapshot> DocumentReference::GetLastResult() const {
134-
if (!internal_) return FailedFuture<DocumentSnapshot>();
135-
return internal_->GetLastResult();
136-
}
137-
138133
Future<void> DocumentReference::Set(const MapFieldValue& data,
139134
const SetOptions& options) {
140135
if (!internal_) return FailedFuture<void>();
141136
return internal_->Set(data, options);
142137
}
143138

144-
Future<void> DocumentReference::SetLastResult() const {
145-
if (!internal_) return FailedFuture<void>();
146-
return internal_->SetLastResult();
147-
}
148-
149139
Future<void> DocumentReference::Update(const MapFieldValue& data) {
150140
if (!internal_) return FailedFuture<void>();
151141
return internal_->Update(data);
@@ -156,21 +146,11 @@ Future<void> DocumentReference::Update(const MapFieldPathValue& data) {
156146
return internal_->Update(data);
157147
}
158148

159-
Future<void> DocumentReference::UpdateLastResult() const {
160-
if (!internal_) return FailedFuture<void>();
161-
return internal_->UpdateLastResult();
162-
}
163-
164149
Future<void> DocumentReference::Delete() {
165150
if (!internal_) return FailedFuture<void>();
166151
return internal_->Delete();
167152
}
168153

169-
Future<void> DocumentReference::DeleteLastResult() const {
170-
if (!internal_) return FailedFuture<void>();
171-
return internal_->DeleteLastResult();
172-
}
173-
174154
#if defined(FIREBASE_USE_STD_FUNCTION) || defined(DOXYGEN)
175155
ListenerRegistration DocumentReference::AddSnapshotListener(
176156
std::function<void(const DocumentSnapshot&, Error)> callback) {

firestore/src/common/firestore.cc

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -237,62 +237,32 @@ Future<void> Firestore::RunTransaction(
237237
}
238238
#endif // defined(FIREBASE_USE_STD_FUNCTION) || defined(DOXYGEN)
239239

240-
Future<void> Firestore::RunTransactionLastResult() {
241-
if (!internal_) return FailedFuture<void>();
242-
return internal_->RunTransactionLastResult();
243-
}
244-
245240
Future<void> Firestore::DisableNetwork() {
246241
if (!internal_) return FailedFuture<void>();
247242
return internal_->DisableNetwork();
248243
}
249244

250-
Future<void> Firestore::DisableNetworkLastResult() {
251-
if (!internal_) return FailedFuture<void>();
252-
return internal_->DisableNetworkLastResult();
253-
}
254-
255245
Future<void> Firestore::EnableNetwork() {
256246
if (!internal_) return FailedFuture<void>();
257247
return internal_->EnableNetwork();
258248
}
259249

260-
Future<void> Firestore::EnableNetworkLastResult() {
261-
if (!internal_) return FailedFuture<void>();
262-
return internal_->EnableNetworkLastResult();
263-
}
264-
265250
Future<void> Firestore::Terminate() {
266251
if (!internal_) return FailedFuture<void>();
267252
FirestoreCache()->erase(app());
268253
return internal_->Terminate();
269254
}
270255

271-
Future<void> Firestore::TerminateLastResult() {
272-
if (!internal_) return FailedFuture<void>();
273-
return internal_->TerminateLastResult();
274-
}
275-
276256
Future<void> Firestore::WaitForPendingWrites() {
277257
if (!internal_) return FailedFuture<void>();
278258
return internal_->WaitForPendingWrites();
279259
}
280260

281-
Future<void> Firestore::WaitForPendingWritesLastResult() {
282-
if (!internal_) return FailedFuture<void>();
283-
return internal_->WaitForPendingWritesLastResult();
284-
}
285-
286261
Future<void> Firestore::ClearPersistence() {
287262
if (!internal_) return FailedFuture<void>();
288263
return internal_->ClearPersistence();
289264
}
290265

291-
Future<void> Firestore::ClearPersistenceLastResult() {
292-
if (!internal_) return FailedFuture<void>();
293-
return internal_->ClearPersistenceLastResult();
294-
}
295-
296266
#if !defined(FIREBASE_USE_STD_FUNCTION) || defined(DOXYGEN)
297267
ListenerRegistration Firestore::AddSnapshotsInSyncListener(
298268
EventListener<void>* listener) {

firestore/src/common/query.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,6 @@ Future<QuerySnapshot> Query::Get(Source source) const {
242242
return internal_->Get(source);
243243
}
244244

245-
Future<QuerySnapshot> Query::GetLastResult() const {
246-
if (!internal_) return FailedFuture<QuerySnapshot>();
247-
return internal_->GetLastResult();
248-
}
249-
250245
#if defined(FIREBASE_USE_STD_FUNCTION) || defined(DOXYGEN)
251246
ListenerRegistration Query::AddSnapshotListener(
252247
std::function<void(const QuerySnapshot&, Error)> callback) {

firestore/src/common/write_batch.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,5 @@ Future<void> WriteBatch::Commit() {
110110
return internal_->Commit();
111111
}
112112

113-
Future<void> WriteBatch::CommitLastResult() const {
114-
if (!internal_) return FailedFuture<void>();
115-
return internal_->CommitLastResult();
116-
}
117-
118113
} // namespace firestore
119114
} // namespace firebase

firestore/src/include/firebase/firestore.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,6 @@ class Firestore {
266266
*/
267267
virtual Future<void> RunTransaction(TransactionFunction* update);
268268

269-
/** Gets the result of the most recent call to RunTransaction(). */
270-
virtual Future<void> RunTransactionLastResult();
271-
272269
/**
273270
* Sets the log verbosity of all Firestore instances.
274271
*
@@ -286,18 +283,12 @@ class Firestore {
286283
*/
287284
virtual Future<void> DisableNetwork();
288285

289-
/** Gets the result of the most recent call to DisableNetwork(). */
290-
Future<void> DisableNetworkLastResult();
291-
292286
/**
293287
* Re-enables network usage for this instance after a prior call to
294288
* DisableNetwork().
295289
*/
296290
virtual Future<void> EnableNetwork();
297291

298-
/** Gets the result of the most recent call to EnableNetwork(). */
299-
Future<void> EnableNetworkLastResult();
300-
301292
/**
302293
* Terminates this `Firestore` instance.
303294
*
@@ -322,9 +313,6 @@ class Firestore {
322313
*/
323314
virtual Future<void> Terminate();
324315

325-
/** Gets the result of the most recent call to `Terminate()`. */
326-
Future<void> TerminateLastResult();
327-
328316
/**
329317
* Waits until all currently pending writes for the active user have been
330318
* acknowledged by the backend.
@@ -341,9 +329,6 @@ class Firestore {
341329
*/
342330
virtual Future<void> WaitForPendingWrites();
343331

344-
/** Gets the result of the most recent call to WaitForPendingWrites(). */
345-
Future<void> WaitForPendingWritesLastResult();
346-
347332
/**
348333
* Clears the persistent storage. This includes pending writes and cached
349334
* documents.
@@ -363,9 +348,6 @@ class Firestore {
363348
*/
364349
virtual Future<void> ClearPersistence();
365350

366-
/** Gets the result of the most recent call to ClearPersistence(). */
367-
Future<void> ClearPersistenceLastResult();
368-
369351
#if defined(FIREBASE_USE_STD_FUNCTION) || defined(DOXYGEN)
370352
/**
371353
* Attaches a listener for a snapshots-in-sync event. Server-generated

firestore/src/include/firebase/firestore/collection_reference.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,6 @@ class CollectionReference : public Query {
164164
*/
165165
virtual Future<DocumentReference> Add(const MapFieldValue& data);
166166

167-
/**
168-
* @brief Gets the result of the most recent call to Add().
169-
*
170-
* @return The result of last call to Add() or an invalid Future, if there is
171-
* no such call.
172-
*/
173-
virtual Future<DocumentReference> AddLastResult() const;
174-
175167
private:
176168
friend class DocumentReference;
177169
friend class DocumentReferenceInternal;

firestore/src/include/firebase/firestore/document_reference.h

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,6 @@ class DocumentReference {
200200
*/
201201
virtual Future<DocumentSnapshot> Get(Source source = Source::kDefault) const;
202202

203-
/**
204-
* @brief Gets the result of the most recent call to the Get() method.
205-
*
206-
* @return The result of last call to Get() or an invalid Future, if there is
207-
* no such call.
208-
*/
209-
virtual Future<DocumentSnapshot> GetLastResult() const;
210-
211203
/**
212204
* @brief Writes to the document referred to by this DocumentReference.
213205
*
@@ -222,14 +214,6 @@ class DocumentReference {
222214
virtual Future<void> Set(const MapFieldValue& data,
223215
const SetOptions& options = SetOptions());
224216

225-
/**
226-
* @brief Gets the result of the most recent call to the Set() method.
227-
*
228-
* @return The result of last call to Set() or an invalid Future, if there is
229-
* no such call.
230-
*/
231-
virtual Future<void> SetLastResult() const;
232-
233217
/**
234218
* @brief Updates fields in the document referred to by this
235219
* DocumentReference.
@@ -255,29 +239,13 @@ class DocumentReference {
255239
*/
256240
virtual Future<void> Update(const MapFieldPathValue& data);
257241

258-
/**
259-
* @brief Gets the result of the most recent call to Update().
260-
*
261-
* @return The result of last call to Update() or an invalid Future, if there
262-
* is no such call.
263-
*/
264-
virtual Future<void> UpdateLastResult() const;
265-
266242
/**
267243
* @brief Removes the document referred to by this DocumentReference.
268244
*
269245
* @return A Future that will be resolved when the delete completes.
270246
*/
271247
virtual Future<void> Delete();
272248

273-
/**
274-
* @brief Gets the result of the most recent call to Delete().
275-
*
276-
* @return The result of last call to Delete() or an invalid Future, if there
277-
* is no such call.
278-
*/
279-
virtual Future<void> DeleteLastResult() const;
280-
281249
#if defined(FIREBASE_USE_STD_FUNCTION) || defined(DOXYGEN)
282250
/**
283251
* @brief Starts listening to the document referenced by this

firestore/src/include/firebase/firestore/query.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -524,14 +524,6 @@ class Query {
524524
*/
525525
virtual Future<QuerySnapshot> Get(Source source = Source::kDefault) const;
526526

527-
/**
528-
* @brief Gets the result of the most recent call to the Get() method.
529-
*
530-
* @return The result of last call to Get() or an invalid Future, if there is
531-
* no such call.
532-
*/
533-
virtual Future<QuerySnapshot> GetLastResult() const;
534-
535527
#if defined(FIREBASE_USE_STD_FUNCTION) || defined(DOXYGEN)
536528
/**
537529
* @brief Starts listening to the QuerySnapshot events referenced by this

firestore/src/include/firebase/firestore/write_batch.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,6 @@ class WriteBatch {
155155
*/
156156
virtual Future<void> Commit();
157157

158-
/**
159-
* Gets the result of the most recent call to Commit() methods.
160-
*
161-
* @return The result of last call to Commit() or an invalid Future, if there
162-
* is no such call.
163-
*/
164-
virtual Future<void> CommitLastResult() const;
165-
166158
private:
167159
friend class FirestoreInternal;
168160
friend class WriteBatchInternal;

0 commit comments

Comments
 (0)