1
0
Fork 0

Merging upstream version 24.1.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 21:37:09 +01:00
parent 9689eb837b
commit d5706efe6b
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
70 changed files with 55134 additions and 50721 deletions

View file

@ -25,6 +25,17 @@ if t.TYPE_CHECKING:
logger = logging.getLogger("sqlglot")
UNESCAPED_SEQUENCES = {
"\\a": "\a",
"\\b": "\b",
"\\f": "\f",
"\\n": "\n",
"\\r": "\r",
"\\t": "\t",
"\\v": "\v",
"\\\\": "\\",
}
class Dialects(str, Enum):
"""Dialects supported by SQLGLot."""
@ -145,14 +156,7 @@ class _Dialect(type):
if "\\" in klass.tokenizer_class.STRING_ESCAPES:
klass.UNESCAPED_SEQUENCES = {
"\\a": "\a",
"\\b": "\b",
"\\f": "\f",
"\\n": "\n",
"\\r": "\r",
"\\t": "\t",
"\\v": "\v",
"\\\\": "\\",
**UNESCAPED_SEQUENCES,
**klass.UNESCAPED_SEQUENCES,
}