File: LazyIndexWrapper.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
Class: LazyIndexWrapper<TKey>
=============================
Defined in: packages/db/src/indexes/lazy-index.ts:39
Wrapper that defers index creation until first sync
Type Parameters
---------------
### TKey
TKey extends string | number = string | number
Constructors
------------
### Constructor
ts
new LazyIndexWrapper<TKey>(
id,
expression,
name,
resolver,
options,
collectionEntries?): LazyIndexWrapper<TKey>;
new LazyIndexWrapper<TKey>(
id,
expression,
name,
resolver,
options,
collectionEntries?): LazyIndexWrapper<TKey>;
Defined in: packages/db/src/indexes/lazy-index.ts:43
number
string | undefined
IndexResolver <TKey>
any
Iterable<[TKey, any], any, any>
LazyIndexWrapper<TKey>
Methods
-------
### getExpression()
ts
getExpression(): BasicExpression;
getExpression(): BasicExpression;
Defined in: packages/db/src/indexes/lazy-index.ts:118
Get the index expression
ts
getId(): number;
getId(): number;
Defined in: packages/db/src/indexes/lazy-index.ts:104
Get the index ID
number
ts
getName(): string | undefined;
getName(): string | undefined;
Defined in: packages/db/src/indexes/lazy-index.ts:111
Get the index name
string | undefined
ts
getResolved(): BaseIndex<TKey>;
getResolved(): BaseIndex<TKey>;
Defined in: packages/db/src/indexes/lazy-index.ts:92
Get resolved index (throws if not ready)
BaseIndex <TKey>
ts
isResolved(): boolean;
isResolved(): boolean;
Defined in: packages/db/src/indexes/lazy-index.ts:85
Check if already resolved
boolean
ts
resolve(): Promise<BaseIndex<TKey>>;
resolve(): Promise<BaseIndex<TKey>>;
Defined in: packages/db/src/indexes/lazy-index.ts:69
Resolve the actual index
Promise<BaseIndex <TKey>>
