tdfs4ds.feature_props.store¶
tdfs4ds.feature_props.store
¶
Storage of feature properties: two optional objects, created by the FIRST declaration.
FS_FEATURE_PROPERTIES(valid time, PI DATA_DOMAIN, ENTITY_NAME, FEATURE_NAME) + viewFS_V_FEATURE_PROPERTIES: one row per feature (and optionally per process), every property a nullable column; NULL = "no rule", never a default.FS_FEATURE_ALLOWED_VALUES(valid time, same key + PROCESS_ID, ALLOWED_VALUE) + view.
Nothing here runs unless a feature property is declared: setup() and connect() never
create these tables (connect() only notes whether they exist, from the read it already makes).
Every builder is pure; create_tables is the only writer.
PROPERTY_COLUMNS
module-attribute
¶
PROPERTY_COLUMNS = ['DATA_DOMAIN', 'ENTITY_NAME', 'FEATURE_NAME', 'PROCESS_ID', 'VALID_MIN', 'VALID_MAX', 'NULLABLE', 'NULL_MEANING', 'SENSITIVE', 'SENSITIVITY_REASON', 'AUTHOR', 'DB_USER']
_TABLE_OPTIONS
module-attribute
¶
_TABLE_OPTIONS = 'FALLBACK,\n NO BEFORE JOURNAL,\n NO AFTER JOURNAL,\n CHECKSUM = DEFAULT,\n DEFAULT MERGEBLOCKRATIO'
_VALID
module-attribute
¶
_VALID = 'ValidStart TIMESTAMP(0) WITH TIME ZONE NOT NULL,\n ValidEnd TIMESTAMP(0) WITH TIME ZONE NOT NULL,\n PERIOD FOR ValidPeriod (ValidStart, ValidEnd) AS VALIDTIME'
sql_literal
¶
Escape value for use inside a single-quoted SQL string literal.
For the DBC probes and catalog predicates that compare a name as data
(WHERE DatabaseName = '…'). The caller supplies the surrounding quotes.
entity_text
¶
The ENTITY_NAME text of the feature catalog: the entity columns, upper-cased, sorted.
object_specs
¶
[(label, create, follow_up)] of the two objects, tables before views.
create_tables
¶
Create the two objects when missing (idempotent). Returns the labels created. Raises the database error of a real failure; marks the properties as present.
qualifier
¶
CURRENT VALIDTIME or VALIDTIME AS OF TIMESTAMP '...' (the literal body).
properties_read_sql
¶
catalog_read_sql
¶
The registered features with their stored type and storage table (primary store).
upsert_sql
¶
Declare (or replace) the properties of one feature: the current row is closed at the
current valid time and a new one opened (CURRENT VALIDTIME UPDATE ... ELSE INSERT).
Every column is named; a property absent from decl is NULL = no rule.
end_rows_sql
¶
Statements ending the declared properties and allowed values of removed features
([(feature, data_domain, entity_text)]). The valid-time history keeps what was declared:
only the current rows end.
count_rows_sql
¶
Current property rows of features ([(feature, data_domain, entity_text)]).