Skip to content

BaseDatabase Class

Defined in: databases/base.database.ts:6

Base class for database adapters that provide persistent string key-value storage

new BaseDatabase(): BaseDatabase;

BaseDatabase

abstract get(key): Promise<string | null>;

Defined in: databases/base.database.ts:16

Gets content for a specific key or null if key not found

ParameterType
keystring

Promise<string | null>

abstract initialize(): Promise<void>;

Defined in: databases/base.database.ts:11

Initializes the database Creates necessary files, tables, or connections

Promise<void>

abstract set(options): Promise<void>;

Defined in: databases/base.database.ts:25

Sets content for a specific key, entirely replacing any existing data.

ParameterTypeDescription
options{ content: string; key: string; source?: BaseSource; }
options.contentstringThe new content to store.
options.keystringUnique identifier for the content.
options.source?BaseSource(Optional) Provide source instance to commit the change.

Promise<void>