loom.core.model.scoped¶
Marker and descriptors for tables whose rows are scoped by a column value.
Functions
|
The registered tables that stand for a model table. |
Classes
Mark a model as row-scoped; adds no column. |
|
|
One scoped column: which scope, which column, and how far it reaches. |
|
A compiled scoped table: its scopes, the privileges it grants and its partition column. |
- class loom.core.model.scoped.RowScoped[source]¶
Bases:
objectMark a model as row-scoped; adds no column.
The product names the scope on one of the model’s columns with
ColumnField(scope=...). A read-only scoped table narrows__scope_privileges__to{Privilege.SELECT}.
- class loom.core.model.scoped.ScopeColumn(scope, column, on, elevable)[source]¶
Bases:
objectOne scoped column: which scope, which column, and how far it reaches.
- class loom.core.model.scoped.ScopedTable(schema, name, scopes, privileges, partition_by=None)[source]¶
Bases:
objectA compiled scoped table: its scopes, the privileges it grants and its partition column.
partition_bynames the column a range-partitioned table is partitioned by,Nonefor a plain table.
- loom.core.model.scoped.registered_model_tables(registered, scoped)[source]¶
The registered tables that stand for a model table.
registeredmaps each table the guard registered to the table it is a partition of, orNone. A partition of a partitioned scoped table is not in the model and stands for its parent, so it is left out; every other registered table is kept.