Skip to main content

Function: inSubtree()

inSubtree(pathColumn, scope): Expression<SqlBool>

Defined in: packages/persistence/src/scoped.ts:119

The subtree rule as a SQL predicate: the row's path equals the scope's path or lies beneath it, by whole segment (/a/b does not reach /a/bc). For a service's own queries; the table repository applies it to every statement.

Parameters​

pathColumn​

string

The column holding the row's path.

scope​

Scope

The tenant scope. A platform scope does not compile here.

Returns​

Expression<SqlBool>

A predicate for where.