count_rows_handler

Function count_rows_handler 

Source
pub async fn count_rows_handler<DB: DatabaseProvider>(
    __arg0: State<Arc<DB>>,
    __arg1: Path<String>,
    __arg2: Query<RowQuery>,
) -> Response
Expand description

Handler for GET /api/tables/:name/count

Returns the total row count for a table (with optional filters applied).

Query parameters:

  • filtercolumn: Filter value for specific column (same as get_rows_handler)

§Arguments

  • database - Database provider from state
  • table_name - Name of the table to count rows from
  • query - Query parameters (filters only, other fields ignored)

§Returns

JSON response containing the total row count