(sessionId: string)
| 22 | } |
| 23 | |
| 24 | function createPluginQueryExecutor(sessionId: string): AsyncSqlExecutor { |
| 25 | const adapter = getDataAdapter() |
| 26 | return { |
| 27 | all<T>(sql: string, params: unknown[] = []): Promise<T[]> { |
| 28 | return adapter.pluginQuery<T>(sessionId, sql, params) |
| 29 | }, |
| 30 | async get<T>(sql: string, params: unknown[] = []): Promise<T | undefined> { |
| 31 | const rows = await adapter.pluginQuery<T>(sessionId, sql, params) |
| 32 | return rows[0] |
| 33 | }, |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | export class FetchMessageAdapter implements MessageAdapter { |
| 38 | async getMessagesBefore( |
no test coverage detected