sqlite_type_helper.py 文件源码

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

项目:PlasoScaffolder 作者: ClaudiaSaxer 项目源码 文件源码
def _IsPrefixedWithoutAlias(self, query: str, tables: [str],
                              column_name: str) -> bool:
    """If the column has a table prefixed and has an no alias

    Args:
      query (str): the query to parse
      tables ([str]): the possible tables
      column_name (str): the column name

    Returns:
      bool: True if it is prefixed, false if it isn't.
    """
    matches = [
        re.fullmatch(
            '.*({0}.{1})+([^ ])*( ,)*.*'.format(table, column_name), query)
        for table in tables if re.fullmatch(
            '.*({0}.{1})+([^ ])*( ,)*.*'.format(
                table, column_name), query) is not None]
    return len(matches) != 0
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号