Skip to content

Commit 4f47bf3

Browse files
Cleanup
1 parent 5b0e95b commit 4f47bf3

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

packages/firestore/src/local/indexeddb_schema.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ import { encode, EncodedResourcePath } from './encoded_resource_path';
2525
export const SCHEMA_VERSION = 2;
2626

2727
/**
28-
* Performs database creation and schema migrations from and up to the specified
29-
* version.
28+
* Performs database creation and schema migrations up to schema version 2.
3029
*/
3130
export function createOrUpgradeDb(
3231
db: IDBDatabase,
@@ -506,7 +505,7 @@ function createQueryCache(db: IDBDatabase): void {
506505

507506
/**
508507
* An object representing the changes at a particular snapshot version for the
509-
* given target. This is used to facilitate storing a query changelog in the
508+
* given target. This is used to facilitate storing query changelogs in the
510509
* targetChanges object store.
511510
*
512511
* PORTING NOTE: This is used for change propagation during multi-tab syncing
@@ -548,7 +547,7 @@ function createTargetChangeStore(db: IDBDatabase): void {
548547
/**
549548
* A record of the metadata state of each instance.
550549
*
551-
* PORTING NOTE: This is used for primary-tab selection for multi-tab
550+
* PORTING NOTE: This is used for primary-tab selection to support multi-tab
552551
* persistence and does not need to be ported to iOS or Android.
553552
*/
554553
export class DbInstanceMetadata {

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ import {
2424
} from '../../../src/local/indexeddb_schema';
2525
import { Deferred } from '../../../src/util/promise';
2626

27-
const INDEXEDDB_SCHEMA_TEST = 'schemaTest';
27+
const INDEXEDDB_TEST_DATABASE = 'schemaTest';
2828

2929
function deleteDb() {
3030
const deferred = new Deferred<void>();
3131

32-
const request = window.indexedDB.deleteDatabase(INDEXEDDB_SCHEMA_TEST);
32+
const request = window.indexedDB.deleteDatabase(INDEXEDDB_TEST_DATABASE);
3333
request.onsuccess = (event: Event) => {
3434
deferred.resolve();
3535
};
@@ -43,7 +43,7 @@ function deleteDb() {
4343
function initDb(targetVersion) {
4444
const deferred = new Deferred<IDBDatabase>();
4545

46-
const request = window.indexedDB.open(INDEXEDDB_SCHEMA_TEST, targetVersion);
46+
const request = window.indexedDB.open(INDEXEDDB_TEST_DATABASE, targetVersion);
4747
request.onsuccess = (event: Event) => {
4848
const db = (event.target as IDBOpenDBRequest).result;
4949
deferred.resolve(db);
@@ -68,7 +68,7 @@ function getAllObjectStores(db: IDBDatabase): String[] {
6868
return objectStores;
6969
}
7070

71-
// Sorting these stored directly should not affect the functionality of the SDK.
71+
// Sorting these arrays directly should not affect the functionality of the SDK.
7272
V1_STORES.sort();
7373
ALL_STORES.sort();
7474

0 commit comments

Comments
 (0)