BaseDatabase Class
Classes
Section titled “Classes”abstract BaseDatabase
Section titled “abstract BaseDatabase”Defined in: databases/base.database.ts:6
Base class for database adapters that provide persistent string key-value storage
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BaseDatabase(): BaseDatabase;Returns
Section titled “Returns”Methods
Section titled “Methods”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
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
key | string |
Returns
Section titled “Returns”Promise<string | null>
initialize()
Section titled “initialize()”abstract initialize(): Promise<void>;Defined in: databases/base.database.ts:11
Initializes the database Creates necessary files, tables, or connections
Returns
Section titled “Returns”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.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
options | { content: string; key: string; source?: BaseSource; } | |
options.content | string | The new content to store. |
options.key | string | Unique identifier for the content. |
options.source? | BaseSource | (Optional) Provide source instance to commit the change. |
Returns
Section titled “Returns”Promise<void>