MCPcopy
hub / github.com/remix-run/remix / count

Method count

packages/data-table/src/lib/database.ts:595–606  ·  view source on GitHub ↗
(
    table: table,
    options?: CountOptions<table>,
  )

Source from the content-addressed store, hash-verified

593 }
594
595 async count<table extends AnyTable>(
596 table: table,
597 options?: CountOptions<table>,
598 ): Promise<number> {
599 let query: QueryForTable<table> = this.query(asQueryTableInput(table))
600
601 if (options?.where) {
602 query = query.where(options.where)
603 }
604
605 return query.count()
606 }
607
608 async update<
609 table extends AnyTable,

Callers

nothing calls this directly

Calls 4

queryMethod · 0.95
asQueryTableInputFunction · 0.90
whereMethod · 0.80
countMethod · 0.65

Tested by

no test coverage detected