File: CollectionLike.md | Updated: 11/15/2025
Search...
+ K
Auto
Docs Examples GitHub Contributors
Docs Examples GitHub Contributors
Docs Examples GitHub Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Maintainers Partners Support Learn StatsBETA Discord Merch Blog GitHub Ethos Brand Guide
Documentation
Framework
React
Version
Latest
Search...
+ K
Menu
Getting Started
Guides
Collections
Frameworks
Community
API Reference
Framework
React
Version
Latest
Menu
Getting Started
Guides
Collections
Frameworks
Community
API Reference
On this page
Copy Markdown
Interface: CollectionLike<T, TKey>
==================================
Defined in: packages/db/src/types.ts:12
Interface for a collection-like object that provides the necessary methods for the change events system to work
Type Parameters
---------------
### T
T extends object = Record<string, unknown>
TKey extends string | number = string | number
Properties
----------
### compareOptions
ts
compareOptions: StringCollationConfig;
compareOptions: StringCollationConfig;
Defined in: packages/db/src/collection/index.ts:516
CollectionImpl .compareOptions
ts
id: string;
id: string;
Defined in: packages/db/src/collection/index.ts:210
ts
indexes: Map<number, BaseIndex<TKey>>;
indexes: Map<number, BaseIndex<TKey>>;
Defined in: packages/db/src/collection/index.ts:501
ts
Pick.indexes
Pick.indexes
ts
entries(): IterableIterator<[TKey, T]>;
entries(): IterableIterator<[TKey, T]>;
Defined in: packages/db/src/collection/index.ts:425
Get all entries (virtual derived state)
IterableIterator<[TKey, T]>
ts
Pick.entries
Pick.entries
ts
get(key): T | undefined;
get(key): T | undefined;
Defined in: packages/db/src/collection/index.ts:390
Get the current value for a key (virtual derived state)
TKey
T | undefined
ts
Pick.get
Pick.get
ts
has(key): boolean;
has(key): boolean;
Defined in: packages/db/src/collection/index.ts:397
Check if a key exists in the collection (virtual derived state)
TKey
boolean
ts
Pick.has
Pick.has
