Class: IndexDB<T>
Defined in: ridb_core.d.ts:328
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:360
Parameters
dbName
string
schemas
T
options?
Returns
IndexDB
<T
>
Inherited from
Properties
core
readonly core: CoreStorage
Defined in: ridb_core.d.ts:368
Inherited from
dbName
readonly dbName: string
Defined in: ridb_core.d.ts:365
Inherited from
options
readonly options: BaseStorageOptions
Defined in: ridb_core.d.ts:367
Inherited from
schemas
readonly schemas: Record<keyof Schemas, Schema<Schemas[keyof Schemas]>>
Defined in: ridb_core.d.ts:366
Inherited from
Methods
addIndexSchemas()
addIndexSchemas(): null
Defined in: ridb_core.d.ts:378
Returns
null
Inherited from
close()
close(): Promise<void>
Defined in: ridb_core.d.ts:370
Returns
Promise
<void
>
Inherited from
count()
count(colectionName, query, options?): Promise<number>
Defined in: ridb_core.d.ts:371
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:373
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:372
Parameters
collectionName
keyof T
id
string
Returns
Promise
<null
| Doc
<T
[keyof T
]>>
Inherited from
free()
free(): void
Defined in: ridb_core.d.ts:332
Frees the resources used by the in-memory storage.
Returns
void
getOption()
getOption(name): undefined | string | number | boolean
Defined in: ridb_core.d.ts:375
Parameters
name
string
Returns
undefined
| string
| number
| boolean
Inherited from
getSchema()
getSchema(name): Schema<any>
Defined in: ridb_core.d.ts:376
Parameters
name
string
Returns
Schema
<any
>
Inherited from
start()
start(): Promise<void>
Defined in: ridb_core.d.ts:369
Returns
Promise
<void
>
Inherited from
write()
write(op): Promise<Doc<T[keyof T]>>
Defined in: ridb_core.d.ts:374
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:334
Type Parameters
SchemasCreate
SchemasCreate
extends SchemaTypeRecord
Parameters
dbName
string
schemas
SchemasCreate
Returns
Promise
<IndexDB
<SchemasCreate
>>