def property_quote_if(alias, name):
    """
    Make a property reference, escaping it if necessary
    :param alias: object alias
    :param name: property name
    :return: property reference
    :rtype: str
    """
    if ' ' in name:
        # This syntax is useful to escape a property that contains spaces, special characters, or has the same name as a
        # SQL keyword or reserved word.
        prop = f'["{name}"]'
    else:
        prop = f'.{name}'
    return f'{alias}{prop}'