Skip to content

Commit 428c432

Browse files
committed
Update names.
1 parent 28152dc commit 428c432

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

packages/firestore/src/local/indexeddb_document_overlay_cache.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
DocumentKeySet,
2121
MutationMap,
2222
OverlayMap,
23-
newDocumentKeyToOverlayMap
23+
newOverlayMap
2424
} from '../model/collections';
2525
import { DocumentKey } from '../model/document_key';
2626
import { Overlay } from '../model/overlay';
@@ -123,7 +123,7 @@ export class IndexedDbDocumentOverlayCache implements DocumentOverlayCache {
123123
collection: ResourcePath,
124124
sinceBatchId: number
125125
): PersistencePromise<OverlayMap> {
126-
const result = newDocumentKeyToOverlayMap();
126+
const result = newOverlayMap();
127127
const collectionPath = encodeResourcePath(collection);
128128
// We want batch IDs larger than `sinceBatchId`, and so the lower bound
129129
// is not inclusive.
@@ -149,7 +149,7 @@ export class IndexedDbDocumentOverlayCache implements DocumentOverlayCache {
149149
sinceBatchId: number,
150150
count: number
151151
): PersistencePromise<OverlayMap> {
152-
const result = newDocumentKeyToOverlayMap();
152+
const result = newOverlayMap();
153153
let currentBatchId: number | undefined = undefined;
154154
// We want batch IDs larger than `sinceBatchId`, and so the lower bound
155155
// is not inclusive.

packages/firestore/src/local/memory_document_overlay_cache.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
DocumentKeySet,
2121
MutationMap,
2222
OverlayMap,
23-
newDocumentKeyToOverlayMap
23+
newOverlayMap
2424
} from '../model/collections';
2525
import { DocumentKey } from '../model/document_key';
2626
import { Mutation } from '../model/mutation';
@@ -79,7 +79,7 @@ export class MemoryDocumentOverlayCache implements DocumentOverlayCache {
7979
collection: ResourcePath,
8080
sinceBatchId: number
8181
): PersistencePromise<OverlayMap> {
82-
const result = newDocumentKeyToOverlayMap();
82+
const result = newOverlayMap();
8383

8484
const immediateChildrenPathLength = collection.length + 1;
8585
const prefix = new DocumentKey(collection.child(''));
@@ -124,7 +124,7 @@ export class MemoryDocumentOverlayCache implements DocumentOverlayCache {
124124
if (overlay.largestBatchId > sinceBatchId) {
125125
let overlaysForBatchId = batchIdToOverlays.get(overlay.largestBatchId);
126126
if (overlaysForBatchId === null) {
127-
overlaysForBatchId = newDocumentKeyToOverlayMap();
127+
overlaysForBatchId = newOverlayMap();
128128
batchIdToOverlays = batchIdToOverlays.insert(
129129
overlay.largestBatchId,
130130
overlaysForBatchId
@@ -134,7 +134,7 @@ export class MemoryDocumentOverlayCache implements DocumentOverlayCache {
134134
}
135135
}
136136

137-
const result = newDocumentKeyToOverlayMap();
137+
const result = newOverlayMap();
138138
const batchIter = batchIdToOverlays.getIterator();
139139
while (batchIter.hasNext()) {
140140
const entry = batchIter.getNext();

packages/firestore/src/model/collections.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ export function documentMap(): DocumentMap {
5151
}
5252

5353
export type OverlayMap = ObjectMap<DocumentKey, Overlay>;
54-
export function newDocumentKeyToOverlayMap(): OverlayMap {
54+
export function newOverlayMap(): OverlayMap {
5555
return new ObjectMap<DocumentKey, Overlay>(
5656
key => key.toString(),
5757
(l, r) => l.isEqual(r)
5858
);
5959
}
6060

6161
export type MutationMap = ObjectMap<DocumentKey, Mutation>;
62-
export function newDocumentKeyToMutationMap(): MutationMap {
62+
export function newMutationMap(): MutationMap {
6363
return new ObjectMap<DocumentKey, Mutation>(
6464
key => key.toString(),
6565
(l, r) => l.isEqual(r)

packages/firestore/test/unit/local/document_overlay_cache.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
documentKeySet,
2424
MutationMap,
2525
OverlayMap,
26-
newDocumentKeyToMutationMap
26+
newMutationMap
2727
} from '../../../src/model/collections';
2828
import { Mutation, mutationEquals } from '../../../src/model/mutation';
2929
import { addEqualityMatcher } from '../../util/equality_matcher';
@@ -89,7 +89,7 @@ function genericDocumentOverlayCacheTests(): void {
8989
largestBatch: number,
9090
...mutations: Mutation[]
9191
): Promise<void> {
92-
const data: MutationMap = newDocumentKeyToMutationMap();
92+
const data: MutationMap = newMutationMap();
9393
for (const mutation of mutations) {
9494
data.set(mutation.key, mutation);
9595
}
@@ -100,7 +100,7 @@ function genericDocumentOverlayCacheTests(): void {
100100
largestBatch: number,
101101
...overlayKeys: string[]
102102
): Promise<void> {
103-
const data: MutationMap = newDocumentKeyToMutationMap();
103+
const data: MutationMap = newMutationMap();
104104
for (const overlayKey of overlayKeys) {
105105
data.set(key(overlayKey), setMutation(overlayKey, {}));
106106
}

0 commit comments

Comments
 (0)