def core_result_type(selectable, s):
    """Given a SQLAlchemy Core selectable and a connection/session, get the
    type constructor for the result row type."""
    result_proxy = s.execute(selectable.limit(0))
    return result_proxy._row_getter