Skip to content

ema / @internals/db / ActorDB

Interface: ActorDB

Defined in: db/base.ts:104

Interface for actor database operations

Methods

deleteActor()

ts
deleteActor(id): Promise<boolean>;

Defined in: db/base.ts:130

deletes an actor from the database

Parameters

id

number

The unique identifier for the actor to delete

Returns

Promise<boolean>

Promise resolving to true if deleted, false if not found


getActor()

ts
getActor(id): Promise<ActorEntity | null>;

Defined in: db/base.ts:116

gets an actor by id

Parameters

id

number

The unique identifier for the actor

Returns

Promise<ActorEntity | null>

Promise resolving to the actor data or null if not found


listActors()

ts
listActors(): Promise<ActorEntity[]>;

Defined in: db/base.ts:109

lists actors in the database

Returns

Promise<ActorEntity[]>

Promise resolving to an array of actor data


upsertActor()

ts
upsertActor(entity): Promise<number>;

Defined in: db/base.ts:123

inserts or updates an actor in the database

Parameters

entity

ActorEntity

The actor data to upsert

Returns

Promise<number>

Promise resolving to the ID of the created or updated actor