( trx: DbOrTx, tableId: string, groupIds: Iterable<string> )
| 334 | * in their own transaction. |
| 335 | */ |
| 336 | export async function stripGroupExecutions( |
| 337 | trx: DbOrTx, |
| 338 | tableId: string, |
| 339 | groupIds: Iterable<string> |
| 340 | ): Promise<void> { |
| 341 | const ids = Array.from(new Set(groupIds)) |
| 342 | if (ids.length === 0) return |
| 343 | await trx |
| 344 | .delete(tableRowExecutions) |
| 345 | .where( |
| 346 | and(eq(tableRowExecutions.tableId, tableId), inArray(tableRowExecutions.groupId, ids)) as SQL |
| 347 | ) |
| 348 | } |
no test coverage detected