radb.typesys module¶
- class radb.typesys.AttrSpec(rel: Optional[str], name: Optional[str], type: radb.utils.ValType)[source]¶
Bases:
radb.utils.CustomJSONSerializable
Specification of an attribute in a
RelType
. See Relation Schema and Attribute References for an overview.Construct a
AttrSpec
, given the name of the relation where the attribute originally comes from (optional), the name of the attribute (optional), and the type of the attribute.- can_be_confused_with(other: radb.typesys.AttrSpec)[source]¶
Check if this
AttrSpec
can be potentially confused with another one, if both are presented as possibilities when resolving anAttrRef
.
- class radb.typesys.FuncSpec(name: str, is_aggr: bool, outtype: radb.utils.ValType, required_argtypes: List[radb.utils.ValType], optional_argtypes: List[radb.utils.ValType], no_max_argc: bool = False)[source]¶
Bases:
object
Specification (i.e., signature) of a built-in function. See Operators and Functions and Type Checking for an overview.
Create a function specification. The function is an aggregate function if is_aggr is True. If no_max_argc is True, the function can take an arbitrary number of additional arguments; in that case, optional_argtypes must not be empty, and its last element will be used as the type for additional arguments.
- static from_config_line(line: str)[source]¶
Construct a
FuncSpec
object from a line. See Specification of Built-in Functions for the specification format.