@@ -204,7 +204,7 @@ export function preconditionIsValidForDocument(
204
204
*
205
205
* Every type of mutation needs to implement its own applyToRemoteDocument() and
206
206
* applyToLocalView() to implement the actual behavior of applying the mutation
207
- * to some source document (see `applySetMutationToRemoteDocument ()` for an
207
+ * to some source document (see `setMutationApplyToRemoteDocument ()` for an
208
208
* example).
209
209
*/
210
210
export abstract class Mutation {
@@ -226,22 +226,22 @@ export abstract class Mutation {
226
226
* of the document.
227
227
* @param mutationResult - The result of applying the mutation from the backend.
228
228
*/
229
- export function applyMutationToRemoteDocument (
229
+ export function mutationApplyToRemoteDocument (
230
230
mutation : Mutation ,
231
231
document : MutableDocument ,
232
232
mutationResult : MutationResult
233
233
) : void {
234
- verifyMutationKeyMatches ( mutation , document ) ;
234
+ mutationVerifyKeyMatches ( mutation , document ) ;
235
235
if ( mutation instanceof SetMutation ) {
236
- applySetMutationToRemoteDocument ( mutation , document , mutationResult ) ;
236
+ setMutationApplyToRemoteDocument ( mutation , document , mutationResult ) ;
237
237
} else if ( mutation instanceof PatchMutation ) {
238
- applyPatchMutationToRemoteDocument ( mutation , document , mutationResult ) ;
238
+ patchMutationApplyToRemoteDocument ( mutation , document , mutationResult ) ;
239
239
} else {
240
240
debugAssert (
241
241
mutation instanceof DeleteMutation ,
242
242
'Unexpected mutation type: ' + mutation
243
243
) ;
244
- applyDeleteMutationToRemoteDocument ( mutation , document , mutationResult ) ;
244
+ deleteMutationApplyToRemoteDocument ( mutation , document , mutationResult ) ;
245
245
}
246
246
}
247
247
@@ -257,23 +257,23 @@ export function applyMutationToRemoteDocument(
257
257
* @param localWriteTime - A timestamp indicating the local write time of the
258
258
* batch this mutation is a part of.
259
259
*/
260
- export function applyMutationToLocalView (
260
+ export function mutationApplyToLocalView (
261
261
mutation : Mutation ,
262
262
document : MutableDocument ,
263
263
localWriteTime : Timestamp
264
264
) : void {
265
- verifyMutationKeyMatches ( mutation , document ) ;
265
+ mutationVerifyKeyMatches ( mutation , document ) ;
266
266
267
267
if ( mutation instanceof SetMutation ) {
268
- applySetMutationToLocalView ( mutation , document , localWriteTime ) ;
268
+ setMutationApplyToLocalView ( mutation , document , localWriteTime ) ;
269
269
} else if ( mutation instanceof PatchMutation ) {
270
- applyPatchMutationToLocalView ( mutation , document , localWriteTime ) ;
270
+ patchMutationApplyToLocalView ( mutation , document , localWriteTime ) ;
271
271
} else {
272
272
debugAssert (
273
273
mutation instanceof DeleteMutation ,
274
274
'Unexpected mutation type: ' + mutation
275
275
) ;
276
- applyDeleteMutationToLocalView ( mutation , document ) ;
276
+ deleteMutationApplyToLocalView ( mutation , document ) ;
277
277
}
278
278
}
279
279
@@ -293,7 +293,7 @@ export function applyMutationToLocalView(
293
293
* @returns a base value to store along with the mutation, or null for
294
294
* idempotent mutations.
295
295
*/
296
- export function extractMutationBaseValue (
296
+ export function mutationExtractBaseValue (
297
297
mutation : Mutation ,
298
298
document : Document
299
299
) : ObjectValue | null {
@@ -348,7 +348,7 @@ export function mutationEquals(left: Mutation, right: Mutation): boolean {
348
348
return true ;
349
349
}
350
350
351
- function verifyMutationKeyMatches (
351
+ function mutationVerifyKeyMatches (
352
352
mutation : Mutation ,
353
353
document : MutableDocument
354
354
) : void {
@@ -385,12 +385,12 @@ export class SetMutation extends Mutation {
385
385
readonly type : MutationType = MutationType . Set ;
386
386
}
387
387
388
- function applySetMutationToRemoteDocument (
388
+ function setMutationApplyToRemoteDocument (
389
389
mutation : SetMutation ,
390
390
document : MutableDocument ,
391
391
mutationResult : MutationResult
392
392
) : void {
393
- // Unlike applySetMutationToLocalView , if we're applying a mutation to a
393
+ // Unlike setMutationApplyToLocalView , if we're applying a mutation to a
394
394
// remote document the server has accepted the mutation so the precondition
395
395
// must have held.
396
396
const newData = mutation . value . clone ( ) ;
@@ -405,7 +405,7 @@ function applySetMutationToRemoteDocument(
405
405
. setHasCommittedMutations ( ) ;
406
406
}
407
407
408
- function applySetMutationToLocalView (
408
+ function setMutationApplyToLocalView (
409
409
mutation : SetMutation ,
410
410
document : MutableDocument ,
411
411
localWriteTime : Timestamp
@@ -455,7 +455,7 @@ export class PatchMutation extends Mutation {
455
455
readonly type : MutationType = MutationType . Patch ;
456
456
}
457
457
458
- function applyPatchMutationToRemoteDocument (
458
+ function patchMutationApplyToRemoteDocument (
459
459
mutation : PatchMutation ,
460
460
document : MutableDocument ,
461
461
mutationResult : MutationResult
@@ -482,7 +482,7 @@ function applyPatchMutationToRemoteDocument(
482
482
. setHasCommittedMutations ( ) ;
483
483
}
484
484
485
- function applyPatchMutationToLocalView (
485
+ function patchMutationApplyToLocalView (
486
486
mutation : PatchMutation ,
487
487
document : MutableDocument ,
488
488
localWriteTime : Timestamp
@@ -601,7 +601,7 @@ export class DeleteMutation extends Mutation {
601
601
readonly fieldTransforms : FieldTransform [ ] = [ ] ;
602
602
}
603
603
604
- function applyDeleteMutationToRemoteDocument (
604
+ function deleteMutationApplyToRemoteDocument (
605
605
mutation : DeleteMutation ,
606
606
document : MutableDocument ,
607
607
mutationResult : MutationResult
@@ -619,7 +619,7 @@ function applyDeleteMutationToRemoteDocument(
619
619
. setHasCommittedMutations ( ) ;
620
620
}
621
621
622
- function applyDeleteMutationToLocalView (
622
+ function deleteMutationApplyToLocalView (
623
623
mutation : DeleteMutation ,
624
624
document : MutableDocument
625
625
) : void {
0 commit comments