Skip to content

Scoped report helpers

View as Markdown

scopedRows() and request row-security guards from @sapporta/server and generated project auth.

  • Use scopedRows() for table-shaped reads before mapping a report.
  • Use auth.rowSecurity.forTable(table) to build predicates and trusted values for custom Drizzle reads.
  • Construct guards for each joined table and against the active database or transaction handle.
  • Scope base rows before grouping and aggregation; the mapper remains auth-free.