Special case the lone asterisk fragment in mysql
This commit is contained in:
parent
d36c38c35e
commit
9a77aefc33
1 changed files with 9 additions and 1 deletions
|
@ -117,4 +117,12 @@ def mysql_quote_identifier(identifier, id_type):
|
||||||
identifier_fragments = _identifier_parse(identifier, quote_char='`')
|
identifier_fragments = _identifier_parse(identifier, quote_char='`')
|
||||||
if len(identifier_fragments) > _MYSQL_IDENTIFIER_TO_DOT_LEVEL[id_type]:
|
if len(identifier_fragments) > _MYSQL_IDENTIFIER_TO_DOT_LEVEL[id_type]:
|
||||||
raise SQLParseError('MySQL does not support %s with more than %i dots' % (id_type, _MYSQL_IDENTIFIER_TO_DOT_LEVEL[id_type]))
|
raise SQLParseError('MySQL does not support %s with more than %i dots' % (id_type, _MYSQL_IDENTIFIER_TO_DOT_LEVEL[id_type]))
|
||||||
return '.'.join(identifier_fragments)
|
|
||||||
|
special_cased_fragments = []
|
||||||
|
for fragment in identifier_fragments:
|
||||||
|
if fragment == '`*`':
|
||||||
|
special_cased_fragments.append('*')
|
||||||
|
else:
|
||||||
|
special_cased_fragments.append(fragment)
|
||||||
|
|
||||||
|
return '.'.join(special_cased_fragments)
|
||||||
|
|
Loading…
Reference in a new issue