init
This commit is contained in:
parent
fe2b0fd9ea
commit
a5c6d2e1f8
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dt-sql-parser-oushudb",
|
||||
"version": "4.0.2-0",
|
||||
"version": "4.0.2-5",
|
||||
"authors": "DTStack Corporation",
|
||||
"description": "SQL Parsers for BigData, built with antlr4",
|
||||
"keywords": [
|
||||
|
@ -672,6 +672,7 @@ KW_BUFFER_USAGE_LIMIT : 'BUFFER_USAGE_LIMIT';
|
||||
|
||||
// My custom keywords
|
||||
KW_DISTRIBUTED : 'DISTRIBUTED';
|
||||
KW_WRITABLE : 'WRITABLE';
|
||||
//
|
||||
|
||||
// IDENTIFIERS (4.1.1)
|
||||
|
@ -722,14 +722,18 @@ copy_generic_opt_arg_list_item
|
||||
;
|
||||
|
||||
createstmt
|
||||
: KW_CREATE opttemp? KW_TABLE opt_if_not_exists? table_name_create (
|
||||
OPEN_PAREN table_column_list? CLOSE_PAREN optinherit? optpartitionspec? table_access_method_clause? optwith? oncommitoption? opttablespace?
|
||||
: create_table_clause opt_if_not_exists? table_name_create (
|
||||
OPEN_PAREN table_column_list? CLOSE_PAREN optinherit? optpartitionspec? table_access_method_clause? optwith? oncommitoption? opttablespace? optdistributed?
|
||||
| KW_OF any_name opttypedtableelementlist? optpartitionspec? table_access_method_clause? optwith? oncommitoption? opttablespace?
|
||||
| KW_PARTITION KW_OF qualified_name opttypedtableelementlist? partitionboundspec optpartitionspec? table_access_method_clause? optwith?
|
||||
oncommitoption? opttablespace?
|
||||
) # columnCreateTable
|
||||
;
|
||||
|
||||
create_table_clause
|
||||
: KW_CREATE opttemp? KW_WRITABLE? KW_EXTERNAL? KW_TABLE
|
||||
;
|
||||
|
||||
optdistributed
|
||||
: KW_DISTRIBUTED KW_BY OPEN_PAREN column_list CLOSE_PAREN
|
||||
;
|
||||
@ -1001,7 +1005,7 @@ alterstatsstmt
|
||||
;
|
||||
|
||||
createasstmt
|
||||
: KW_CREATE opttemp? KW_TABLE opt_if_not_exists? create_as_target KW_AS selectstmt opt_with_data? # queryCreateTable
|
||||
: create_table_clause opt_if_not_exists? create_as_target KW_AS selectstmt opt_with_data? # queryCreateTable
|
||||
;
|
||||
|
||||
create_as_target
|
||||
@ -2842,7 +2846,7 @@ preparablestmt
|
||||
|
||||
executestmt
|
||||
: KW_EXECUTE name execute_param_clause?
|
||||
| KW_CREATE opttemp? KW_TABLE opt_if_not_exists? create_as_target KW_AS KW_EXECUTE name execute_param_clause? opt_with_data?
|
||||
| create_table_clause opt_if_not_exists? create_as_target KW_AS KW_EXECUTE name execute_param_clause? opt_with_data?
|
||||
;
|
||||
|
||||
execute_param_clause
|
||||
|
File diff suppressed because one or more lines are too long
@ -547,48 +547,49 @@ KW_MAIN=546
|
||||
KW_SKIP_LOCKED=547
|
||||
KW_BUFFER_USAGE_LIMIT=548
|
||||
KW_DISTRIBUTED=549
|
||||
Identifier=550
|
||||
QuotedIdentifier=551
|
||||
UnterminatedQuotedIdentifier=552
|
||||
InvalidQuotedIdentifier=553
|
||||
InvalidUnterminatedQuotedIdentifier=554
|
||||
UnicodeQuotedIdentifier=555
|
||||
UnterminatedUnicodeQuotedIdentifier=556
|
||||
InvalidUnicodeQuotedIdentifier=557
|
||||
InvalidUnterminatedUnicodeQuotedIdentifier=558
|
||||
StringConstant=559
|
||||
UnterminatedStringConstant=560
|
||||
UnicodeEscapeStringConstant=561
|
||||
UnterminatedUnicodeEscapeStringConstant=562
|
||||
BeginDollarStringConstant=563
|
||||
BinaryStringConstant=564
|
||||
UnterminatedBinaryStringConstant=565
|
||||
InvalidBinaryStringConstant=566
|
||||
InvalidUnterminatedBinaryStringConstant=567
|
||||
HexadecimalStringConstant=568
|
||||
UnterminatedHexadecimalStringConstant=569
|
||||
InvalidHexadecimalStringConstant=570
|
||||
InvalidUnterminatedHexadecimalStringConstant=571
|
||||
Integral=572
|
||||
NumericFail=573
|
||||
Numeric=574
|
||||
PLSQLVARIABLENAME=575
|
||||
PLSQLIDENTIFIER=576
|
||||
Whitespace=577
|
||||
Newline=578
|
||||
LineComment=579
|
||||
BlockComment=580
|
||||
UnterminatedBlockComment=581
|
||||
MetaCommand=582
|
||||
EndMetaCommand=583
|
||||
ErrorCharacter=584
|
||||
EscapeStringConstant=585
|
||||
UnterminatedEscapeStringConstant=586
|
||||
InvalidEscapeStringConstant=587
|
||||
InvalidUnterminatedEscapeStringConstant=588
|
||||
DollarText=589
|
||||
EndDollarStringConstant=590
|
||||
AfterEscapeStringConstantWithNewlineMode_Continued=591
|
||||
KW_WRITABLE=550
|
||||
Identifier=551
|
||||
QuotedIdentifier=552
|
||||
UnterminatedQuotedIdentifier=553
|
||||
InvalidQuotedIdentifier=554
|
||||
InvalidUnterminatedQuotedIdentifier=555
|
||||
UnicodeQuotedIdentifier=556
|
||||
UnterminatedUnicodeQuotedIdentifier=557
|
||||
InvalidUnicodeQuotedIdentifier=558
|
||||
InvalidUnterminatedUnicodeQuotedIdentifier=559
|
||||
StringConstant=560
|
||||
UnterminatedStringConstant=561
|
||||
UnicodeEscapeStringConstant=562
|
||||
UnterminatedUnicodeEscapeStringConstant=563
|
||||
BeginDollarStringConstant=564
|
||||
BinaryStringConstant=565
|
||||
UnterminatedBinaryStringConstant=566
|
||||
InvalidBinaryStringConstant=567
|
||||
InvalidUnterminatedBinaryStringConstant=568
|
||||
HexadecimalStringConstant=569
|
||||
UnterminatedHexadecimalStringConstant=570
|
||||
InvalidHexadecimalStringConstant=571
|
||||
InvalidUnterminatedHexadecimalStringConstant=572
|
||||
Integral=573
|
||||
NumericFail=574
|
||||
Numeric=575
|
||||
PLSQLVARIABLENAME=576
|
||||
PLSQLIDENTIFIER=577
|
||||
Whitespace=578
|
||||
Newline=579
|
||||
LineComment=580
|
||||
BlockComment=581
|
||||
UnterminatedBlockComment=582
|
||||
MetaCommand=583
|
||||
EndMetaCommand=584
|
||||
ErrorCharacter=585
|
||||
EscapeStringConstant=586
|
||||
UnterminatedEscapeStringConstant=587
|
||||
InvalidEscapeStringConstant=588
|
||||
InvalidUnterminatedEscapeStringConstant=589
|
||||
DollarText=590
|
||||
EndDollarStringConstant=591
|
||||
AfterEscapeStringConstantWithNewlineMode_Continued=592
|
||||
'$'=1
|
||||
'('=2
|
||||
')'=3
|
||||
@ -1136,5 +1137,6 @@ AfterEscapeStringConstantWithNewlineMode_Continued=591
|
||||
'SKIP_LOCKED'=547
|
||||
'BUFFER_USAGE_LIMIT'=548
|
||||
'DISTRIBUTED'=549
|
||||
'\\\\'=583
|
||||
'\''=591
|
||||
'WRITABLE'=550
|
||||
'\\\\'=584
|
||||
'\''=592
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -547,48 +547,49 @@ KW_MAIN=546
|
||||
KW_SKIP_LOCKED=547
|
||||
KW_BUFFER_USAGE_LIMIT=548
|
||||
KW_DISTRIBUTED=549
|
||||
Identifier=550
|
||||
QuotedIdentifier=551
|
||||
UnterminatedQuotedIdentifier=552
|
||||
InvalidQuotedIdentifier=553
|
||||
InvalidUnterminatedQuotedIdentifier=554
|
||||
UnicodeQuotedIdentifier=555
|
||||
UnterminatedUnicodeQuotedIdentifier=556
|
||||
InvalidUnicodeQuotedIdentifier=557
|
||||
InvalidUnterminatedUnicodeQuotedIdentifier=558
|
||||
StringConstant=559
|
||||
UnterminatedStringConstant=560
|
||||
UnicodeEscapeStringConstant=561
|
||||
UnterminatedUnicodeEscapeStringConstant=562
|
||||
BeginDollarStringConstant=563
|
||||
BinaryStringConstant=564
|
||||
UnterminatedBinaryStringConstant=565
|
||||
InvalidBinaryStringConstant=566
|
||||
InvalidUnterminatedBinaryStringConstant=567
|
||||
HexadecimalStringConstant=568
|
||||
UnterminatedHexadecimalStringConstant=569
|
||||
InvalidHexadecimalStringConstant=570
|
||||
InvalidUnterminatedHexadecimalStringConstant=571
|
||||
Integral=572
|
||||
NumericFail=573
|
||||
Numeric=574
|
||||
PLSQLVARIABLENAME=575
|
||||
PLSQLIDENTIFIER=576
|
||||
Whitespace=577
|
||||
Newline=578
|
||||
LineComment=579
|
||||
BlockComment=580
|
||||
UnterminatedBlockComment=581
|
||||
MetaCommand=582
|
||||
EndMetaCommand=583
|
||||
ErrorCharacter=584
|
||||
EscapeStringConstant=585
|
||||
UnterminatedEscapeStringConstant=586
|
||||
InvalidEscapeStringConstant=587
|
||||
InvalidUnterminatedEscapeStringConstant=588
|
||||
DollarText=589
|
||||
EndDollarStringConstant=590
|
||||
AfterEscapeStringConstantWithNewlineMode_Continued=591
|
||||
KW_WRITABLE=550
|
||||
Identifier=551
|
||||
QuotedIdentifier=552
|
||||
UnterminatedQuotedIdentifier=553
|
||||
InvalidQuotedIdentifier=554
|
||||
InvalidUnterminatedQuotedIdentifier=555
|
||||
UnicodeQuotedIdentifier=556
|
||||
UnterminatedUnicodeQuotedIdentifier=557
|
||||
InvalidUnicodeQuotedIdentifier=558
|
||||
InvalidUnterminatedUnicodeQuotedIdentifier=559
|
||||
StringConstant=560
|
||||
UnterminatedStringConstant=561
|
||||
UnicodeEscapeStringConstant=562
|
||||
UnterminatedUnicodeEscapeStringConstant=563
|
||||
BeginDollarStringConstant=564
|
||||
BinaryStringConstant=565
|
||||
UnterminatedBinaryStringConstant=566
|
||||
InvalidBinaryStringConstant=567
|
||||
InvalidUnterminatedBinaryStringConstant=568
|
||||
HexadecimalStringConstant=569
|
||||
UnterminatedHexadecimalStringConstant=570
|
||||
InvalidHexadecimalStringConstant=571
|
||||
InvalidUnterminatedHexadecimalStringConstant=572
|
||||
Integral=573
|
||||
NumericFail=574
|
||||
Numeric=575
|
||||
PLSQLVARIABLENAME=576
|
||||
PLSQLIDENTIFIER=577
|
||||
Whitespace=578
|
||||
Newline=579
|
||||
LineComment=580
|
||||
BlockComment=581
|
||||
UnterminatedBlockComment=582
|
||||
MetaCommand=583
|
||||
EndMetaCommand=584
|
||||
ErrorCharacter=585
|
||||
EscapeStringConstant=586
|
||||
UnterminatedEscapeStringConstant=587
|
||||
InvalidEscapeStringConstant=588
|
||||
InvalidUnterminatedEscapeStringConstant=589
|
||||
DollarText=590
|
||||
EndDollarStringConstant=591
|
||||
AfterEscapeStringConstantWithNewlineMode_Continued=592
|
||||
'$'=1
|
||||
'('=2
|
||||
')'=3
|
||||
@ -1136,5 +1137,6 @@ AfterEscapeStringConstantWithNewlineMode_Continued=591
|
||||
'SKIP_LOCKED'=547
|
||||
'BUFFER_USAGE_LIMIT'=548
|
||||
'DISTRIBUTED'=549
|
||||
'\\\\'=583
|
||||
'\''=591
|
||||
'WRITABLE'=550
|
||||
'\\\\'=584
|
||||
'\''=592
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -103,6 +103,7 @@ import { Copy_generic_opt_argContext } from "./PostgreSqlParser.js";
|
||||
import { Copy_generic_opt_arg_listContext } from "./PostgreSqlParser.js";
|
||||
import { Copy_generic_opt_arg_list_itemContext } from "./PostgreSqlParser.js";
|
||||
import { ColumnCreateTableContext } from "./PostgreSqlParser.js";
|
||||
import { Create_table_clauseContext } from "./PostgreSqlParser.js";
|
||||
import { OptdistributedContext } from "./PostgreSqlParser.js";
|
||||
import { OpttempContext } from "./PostgreSqlParser.js";
|
||||
import { Table_column_listContext } from "./PostgreSqlParser.js";
|
||||
@ -1853,6 +1854,16 @@ export class PostgreSqlParserListener implements ParseTreeListener {
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
exitColumnCreateTable?: (ctx: ColumnCreateTableContext) => void;
|
||||
/**
|
||||
* Enter a parse tree produced by `PostgreSqlParser.create_table_clause`.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
enterCreate_table_clause?: (ctx: Create_table_clauseContext) => void;
|
||||
/**
|
||||
* Exit a parse tree produced by `PostgreSqlParser.create_table_clause`.
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
exitCreate_table_clause?: (ctx: Create_table_clauseContext) => void;
|
||||
/**
|
||||
* Enter a parse tree produced by `PostgreSqlParser.optdistributed`.
|
||||
* @param ctx the parse tree
|
||||
|
@ -103,6 +103,7 @@ import { Copy_generic_opt_argContext } from "./PostgreSqlParser.js";
|
||||
import { Copy_generic_opt_arg_listContext } from "./PostgreSqlParser.js";
|
||||
import { Copy_generic_opt_arg_list_itemContext } from "./PostgreSqlParser.js";
|
||||
import { ColumnCreateTableContext } from "./PostgreSqlParser.js";
|
||||
import { Create_table_clauseContext } from "./PostgreSqlParser.js";
|
||||
import { OptdistributedContext } from "./PostgreSqlParser.js";
|
||||
import { OpttempContext } from "./PostgreSqlParser.js";
|
||||
import { Table_column_listContext } from "./PostgreSqlParser.js";
|
||||
@ -1474,6 +1475,12 @@ export class PostgreSqlParserVisitor<Result> extends AbstractParseTreeVisitor<Re
|
||||
* @return the visitor result
|
||||
*/
|
||||
visitColumnCreateTable?: (ctx: ColumnCreateTableContext) => Result;
|
||||
/**
|
||||
* Visit a parse tree produced by `PostgreSqlParser.create_table_clause`.
|
||||
* @param ctx the parse tree
|
||||
* @return the visitor result
|
||||
*/
|
||||
visitCreate_table_clause?: (ctx: Create_table_clauseContext) => Result;
|
||||
/**
|
||||
* Visit a parse tree produced by `PostgreSqlParser.optdistributed`.
|
||||
* @param ctx the parse tree
|
||||
|
Loading…
Reference in New Issue
Block a user