Skip to content

Commit 2b489e2

Browse files
authored
fix: remove unused collectionsStore (#310)
1 parent 8714f94 commit 2b489e2

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

packages/db/src/collection.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ import type {
6262
import type { IndexOptions } from "./indexes/index-options.js"
6363
import type { BaseIndex, IndexResolver } from "./indexes/base-index.js"
6464

65-
// Store collections in memory
66-
export const collectionsStore = new Map<string, CollectionImpl<any, any, any>>()
67-
6865
interface PendingSyncedTransaction<T extends object = Record<string, unknown>> {
6966
committed: boolean
7067
operations: Array<OptimisticChangeMessage<T>>
@@ -427,9 +424,6 @@ export class CollectionImpl<
427424
autoIndex: config.autoIndex ?? `eager`,
428425
}
429426

430-
// Store in global collections store
431-
collectionsStore.set(this.id, this)
432-
433427
// Set up data storage with optional comparison function
434428
if (this.config.compare) {
435429
this.syncedData = new SortedMap<TKey, T>(this.config.compare)

0 commit comments

Comments
 (0)