@staticmethod
def _pg_cast(enum):
    """
        Returns a function to cast a SQL enum to the enumeration type
        corresponding to `enum`. Namely, `enum` should be a member of
        `nfldb.Enums`.
        """
    return lambda sqlv, _: None if not sqlv else enum[sqlv]
