Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review the parsing rule for DDL #2280

Merged
merged 34 commits into from
Apr 26, 2019
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
dd65fa4
adjust the sequences of statements for mysql
tristaZero Apr 24, 2019
ac15787
adjust the sequences of statements for oracle
tristaZero Apr 24, 2019
7830568
adjust the sequences of statements for pg
tristaZero Apr 24, 2019
bfc25cd
adjust the sequences of statements for sqlserver
tristaZero Apr 24, 2019
47bba02
add existClause_
tristaZero Apr 25, 2019
9014d92
modify collateName_
tristaZero Apr 25, 2019
0eb83d9
modify commonDataTypeOption_
tristaZero Apr 25, 2019
5925cab
use collateName_
tristaZero Apr 25, 2019
11d343d
add VISIBLE
tristaZero Apr 25, 2019
5f9cbe3
add temporaryClause_
tristaZero Apr 25, 2019
05f1cc3
modify constraintState
tristaZero Apr 25, 2019
0413f93
Merge branch 'dev' of ssh://github.com/shardingjdbc/sharding-jdbc int…
tristaZero Apr 26, 2019
215f4c4
add key words
tristaZero Apr 26, 2019
c0fb2f2
modify rule for creating table
tristaZero Apr 26, 2019
1c3ec57
modify basic rule
tristaZero Apr 26, 2019
dfe2d24
move columnDefinition
tristaZero Apr 26, 2019
6429999
modify createTable rule
tristaZero Apr 26, 2019
18d7325
add tableNames rule
tristaZero Apr 26, 2019
7138ec8
use tableNames
tristaZero Apr 26, 2019
cad3eff
adjust sequence of rules
tristaZero Apr 26, 2019
bdfbe1a
modify tableName rule
tristaZero Apr 26, 2019
39765ba
modify createTable rule
tristaZero Apr 26, 2019
f4ab0dd
modify columnConstraints rule
tristaZero Apr 26, 2019
ea72d69
change sequences of rules
tristaZero Apr 26, 2019
0f1e66f
rename to createDefinitionClause_
tristaZero Apr 26, 2019
6f4a547
rename to inheritClause_
tristaZero Apr 26, 2019
ce5cd8e
modify sequence of rules
tristaZero Apr 26, 2019
10109e2
modify sequence of rules
tristaZero Apr 26, 2019
8bc9a74
Merge branch 'dev' of ssh://github.com/shardingjdbc/sharding-jdbc int…
tristaZero Apr 26, 2019
3cbeea9
rename to Specification
tristaZero Apr 26, 2019
108ee4a
rename to createSpecification_
tristaZero Apr 26, 2019
be4c86a
rename to createSpecification_
tristaZero Apr 26, 2019
2b363ee
rename to fileTableSpecification__
tristaZero Apr 26, 2019
4ca79a5
reverse to fileTableClause_
tristaZero Apr 26, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
modify basic rule
tristaZero committed Apr 26, 2019
commit 1c3ec5726b41e74127563c47b4c88783fd1f181c
Original file line number Diff line number Diff line change
@@ -241,7 +241,7 @@ columnConstraintOption
| GENERATED (ALWAYS | BY DEFAULT) AS IDENTITY (LP_ sequenceOptions RP_)?
| UNIQUE indexParameters
| primaryKey indexParameters
| REFERENCES tableName (LP_ columnName RP_)? (MATCH FULL | MATCH PARTIAL | MATCH SIMPLE)?(ON DELETE action)? foreignKeyOnAction*
| REFERENCES tableName columnNames? (MATCH FULL | MATCH PARTIAL | MATCH SIMPLE)? (ON (DELETE | UPDATE) action)*
;

checkOption
@@ -266,24 +266,19 @@ sequenceOption
| CYCLE
| NO CYCLE
| CACHE NUMBER_
| OWNED BY
;

indexParameters
: (USING INDEX TABLESPACE ignoredIdentifier_)?
| INCLUDE columnNames
| WITH
;

action
: NO ACTION | RESTRICT | CASCADE | SET (NULL | DEFAULT)
;

foreignKeyOnAction
: ON (UPDATE foreignKeyOn | DELETE foreignKeyOn)
;

foreignKeyOn
: RESTRICT | CASCADE | SET NULL | NO ACTION | SET DEFAULT
;

constraintOptionalParam
: (NOT? DEFERRABLE)? (INITIALLY (DEFERRED | IMMEDIATE))?
;