Skip to content

tdfs4ds.feature_props.state

tdfs4ds.feature_props.state

Is the feature-properties machinery present in this store? (no statement on the run path)

PRESENT is the module flag: True / False once known, None while unknown. It is set, without any statement, from the single DBC read connect() already makes (:func:set_from_tables), set True by the first declaration and reset by setup(). present() answers from the flag and, only while it is unknown (a session that never called connect()), makes ONE read of DBC per store, cached. The flag follows the store: switching tdfs4ds.SCHEMA makes it unknown again.

PRESENT module-attribute

PRESENT: Optional[bool] = None

_PRESENT_FOR module-attribute

_PRESENT_FOR: Optional[str] = None

sql_literal

sql_literal(value)

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.

properties_table

properties_table() -> str

store_key

store_key() -> Optional[str]

reset

reset() -> None

Forget what is known (setup(), tests): the next present() reads DBC once.

set_present

set_present(value: Optional[bool]) -> None

set_from_tables

set_from_tables(tables) -> bool

Set the flag from the object names connect() read from DBC (no statement).

present

present(read: bool = True) -> bool

Whether the properties table exists in the primary store. Answers from the flag; reads DBC once (cached) only while the flag is unknown and read is true. Fail-closed: an unreadable DBC is 'absent'.