Skip to main content

Module util

Module util 

Source

Structsยง

OptionValue
QueryScope ๐Ÿ”’
RelationCollector ๐Ÿ”’

Constantsยง

DATABASE_MATCHER ๐Ÿ”’
DEFAULT_INFO_METRIC ๐Ÿ”’
The table PromQL info reads when its label selector names no info metric.
FIELD_MATCHER ๐Ÿ”’
SCHEMA_MATCHER ๐Ÿ”’

Functionsยง

collect_relations ๐Ÿ”’
extract_metric_name_from_vector_selector ๐Ÿ”’
extract_tables_from_hybrid_cte_query ๐Ÿ”’
extract_tables_from_prom_expr ๐Ÿ”’
extract_tables_from_prom_expr_checked
Extracts all tables referenced by a [PromExpr], returning None if any table reference cannot be resolved statically.
extract_tables_from_prom_expr_partial
Extracts the tables referenced by a [PromExpr] that can be resolved statically, ignoring the ones that cannot.
extract_tables_from_query
Walk through a Query and extract all the tables referenced in it.
extract_tables_from_query_ast ๐Ÿ”’
extract_tables_from_query_checked
Walk through a Query and extract its referenced tables, returning None if any table reference cannot be resolved statically.
extract_tables_from_query_inner ๐Ÿ”’
extract_tables_from_sql_or_tql ๐Ÿ”’
extract_tables_from_sql_query ๐Ÿ”’
Helper function for extract_tables_from_query.
extract_tables_from_statement ๐Ÿ”’
extract_tables_from_statement_checked
Walks through a Statement and extracts all referenced tables, returning None if any table reference cannot be resolved statically.
extract_tables_from_tql ๐Ÿ”’
format_raw_object_name
Format an ObjectName without any quote of its idents.
location_to_index
translate the start location to the index in the sql string
metadata_table_name ๐Ÿ”’
parse_option_string
reads_default_info_metric
Whether labels, the second argument of PromQL info, selects the default info metric in the current schema: data label matchers only, with no name, modifier or or.
remove_cte_names ๐Ÿ”’