blob: 2e3dd84d7e9bd7fe8fe53691e2bed42941a02505 (
about) (
plain)
1
2
3
4
5
6
7
|
"""Functions and utilities to use when generating queries"""
def mapping_to_query_columns(mapping_dict: dict[str, str]) -> tuple[str, ...]:
"""
Internal function to convert mapping dicts into column clauses for queries.
"""
return tuple(f"{tcol} as {dcol}" for dcol, tcol in mapping_dict.items())
|