Class: BaseStorage<Schemas>
Defined in: ridb_core.d.ts:240
Extends
StorageInternal<Schemas>
Extended by
Type Parameters
Schemas
Schemas extends SchemaTypeRecord
Constructors
Constructor
new BaseStorage<Schemas>(dbName, schemas, options?): BaseStorage<Schemas>
Defined in: ridb_core.d.ts:250
Parameters
dbName
string
schemas
Schemas
options?
Returns
BaseStorage<Schemas>
Overrides
Properties
core
readonly core: CoreStorage
Defined in: ridb_core.d.ts:258
dbName
readonly dbName: string
Defined in: ridb_core.d.ts:255
options
readonly options: BaseStorageOptions
Defined in: ridb_core.d.ts:257
schemas
readonly schemas: Record<keyof Schemas, Schema<Schemas[keyof Schemas]>>
Defined in: ridb_core.d.ts:256
Methods
addIndexSchemas()
addIndexSchemas(): null
Defined in: ridb_core.d.ts:268
Returns
null
close()
close(): Promise<void>
Defined in: ridb_core.d.ts:260
Returns
Promise<void>
Overrides
count()
count(colectionName, query, options?): Promise<number>
Defined in: ridb_core.d.ts:261
Parameters
colectionName
keyof Schemas
query
QueryType<Schemas[keyof Schemas]>
options?
Returns
Promise<number>
Overrides
find()
find(collectionName, query, options?): Promise<Doc<Schemas[keyof Schemas]>[]>
Defined in: ridb_core.d.ts:263
Parameters
collectionName
keyof Schemas
query
QueryType<Schemas[keyof Schemas]>
options?
Returns
Promise<Doc<Schemas[keyof Schemas]>[]>
Overrides
findDocumentById()
findDocumentById(collectionName, id): Promise<null | Doc<Schemas[keyof Schemas]>>
Defined in: ridb_core.d.ts:262
Parameters
collectionName
keyof Schemas
id
string
Returns
Promise<null | Doc<Schemas[keyof Schemas]>>
Overrides
StorageInternal.findDocumentById
getOption()
getOption(name): undefined | string | number | boolean
Defined in: ridb_core.d.ts:265
Parameters
name
string
Returns
undefined | string | number | boolean
getSchema()
getSchema(name): Schema<any>
Defined in: ridb_core.d.ts:266
Parameters
name
string
Returns
Schema<any>
start()
start(): Promise<void>
Defined in: ridb_core.d.ts:259
Returns
Promise<void>
Overrides
write()
write(op): Promise<Doc<Schemas[keyof Schemas]>>
Defined in: ridb_core.d.ts:264
Parameters
op
Operation<Schemas[keyof Schemas]>
Returns
Promise<Doc<Schemas[keyof Schemas]>>
Overrides
create()
static create<SchemasCreate>(dbName, schemas, options?): Promise<BaseStorage<SchemasCreate>>
Defined in: ridb_core.d.ts:241
Type Parameters
SchemasCreate
SchemasCreate extends SchemaTypeRecord
Parameters
dbName
string
schemas
SchemasCreate
options?
Returns
Promise<BaseStorage<SchemasCreate>>