Merging upstream version 10.5.6.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
3b8c9606bf
commit
599f59b0f8
39 changed files with 786 additions and 133 deletions
|
@ -10,7 +10,7 @@ from sqlglot.dialects.dialect import (
|
|||
no_paren_current_date_sql,
|
||||
no_tablesample_sql,
|
||||
no_trycast_sql,
|
||||
strposition_to_local_sql,
|
||||
strposition_to_locate_sql,
|
||||
)
|
||||
from sqlglot.helper import seq_get
|
||||
from sqlglot.tokens import TokenType
|
||||
|
@ -122,6 +122,8 @@ class MySQL(Dialect):
|
|||
|
||||
KEYWORDS = {
|
||||
**tokens.Tokenizer.KEYWORDS,
|
||||
"MEDIUMTEXT": TokenType.MEDIUMTEXT,
|
||||
"LONGTEXT": TokenType.LONGTEXT,
|
||||
"START": TokenType.BEGIN,
|
||||
"SEPARATOR": TokenType.SEPARATOR,
|
||||
"_ARMSCII8": TokenType.INTRODUCER,
|
||||
|
@ -442,7 +444,7 @@ class MySQL(Dialect):
|
|||
exp.Trim: _trim_sql,
|
||||
exp.NullSafeEQ: lambda self, e: self.binary(e, "<=>"),
|
||||
exp.NullSafeNEQ: lambda self, e: self.not_sql(self.binary(e, "<=>")),
|
||||
exp.StrPosition: strposition_to_local_sql,
|
||||
exp.StrPosition: strposition_to_locate_sql,
|
||||
}
|
||||
|
||||
ROOT_PROPERTIES = {
|
||||
|
@ -454,6 +456,10 @@ class MySQL(Dialect):
|
|||
exp.LikeProperty,
|
||||
}
|
||||
|
||||
TYPE_MAPPING = generator.Generator.TYPE_MAPPING.copy()
|
||||
TYPE_MAPPING.pop(exp.DataType.Type.MEDIUMTEXT)
|
||||
TYPE_MAPPING.pop(exp.DataType.Type.LONGTEXT)
|
||||
|
||||
WITH_PROPERTIES: t.Set[t.Type[exp.Property]] = set()
|
||||
|
||||
def show_sql(self, expression):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue