-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support of DROP|ALTER SEQUENCE syntax (#85)
* Add support of DROP SEQUENCE statement * Add support of ALTER SEQUENCE statement
- Loading branch information
Showing
16 changed files
with
386 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER SEQUENCE my_sequence SET OPTIONS (skip_range_min=1, skip_range_max=1234567) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DROP SEQUENCE my_sequence |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DROP SEQUENCE IF EXISTS my_sequence |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- alter_sequence.sql | ||
ALTER SEQUENCE my_sequence SET OPTIONS (skip_range_min=1, skip_range_max=1234567) | ||
|
||
--- AST | ||
&ast.AlterSequence{ | ||
Alter: 0, | ||
Name: &ast.Ident{ | ||
NamePos: 15, | ||
NameEnd: 26, | ||
Name: "my_sequence", | ||
}, | ||
Options: &ast.SequenceOptions{ | ||
Options: 31, | ||
Rparen: 80, | ||
Records: []*ast.SequenceOption{ | ||
&ast.SequenceOption{ | ||
Name: &ast.Ident{ | ||
NamePos: 40, | ||
NameEnd: 54, | ||
Name: "skip_range_min", | ||
}, | ||
Value: &ast.IntLiteral{ | ||
ValuePos: 55, | ||
ValueEnd: 56, | ||
Base: 10, | ||
Value: "1", | ||
}, | ||
}, | ||
&ast.SequenceOption{ | ||
Name: &ast.Ident{ | ||
NamePos: 58, | ||
NameEnd: 72, | ||
Name: "skip_range_max", | ||
}, | ||
Value: &ast.IntLiteral{ | ||
ValuePos: 73, | ||
ValueEnd: 80, | ||
Base: 10, | ||
Value: "1234567", | ||
}, | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
--- SQL | ||
ALTER SEQUENCE my_sequence SET OPTIONS (skip_range_min = 1, skip_range_max = 1234567) |
Oops, something went wrong.