[#6485] Support parsing SQL Server's IDENTITY and IDENTITY(x, y) syntax
This commit is contained in:
parent
dc2e9b21a4
commit
2fc5c410d2
@ -263,6 +263,7 @@ column =
|
||||
| 'CHECK' '(' condition ')'
|
||||
| 'AUTO_INCREMENT'
|
||||
| 'AUTOINCREMENT'
|
||||
| 'IDENTITY' [ '(' signedInteger ',' signedInteger ')' ]
|
||||
| 'COMMENT' stringLiteral
|
||||
)
|
||||
}
|
||||
|
||||
@ -1851,7 +1851,20 @@ final class ParserImpl implements Parser {
|
||||
}
|
||||
|
||||
if (!defaultValue) {
|
||||
if (parseKeywordIf(ctx, "DEFAULT")) {
|
||||
if (parseKeywordIf(ctx, "IDENTITY")) {
|
||||
if (parseIf(ctx, '(')) {
|
||||
parseSignedInteger(ctx);
|
||||
parse(ctx, ',');
|
||||
parseSignedInteger(ctx);
|
||||
parse(ctx, ')');
|
||||
}
|
||||
|
||||
type = type.identity(true);
|
||||
defaultValue = true;
|
||||
identity = true;
|
||||
continue;
|
||||
}
|
||||
else if (parseKeywordIf(ctx, "DEFAULT")) {
|
||||
|
||||
// TODO: Ignored keyword from Oracle
|
||||
parseKeywordIf(ctx, "ON NULL");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user