(dbClient: Knex, options: CleanDbOptions)
| 173 | } |
| 174 | |
| 175 | const getMatchingEventsCount = async (dbClient: Knex, options: CleanDbOptions): Promise<number> => { |
| 176 | const query = dbClient('events') |
| 177 | |
| 178 | if (!options.all) { |
| 179 | applySelectiveFilters(query, options) |
| 180 | } |
| 181 | |
| 182 | const result = await query.count<{ count: string | number }>('* as count').first() |
| 183 | return Number(result?.count ?? 0) |
| 184 | } |
| 185 | |
| 186 | const askForConfirmation = async (): Promise<boolean> => { |
| 187 | const readline = createInterface({ |
no test coverage detected