sqlglot.dialects.oracle
1from __future__ import annotations 2 3import typing as t 4 5from sqlglot import exp, generator, parser, tokens, transforms 6from sqlglot.dialects.dialect import Dialect, no_ilike_sql, rename_func, trim_sql 7from sqlglot.helper import csv 8from sqlglot.tokens import TokenType 9 10PASSING_TABLE_ALIAS_TOKENS = parser.Parser.TABLE_ALIAS_TOKENS - { 11 TokenType.COLUMN, 12 TokenType.RETURNING, 13} 14 15 16def _limit_sql(self, expression): 17 return self.fetch_sql(exp.Fetch(direction="FIRST", count=expression.expression)) 18 19 20def _parse_xml_table(self) -> exp.XMLTable: 21 this = self._parse_string() 22 23 passing = None 24 columns = None 25 26 if self._match_text_seq("PASSING"): 27 # The BY VALUE keywords are optional and are provided for semantic clarity 28 self._match_text_seq("BY", "VALUE") 29 passing = self._parse_csv( 30 lambda: self._parse_table(alias_tokens=PASSING_TABLE_ALIAS_TOKENS) 31 ) 32 33 by_ref = self._match_text_seq("RETURNING", "SEQUENCE", "BY", "REF") 34 35 if self._match_text_seq("COLUMNS"): 36 columns = self._parse_csv(lambda: self._parse_column_def(self._parse_field(any_token=True))) 37 38 return self.expression( 39 exp.XMLTable, 40 this=this, 41 passing=passing, 42 columns=columns, 43 by_ref=by_ref, 44 ) 45 46 47class Oracle(Dialect): 48 # https://docs.oracle.com/database/121/SQLRF/sql_elements004.htm#SQLRF00212 49 # https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes 50 time_mapping = { 51 "AM": "%p", # Meridian indicator with or without periods 52 "A.M.": "%p", # Meridian indicator with or without periods 53 "PM": "%p", # Meridian indicator with or without periods 54 "P.M.": "%p", # Meridian indicator with or without periods 55 "D": "%u", # Day of week (1-7) 56 "DAY": "%A", # name of day 57 "DD": "%d", # day of month (1-31) 58 "DDD": "%j", # day of year (1-366) 59 "DY": "%a", # abbreviated name of day 60 "HH": "%I", # Hour of day (1-12) 61 "HH12": "%I", # alias for HH 62 "HH24": "%H", # Hour of day (0-23) 63 "IW": "%V", # Calendar week of year (1-52 or 1-53), as defined by the ISO 8601 standard 64 "MI": "%M", # Minute (0-59) 65 "MM": "%m", # Month (01-12; January = 01) 66 "MON": "%b", # Abbreviated name of month 67 "MONTH": "%B", # Name of month 68 "SS": "%S", # Second (0-59) 69 "WW": "%W", # Week of year (1-53) 70 "YY": "%y", # 15 71 "YYYY": "%Y", # 2015 72 } 73 74 class Parser(parser.Parser): 75 FUNCTIONS = { 76 **parser.Parser.FUNCTIONS, # type: ignore 77 "DECODE": exp.Matches.from_arg_list, 78 } 79 80 FUNCTION_PARSERS: t.Dict[str, t.Callable] = { 81 **parser.Parser.FUNCTION_PARSERS, 82 "XMLTABLE": _parse_xml_table, 83 } 84 85 class Generator(generator.Generator): 86 LOCKING_READS_SUPPORTED = True 87 88 TYPE_MAPPING = { 89 **generator.Generator.TYPE_MAPPING, # type: ignore 90 exp.DataType.Type.TINYINT: "NUMBER", 91 exp.DataType.Type.SMALLINT: "NUMBER", 92 exp.DataType.Type.INT: "NUMBER", 93 exp.DataType.Type.BIGINT: "NUMBER", 94 exp.DataType.Type.DECIMAL: "NUMBER", 95 exp.DataType.Type.DOUBLE: "DOUBLE PRECISION", 96 exp.DataType.Type.VARCHAR: "VARCHAR2", 97 exp.DataType.Type.NVARCHAR: "NVARCHAR2", 98 exp.DataType.Type.TEXT: "CLOB", 99 exp.DataType.Type.BINARY: "BLOB", 100 exp.DataType.Type.VARBINARY: "BLOB", 101 } 102 103 TRANSFORMS = { 104 **generator.Generator.TRANSFORMS, # type: ignore 105 **transforms.UNALIAS_GROUP, # type: ignore 106 exp.ILike: no_ilike_sql, 107 exp.Limit: _limit_sql, 108 exp.Trim: trim_sql, 109 exp.Matches: rename_func("DECODE"), 110 exp.StrToTime: lambda self, e: f"TO_TIMESTAMP({self.sql(e, 'this')}, {self.format_time(e)})", 111 exp.TimeToStr: lambda self, e: f"TO_CHAR({self.sql(e, 'this')}, {self.format_time(e)})", 112 exp.UnixToTime: lambda self, e: f"TO_DATE('1970-01-01','YYYY-MM-DD') + ({self.sql(e, 'this')} / 86400)", 113 exp.Substring: rename_func("SUBSTR"), 114 } 115 116 def query_modifiers(self, expression: exp.Expression, *sqls: str) -> str: 117 return csv( 118 *sqls, 119 *[self.sql(sql) for sql in expression.args.get("joins") or []], 120 self.sql(expression, "match"), 121 *[self.sql(sql) for sql in expression.args.get("laterals") or []], 122 self.sql(expression, "where"), 123 self.sql(expression, "group"), 124 self.sql(expression, "having"), 125 self.sql(expression, "qualify"), 126 self.seg("WINDOW ") + self.expressions(expression, "windows", flat=True) 127 if expression.args.get("windows") 128 else "", 129 self.sql(expression, "distribute"), 130 self.sql(expression, "sort"), 131 self.sql(expression, "cluster"), 132 self.sql(expression, "order"), 133 self.sql(expression, "offset"), # offset before limit in oracle 134 self.sql(expression, "limit"), 135 self.sql(expression, "lock"), 136 sep="", 137 ) 138 139 def offset_sql(self, expression: exp.Offset) -> str: 140 return f"{super().offset_sql(expression)} ROWS" 141 142 def table_sql(self, expression: exp.Table, sep: str = " ") -> str: 143 return super().table_sql(expression, sep=sep) 144 145 def xmltable_sql(self, expression: exp.XMLTable) -> str: 146 this = self.sql(expression, "this") 147 passing = self.expressions(expression, "passing") 148 passing = f"{self.sep()}PASSING{self.seg(passing)}" if passing else "" 149 columns = self.expressions(expression, "columns") 150 columns = f"{self.sep()}COLUMNS{self.seg(columns)}" if columns else "" 151 by_ref = ( 152 f"{self.sep()}RETURNING SEQUENCE BY REF" if expression.args.get("by_ref") else "" 153 ) 154 return f"XMLTABLE({self.sep('')}{self.indent(this + passing + by_ref + columns)}{self.seg(')', sep='')}" 155 156 class Tokenizer(tokens.Tokenizer): 157 KEYWORDS = { 158 **tokens.Tokenizer.KEYWORDS, 159 "COLUMNS": TokenType.COLUMN, 160 "MATCH_RECOGNIZE": TokenType.MATCH_RECOGNIZE, 161 "MINUS": TokenType.EXCEPT, 162 "NVARCHAR2": TokenType.NVARCHAR, 163 "RETURNING": TokenType.RETURNING, 164 "START": TokenType.BEGIN, 165 "TOP": TokenType.TOP, 166 "VARCHAR2": TokenType.VARCHAR, 167 }
48class Oracle(Dialect): 49 # https://docs.oracle.com/database/121/SQLRF/sql_elements004.htm#SQLRF00212 50 # https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes 51 time_mapping = { 52 "AM": "%p", # Meridian indicator with or without periods 53 "A.M.": "%p", # Meridian indicator with or without periods 54 "PM": "%p", # Meridian indicator with or without periods 55 "P.M.": "%p", # Meridian indicator with or without periods 56 "D": "%u", # Day of week (1-7) 57 "DAY": "%A", # name of day 58 "DD": "%d", # day of month (1-31) 59 "DDD": "%j", # day of year (1-366) 60 "DY": "%a", # abbreviated name of day 61 "HH": "%I", # Hour of day (1-12) 62 "HH12": "%I", # alias for HH 63 "HH24": "%H", # Hour of day (0-23) 64 "IW": "%V", # Calendar week of year (1-52 or 1-53), as defined by the ISO 8601 standard 65 "MI": "%M", # Minute (0-59) 66 "MM": "%m", # Month (01-12; January = 01) 67 "MON": "%b", # Abbreviated name of month 68 "MONTH": "%B", # Name of month 69 "SS": "%S", # Second (0-59) 70 "WW": "%W", # Week of year (1-53) 71 "YY": "%y", # 15 72 "YYYY": "%Y", # 2015 73 } 74 75 class Parser(parser.Parser): 76 FUNCTIONS = { 77 **parser.Parser.FUNCTIONS, # type: ignore 78 "DECODE": exp.Matches.from_arg_list, 79 } 80 81 FUNCTION_PARSERS: t.Dict[str, t.Callable] = { 82 **parser.Parser.FUNCTION_PARSERS, 83 "XMLTABLE": _parse_xml_table, 84 } 85 86 class Generator(generator.Generator): 87 LOCKING_READS_SUPPORTED = True 88 89 TYPE_MAPPING = { 90 **generator.Generator.TYPE_MAPPING, # type: ignore 91 exp.DataType.Type.TINYINT: "NUMBER", 92 exp.DataType.Type.SMALLINT: "NUMBER", 93 exp.DataType.Type.INT: "NUMBER", 94 exp.DataType.Type.BIGINT: "NUMBER", 95 exp.DataType.Type.DECIMAL: "NUMBER", 96 exp.DataType.Type.DOUBLE: "DOUBLE PRECISION", 97 exp.DataType.Type.VARCHAR: "VARCHAR2", 98 exp.DataType.Type.NVARCHAR: "NVARCHAR2", 99 exp.DataType.Type.TEXT: "CLOB", 100 exp.DataType.Type.BINARY: "BLOB", 101 exp.DataType.Type.VARBINARY: "BLOB", 102 } 103 104 TRANSFORMS = { 105 **generator.Generator.TRANSFORMS, # type: ignore 106 **transforms.UNALIAS_GROUP, # type: ignore 107 exp.ILike: no_ilike_sql, 108 exp.Limit: _limit_sql, 109 exp.Trim: trim_sql, 110 exp.Matches: rename_func("DECODE"), 111 exp.StrToTime: lambda self, e: f"TO_TIMESTAMP({self.sql(e, 'this')}, {self.format_time(e)})", 112 exp.TimeToStr: lambda self, e: f"TO_CHAR({self.sql(e, 'this')}, {self.format_time(e)})", 113 exp.UnixToTime: lambda self, e: f"TO_DATE('1970-01-01','YYYY-MM-DD') + ({self.sql(e, 'this')} / 86400)", 114 exp.Substring: rename_func("SUBSTR"), 115 } 116 117 def query_modifiers(self, expression: exp.Expression, *sqls: str) -> str: 118 return csv( 119 *sqls, 120 *[self.sql(sql) for sql in expression.args.get("joins") or []], 121 self.sql(expression, "match"), 122 *[self.sql(sql) for sql in expression.args.get("laterals") or []], 123 self.sql(expression, "where"), 124 self.sql(expression, "group"), 125 self.sql(expression, "having"), 126 self.sql(expression, "qualify"), 127 self.seg("WINDOW ") + self.expressions(expression, "windows", flat=True) 128 if expression.args.get("windows") 129 else "", 130 self.sql(expression, "distribute"), 131 self.sql(expression, "sort"), 132 self.sql(expression, "cluster"), 133 self.sql(expression, "order"), 134 self.sql(expression, "offset"), # offset before limit in oracle 135 self.sql(expression, "limit"), 136 self.sql(expression, "lock"), 137 sep="", 138 ) 139 140 def offset_sql(self, expression: exp.Offset) -> str: 141 return f"{super().offset_sql(expression)} ROWS" 142 143 def table_sql(self, expression: exp.Table, sep: str = " ") -> str: 144 return super().table_sql(expression, sep=sep) 145 146 def xmltable_sql(self, expression: exp.XMLTable) -> str: 147 this = self.sql(expression, "this") 148 passing = self.expressions(expression, "passing") 149 passing = f"{self.sep()}PASSING{self.seg(passing)}" if passing else "" 150 columns = self.expressions(expression, "columns") 151 columns = f"{self.sep()}COLUMNS{self.seg(columns)}" if columns else "" 152 by_ref = ( 153 f"{self.sep()}RETURNING SEQUENCE BY REF" if expression.args.get("by_ref") else "" 154 ) 155 return f"XMLTABLE({self.sep('')}{self.indent(this + passing + by_ref + columns)}{self.seg(')', sep='')}" 156 157 class Tokenizer(tokens.Tokenizer): 158 KEYWORDS = { 159 **tokens.Tokenizer.KEYWORDS, 160 "COLUMNS": TokenType.COLUMN, 161 "MATCH_RECOGNIZE": TokenType.MATCH_RECOGNIZE, 162 "MINUS": TokenType.EXCEPT, 163 "NVARCHAR2": TokenType.NVARCHAR, 164 "RETURNING": TokenType.RETURNING, 165 "START": TokenType.BEGIN, 166 "TOP": TokenType.TOP, 167 "VARCHAR2": TokenType.VARCHAR, 168 }
Inherited Members
75 class Parser(parser.Parser): 76 FUNCTIONS = { 77 **parser.Parser.FUNCTIONS, # type: ignore 78 "DECODE": exp.Matches.from_arg_list, 79 } 80 81 FUNCTION_PARSERS: t.Dict[str, t.Callable] = { 82 **parser.Parser.FUNCTION_PARSERS, 83 "XMLTABLE": _parse_xml_table, 84 }
Parser consumes a list of tokens produced by the sqlglot.tokens.Tokenizer
and produces
a parsed syntax tree.
Arguments:
- error_level: the desired error level. Default: ErrorLevel.RAISE
- error_message_context: determines the amount of context to capture from a query string when displaying the error message (in number of characters). Default: 50.
- index_offset: Index offset for arrays eg ARRAY[0] vs ARRAY[1] as the head of a list. Default: 0
- alias_post_tablesample: If the table alias comes after tablesample. Default: False
- max_errors: Maximum number of error messages to include in a raised ParseError. This is only relevant if error_level is ErrorLevel.RAISE. Default: 3
- null_ordering: Indicates the default null ordering method to use if not explicitly set. Options are "nulls_are_small", "nulls_are_large", "nulls_are_last". Default: "nulls_are_small"
Inherited Members
86 class Generator(generator.Generator): 87 LOCKING_READS_SUPPORTED = True 88 89 TYPE_MAPPING = { 90 **generator.Generator.TYPE_MAPPING, # type: ignore 91 exp.DataType.Type.TINYINT: "NUMBER", 92 exp.DataType.Type.SMALLINT: "NUMBER", 93 exp.DataType.Type.INT: "NUMBER", 94 exp.DataType.Type.BIGINT: "NUMBER", 95 exp.DataType.Type.DECIMAL: "NUMBER", 96 exp.DataType.Type.DOUBLE: "DOUBLE PRECISION", 97 exp.DataType.Type.VARCHAR: "VARCHAR2", 98 exp.DataType.Type.NVARCHAR: "NVARCHAR2", 99 exp.DataType.Type.TEXT: "CLOB", 100 exp.DataType.Type.BINARY: "BLOB", 101 exp.DataType.Type.VARBINARY: "BLOB", 102 } 103 104 TRANSFORMS = { 105 **generator.Generator.TRANSFORMS, # type: ignore 106 **transforms.UNALIAS_GROUP, # type: ignore 107 exp.ILike: no_ilike_sql, 108 exp.Limit: _limit_sql, 109 exp.Trim: trim_sql, 110 exp.Matches: rename_func("DECODE"), 111 exp.StrToTime: lambda self, e: f"TO_TIMESTAMP({self.sql(e, 'this')}, {self.format_time(e)})", 112 exp.TimeToStr: lambda self, e: f"TO_CHAR({self.sql(e, 'this')}, {self.format_time(e)})", 113 exp.UnixToTime: lambda self, e: f"TO_DATE('1970-01-01','YYYY-MM-DD') + ({self.sql(e, 'this')} / 86400)", 114 exp.Substring: rename_func("SUBSTR"), 115 } 116 117 def query_modifiers(self, expression: exp.Expression, *sqls: str) -> str: 118 return csv( 119 *sqls, 120 *[self.sql(sql) for sql in expression.args.get("joins") or []], 121 self.sql(expression, "match"), 122 *[self.sql(sql) for sql in expression.args.get("laterals") or []], 123 self.sql(expression, "where"), 124 self.sql(expression, "group"), 125 self.sql(expression, "having"), 126 self.sql(expression, "qualify"), 127 self.seg("WINDOW ") + self.expressions(expression, "windows", flat=True) 128 if expression.args.get("windows") 129 else "", 130 self.sql(expression, "distribute"), 131 self.sql(expression, "sort"), 132 self.sql(expression, "cluster"), 133 self.sql(expression, "order"), 134 self.sql(expression, "offset"), # offset before limit in oracle 135 self.sql(expression, "limit"), 136 self.sql(expression, "lock"), 137 sep="", 138 ) 139 140 def offset_sql(self, expression: exp.Offset) -> str: 141 return f"{super().offset_sql(expression)} ROWS" 142 143 def table_sql(self, expression: exp.Table, sep: str = " ") -> str: 144 return super().table_sql(expression, sep=sep) 145 146 def xmltable_sql(self, expression: exp.XMLTable) -> str: 147 this = self.sql(expression, "this") 148 passing = self.expressions(expression, "passing") 149 passing = f"{self.sep()}PASSING{self.seg(passing)}" if passing else "" 150 columns = self.expressions(expression, "columns") 151 columns = f"{self.sep()}COLUMNS{self.seg(columns)}" if columns else "" 152 by_ref = ( 153 f"{self.sep()}RETURNING SEQUENCE BY REF" if expression.args.get("by_ref") else "" 154 ) 155 return f"XMLTABLE({self.sep('')}{self.indent(this + passing + by_ref + columns)}{self.seg(')', sep='')}"
Generator interprets the given syntax tree and produces a SQL string as an output.
Arguments:
- time_mapping (dict): the dictionary of custom time mappings in which the key represents a python time format and the output the target time format
- time_trie (trie): a trie of the time_mapping keys
- pretty (bool): if set to True the returned string will be formatted. Default: False.
- quote_start (str): specifies which starting character to use to delimit quotes. Default: '.
- quote_end (str): specifies which ending character to use to delimit quotes. Default: '.
- identifier_start (str): specifies which starting character to use to delimit identifiers. Default: ".
- identifier_end (str): specifies which ending character to use to delimit identifiers. Default: ".
- identify (bool): if set to True all identifiers will be delimited by the corresponding character.
- normalize (bool): if set to True all identifiers will lower cased
- string_escape (str): specifies a string escape character. Default: '.
- identifier_escape (str): specifies an identifier escape character. Default: ".
- pad (int): determines padding in a formatted string. Default: 2.
- indent (int): determines the size of indentation in a formatted string. Default: 4.
- unnest_column_only (bool): if true unnest table aliases are considered only as column aliases
- normalize_functions (str): normalize function names, "upper", "lower", or None Default: "upper"
- alias_post_tablesample (bool): if the table alias comes after tablesample Default: False
- unsupported_level (ErrorLevel): determines the generator's behavior when it encounters unsupported expressions. Default ErrorLevel.WARN.
- null_ordering (str): Indicates the default null ordering method to use if not explicitly set. Options are "nulls_are_small", "nulls_are_large", "nulls_are_last". Default: "nulls_are_small"
- max_unsupported (int): Maximum number of unsupported messages to include in a raised UnsupportedError. This is only relevant if unsupported_level is ErrorLevel.RAISE. Default: 3
- leading_comma (bool): if the the comma is leading or trailing in select statements Default: False
- max_text_width: The max number of characters in a segment before creating new lines in pretty mode. The default is on the smaller end because the length only represents a segment and not the true line length. Default: 80
- comments: Whether or not to preserve comments in the output SQL code. Default: True
117 def query_modifiers(self, expression: exp.Expression, *sqls: str) -> str: 118 return csv( 119 *sqls, 120 *[self.sql(sql) for sql in expression.args.get("joins") or []], 121 self.sql(expression, "match"), 122 *[self.sql(sql) for sql in expression.args.get("laterals") or []], 123 self.sql(expression, "where"), 124 self.sql(expression, "group"), 125 self.sql(expression, "having"), 126 self.sql(expression, "qualify"), 127 self.seg("WINDOW ") + self.expressions(expression, "windows", flat=True) 128 if expression.args.get("windows") 129 else "", 130 self.sql(expression, "distribute"), 131 self.sql(expression, "sort"), 132 self.sql(expression, "cluster"), 133 self.sql(expression, "order"), 134 self.sql(expression, "offset"), # offset before limit in oracle 135 self.sql(expression, "limit"), 136 self.sql(expression, "lock"), 137 sep="", 138 )
146 def xmltable_sql(self, expression: exp.XMLTable) -> str: 147 this = self.sql(expression, "this") 148 passing = self.expressions(expression, "passing") 149 passing = f"{self.sep()}PASSING{self.seg(passing)}" if passing else "" 150 columns = self.expressions(expression, "columns") 151 columns = f"{self.sep()}COLUMNS{self.seg(columns)}" if columns else "" 152 by_ref = ( 153 f"{self.sep()}RETURNING SEQUENCE BY REF" if expression.args.get("by_ref") else "" 154 ) 155 return f"XMLTABLE({self.sep('')}{self.indent(this + passing + by_ref + columns)}{self.seg(')', sep='')}"
Inherited Members
- sqlglot.generator.Generator
- Generator
- generate
- unsupported
- sep
- seg
- pad_comment
- maybe_comment
- wrap
- no_identify
- normalize_func
- indent
- sql
- uncache_sql
- cache_sql
- characterset_sql
- column_sql
- columndef_sql
- columnconstraint_sql
- autoincrementcolumnconstraint_sql
- compresscolumnconstraint_sql
- generatedasidentitycolumnconstraint_sql
- notnullcolumnconstraint_sql
- primarykeycolumnconstraint_sql
- uniquecolumnconstraint_sql
- create_sql
- describe_sql
- prepend_ctes
- with_sql
- cte_sql
- tablealias_sql
- bitstring_sql
- hexstring_sql
- datatype_sql
- directory_sql
- delete_sql
- drop_sql
- except_sql
- except_op
- fetch_sql
- filter_sql
- hint_sql
- index_sql
- identifier_sql
- national_sql
- partition_sql
- properties_sql
- root_properties
- properties
- with_properties
- locate_properties
- property_sql
- likeproperty_sql
- fallbackproperty_sql
- journalproperty_sql
- freespaceproperty_sql
- afterjournalproperty_sql
- checksumproperty_sql
- mergeblockratioproperty_sql
- datablocksizeproperty_sql
- blockcompressionproperty_sql
- isolatedloadingproperty_sql
- lockingproperty_sql
- withdataproperty_sql
- insert_sql
- intersect_sql
- intersect_op
- introducer_sql
- pseudotype_sql
- rowformatdelimitedproperty_sql
- tablesample_sql
- pivot_sql
- tuple_sql
- update_sql
- values_sql
- var_sql
- into_sql
- from_sql
- group_sql
- having_sql
- join_sql
- lambda_sql
- lateral_sql
- limit_sql
- lock_sql
- literal_sql
- loaddata_sql
- null_sql
- boolean_sql
- order_sql
- cluster_sql
- distribute_sql
- sort_sql
- ordered_sql
- matchrecognize_sql
- select_sql
- schema_sql
- star_sql
- structkwarg_sql
- parameter_sql
- sessionparameter_sql
- placeholder_sql
- subquery_sql
- qualify_sql
- union_sql
- union_op
- unnest_sql
- where_sql
- window_sql
- partition_by_sql
- window_spec_sql
- withingroup_sql
- between_sql
- bracket_sql
- all_sql
- any_sql
- exists_sql
- case_sql
- constraint_sql
- extract_sql
- trim_sql
- concat_sql
- check_sql
- foreignkey_sql
- primarykey_sql
- unique_sql
- if_sql
- in_sql
- in_unnest_op
- interval_sql
- return_sql
- reference_sql
- anonymous_sql
- paren_sql
- neg_sql
- not_sql
- alias_sql
- aliases_sql
- attimezone_sql
- add_sql
- and_sql
- connector_sql
- bitwiseand_sql
- bitwiseleftshift_sql
- bitwisenot_sql
- bitwiseor_sql
- bitwiserightshift_sql
- bitwisexor_sql
- cast_sql
- currentdate_sql
- collate_sql
- command_sql
- transaction_sql
- commit_sql
- rollback_sql
- altercolumn_sql
- renametable_sql
- altertable_sql
- droppartition_sql
- addconstraint_sql
- distinct_sql
- ignorenulls_sql
- respectnulls_sql
- intdiv_sql
- dpipe_sql
- div_sql
- distance_sql
- dot_sql
- eq_sql
- escape_sql
- glob_sql
- gt_sql
- gte_sql
- ilike_sql
- is_sql
- like_sql
- similarto_sql
- lt_sql
- lte_sql
- mod_sql
- mul_sql
- neq_sql
- nullsafeeq_sql
- nullsafeneq_sql
- or_sql
- slice_sql
- sub_sql
- trycast_sql
- use_sql
- binary
- function_fallback_sql
- func
- format_args
- text_width
- format_time
- expressions
- op_expressions
- naked_property
- set_operation
- tag_sql
- token_sql
- userdefinedfunction_sql
- joinhint_sql
- kwarg_sql
- when_sql
- merge_sql
157 class Tokenizer(tokens.Tokenizer): 158 KEYWORDS = { 159 **tokens.Tokenizer.KEYWORDS, 160 "COLUMNS": TokenType.COLUMN, 161 "MATCH_RECOGNIZE": TokenType.MATCH_RECOGNIZE, 162 "MINUS": TokenType.EXCEPT, 163 "NVARCHAR2": TokenType.NVARCHAR, 164 "RETURNING": TokenType.RETURNING, 165 "START": TokenType.BEGIN, 166 "TOP": TokenType.TOP, 167 "VARCHAR2": TokenType.VARCHAR, 168 }