Appearance
ema / @internals/db / ConversationMessageDB
Interface: ConversationMessageDB
Defined in: packages/ema/src/db/base.ts:368
Interface for conversation message database operations
Methods
addConversationMessage()
ts
addConversationMessage(entity): Promise<number>;Defined in: packages/ema/src/db/base.ts:396
inserts a conversation message in the database
Parameters
entity
The conversation message to add
Returns
Promise<number>
Promise resolving to the ID of the created message
countConversationMessages()
ts
countConversationMessages(conversationId): Promise<number>;Defined in: packages/ema/src/db/base.ts:382
counts conversation messages in the database
Parameters
conversationId
number
The conversation ID to count messages for
Returns
Promise<number>
Promise resolving to the number of matching messages
deleteConversationMessage()
ts
deleteConversationMessage(id): Promise<boolean>;Defined in: packages/ema/src/db/base.ts:403
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: packages/ema/src/db/base.ts:389
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: packages/ema/src/db/base.ts:373
lists conversation messages in the database
Parameters
req
ListConversationMessagesRequest
Returns
Promise<ConversationMessageEntity[]>
Promise resolving to an array of conversation message data