base.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:clickhouse-sqlalchemy 作者: xzkostyan 项目源码 文件源码
def visit_join(self, join, asfrom=False, **kwargs):
        join_type = " "

        if join.global_:
            join_type += "GLOBAL "

        if join.any:
            join_type += "ANY "

        if join.all:
            join_type += "ALL "

        if join.isouter:
            join_type += "LEFT OUTER JOIN "
        else:
            join_type += "INNER JOIN "

        if not isinstance(join.onclause, elements.Tuple):
            raise exc.CompileError(
                "Only tuple elements are supported. "
                "Got: %s" % type(join.onclause)
            )

        return (
            join.left._compiler_dispatch(self, asfrom=True, **kwargs) +
            join_type +
            join.right._compiler_dispatch(self, asfrom=True, **kwargs) +
            " USING " + join.onclause._compiler_dispatch(self, **kwargs)
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号