Skip to content

Latest commit

 

History

History
291 lines (166 loc) · 5.5 KB

DatabaseManager.md

File metadata and controls

291 lines (166 loc) · 5.5 KB

opfsdb / Exports / DatabaseManager

Class: DatabaseManager

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new DatabaseManager(): DatabaseManager

Returns

DatabaseManager

Defined in

lib/DatabaseManager.ts:19

Properties

commandHandlers

Private commandHandlers: Record<string, <CMD>(command: CMD) => Promise<void | any[] | string[]>>

Defined in

lib/DatabaseManager.ts:76


tables

Private tables: Record<string, OPFSDB<any>> = {}

Defined in

lib/DatabaseManager.ts:17

Methods

createTable

createTable(«destructured»): Promise<void>

Parameters

Name Type
«destructured» ICreateTableInput

Returns

Promise<void>

Defined in

lib/DatabaseManager.ts:21


delete

delete(«destructured»): Promise<void>

Parameters

Name Type
«destructured» IDeleteInput

Returns

Promise<void>

Defined in

lib/DatabaseManager.ts:40


drop

drop(«destructured»): Promise<void>

Parameters

Name Type
«destructured» IDropInput

Returns

Promise<void>

Defined in

lib/DatabaseManager.ts:52


executeCommand

executeCommand<T>(command): Promise<void | string[] | T[]>

Type parameters

Name Type
T extends IBasicRecord

Parameters

Name Type
command ICommandInputs<T>

Returns

Promise<void | string[] | T[]>

Defined in

lib/DatabaseManager.ts:63


import

import<T>(«destructured»): Promise<void>

Type parameters

Name Type
T extends IBasicRecord

Parameters

Name Type
«destructured» IImportInput<T>

Returns

Promise<void>

Defined in

lib/DatabaseManager.ts:36


insert

insert<T>(«destructured»): Promise<void>

Type parameters

Name Type
T extends IBasicRecord

Parameters

Name Type
«destructured» IInsertInput<T>

Returns

Promise<void>

Defined in

lib/DatabaseManager.ts:32


query

query<T>(input): Promise<string[] | T[]>

Type parameters

Name
T

Parameters

Name Type
input IQueryInput<IBasicRecord>

Returns

Promise<string[] | T[]>

Defined in

lib/DatabaseManager.ts:28


read

read<T>(«destructured»): Promise<T[]>

Type parameters

Name
T

Parameters

Name Type
«destructured» IReadInput

Returns

Promise<T[]>

Defined in

lib/DatabaseManager.ts:44


readMany

readMany<T>(«destructured»): Promise<T[]>

Type parameters

Name
T

Parameters

Name Type
«destructured» IReadManyInput

Returns

Promise<T[]>

Defined in

lib/DatabaseManager.ts:48


unloadTables

unloadTables(): Promise<void>

Returns

Promise<void>

Defined in

lib/DatabaseManager.ts:58