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
sqlite_type_helper.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录