MCPcopy Index your code
hub / github.com/cameri/nostream / getMatchingEventsCount

Function getMatchingEventsCount

src/clean-db.ts:175–184  ·  view source on GitHub ↗
(dbClient: Knex, options: CleanDbOptions)

Source from the content-addressed store, hash-verified

173}
174
175const 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
186const askForConfirmation = async (): Promise<boolean> => {
187 const readline = createInterface({

Callers 1

runCleanDbFunction · 0.85

Calls 1

applySelectiveFiltersFunction · 0.85

Tested by

no test coverage detected