def make_sql_clause(s, constructor): if not isinstance(s, ex.ClauseElement): return constructor(s) else: return s