Skip to content

ema / @internals/db / ConversationMessageDB

Interface: ConversationMessageDB

Defined in: db/base.ts:318

Interface for conversation message database operations

Methods

addConversationMessage()

ts
addConversationMessage(entity): Promise<number>;

Defined in: db/base.ts:339

inserts a conversation message in the database

Parameters

entity

ConversationMessageEntity

The conversation message to add

Returns

Promise<number>

Promise resolving to the ID of the created message


deleteConversationMessage()

ts
deleteConversationMessage(id): Promise<boolean>;

Defined in: db/base.ts:346

deletes a conversation message from the database

Parameters

id

number

The unique identifier for the conversation message to delete

Returns

Promise<boolean>

Promise resolving to true if deleted, false if not found


getConversationMessage()

ts
getConversationMessage(id): Promise<ConversationMessageEntity | null>;

Defined in: db/base.ts:332

gets a conversation message by id

Parameters

id

number

The unique identifier for the conversation message

Returns

Promise<ConversationMessageEntity | null>

Promise resolving to the conversation message data or null if not found


listConversationMessages()

ts
listConversationMessages(req): Promise<ConversationMessageEntity[]>;

Defined in: db/base.ts:323

lists conversation messages in the database

Parameters

req

ListConversationMessagesRequest

Returns

Promise<ConversationMessageEntity[]>

Promise resolving to an array of conversation message data