Home Reference Source
public class | source

InterfaceSatoshminDB

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

db: *

public

dbName: *

Method Summary

Public Methods
public

close()

public

get(key: *, timeout: number, freeze: boolean): *

public

async remove(key: *): *

public

async restart()

public

async save(key: *, value: *, timeout: *, trials: number): *

public

sleep(ms: *): *

Private Methods
private

async _createDocument(key: *, value: *): *

private

async _deleteDocument(key: *): *

private
private
private

async _getDocument(key: *): *

private

_save(key: *, value: *): *

private

async _saveDocumentAttachment(key: *, value: *): *

private

_start()

private

async _updateDocument(key: *, value: *): boolean

private

async _updateDocumentAttachment(key: *, value: *): boolean

Public Constructors

public constructor() source

Public Members

public db: * source

public dbName: * source

Public Methods

public close() source

public get(key: *, timeout: number, freeze: boolean): * source

Params:

NameTypeAttributeDescription
key *
timeout number
  • optional
  • default: 7000
freeze boolean
  • optional
  • default: false

Return:

*

public async remove(key: *): * source

Params:

NameTypeAttributeDescription
key *

Return:

*

public async restart() source

public async save(key: *, value: *, timeout: *, trials: number): * source

Params:

NameTypeAttributeDescription
key *
value *
timeout *
trials number
  • optional
  • default: 10

Return:

*

public sleep(ms: *): * source

Params:

NameTypeAttributeDescription
ms *

Return:

*

Private Methods

private async _createDocument(key: *, value: *): * source

Params:

NameTypeAttributeDescription
key *
value *

Return:

*

private async _deleteDocument(key: *): * source

Params:

NameTypeAttributeDescription
key *

Return:

*

private async _deleteDocumentAttachment(key: *): boolean source

Params:

NameTypeAttributeDescription
key *

Return:

boolean

private async _deleteDocumentAttachmentIfExist(key: *): boolean source

Params:

NameTypeAttributeDescription
key *

Return:

boolean

private async _getDocument(key: *): * source

Params:

NameTypeAttributeDescription
key *

Return:

*

private _save(key: *, value: *): * source

Params:

NameTypeAttributeDescription
key *
value *

Return:

*

private async _saveDocumentAttachment(key: *, value: *): * source

Params:

NameTypeAttributeDescription
key *
value *

Return:

*

private _start() source

private async _updateDocument(key: *, value: *): boolean source

Params:

NameTypeAttributeDescription
key *
value *

Return:

boolean

private async _updateDocumentAttachment(key: *, value: *): boolean source

Params:

NameTypeAttributeDescription
key *
value *

Return:

boolean