Class: IndexDB<T>
Defined in: ridb_core.d.ts:400
Represents an IndexDB storage system extending the base storage functionality.
Extends
BaseStorage<T>
Type Parameters
T
T extends SchemaTypeRecord
The schema type.
Constructors
Constructor
new IndexDB<T>(dbName, schemas, options?): IndexDB<T>
Defined in: ridb_core.d.ts:250
Parameters
dbName
string
schemas
T
options?
Returns
IndexDB<T>
Inherited from
Properties
core
readonly core: CoreStorage
Defined in: ridb_core.d.ts:258
Inherited from
dbName
readonly dbName: string
Defined in: ridb_core.d.ts:255
Inherited from
options
readonly options: BaseStorageOptions
Defined in: ridb_core.d.ts:257
Inherited from
schemas
readonly schemas: Record<keyof Schemas, Schema<Schemas[keyof Schemas]>>
Defined in: ridb_core.d.ts:256
Inherited from
Methods
addIndexSchemas()
addIndexSchemas(): null
Defined in: ridb_core.d.ts:268
Returns
null
Inherited from
close()
close(): Promise<void>
Defined in: ridb_core.d.ts:260
Returns
Promise<void>
Inherited from
count()
count(colectionName, query, options?): Promise<number>
Defined in: ridb_core.d.ts:261
Parameters
colectionName
keyof T
query
QueryType<T[keyof T]>
options?
Returns
Promise<number>
Inherited from
find()
find(collectionName, query, options?): Promise<Doc<T[keyof T]>[]>
Defined in: ridb_core.d.ts:263
Parameters
collectionName
keyof T
query
QueryType<T[keyof T]>
options?
Returns
Promise<Doc<T[keyof T]>[]>
Inherited from
findDocumentById()
findDocumentById(collectionName, id): Promise<null | Doc<T[keyof T]>>
Defined in: ridb_core.d.ts:262
Parameters
collectionName
keyof T
id
string
Returns
Promise<null | Doc<T[keyof T]>>
Inherited from
free()
free(): void
Defined in: ridb_core.d.ts:404
Frees the resources used by the in-memory storage.
Returns
void
getOption()
getOption(name): undefined | string | number | boolean
Defined in: ridb_core.d.ts:265
Parameters
name
string
Returns
undefined | string | number | boolean
Inherited from
getSchema()
getSchema(name): Schema<any>
Defined in: ridb_core.d.ts:266
Parameters
name
string
Returns
Schema<any>
Inherited from
start()
start(): Promise<void>
Defined in: ridb_core.d.ts:259
Returns
Promise<void>
Inherited from
write()
write(op): Promise<Doc<T[keyof T]>>
Defined in: ridb_core.d.ts:264
Parameters
op
Operation<T[keyof T]>
Returns
Promise<Doc<T[keyof T]>>
Inherited from
create()
static create<SchemasCreate>(dbName, schemas): Promise<IndexDB<SchemasCreate>>
Defined in: ridb_core.d.ts:406
Type Parameters
SchemasCreate
SchemasCreate extends SchemaTypeRecord
Parameters
dbName
string
schemas
SchemasCreate
Returns
Promise<IndexDB<SchemasCreate>>