sql-statements: use EBNF to render syntax diagrams - second batch (#5376)#5406
sql-statements: use EBNF to render syntax diagrams - second batch (#5376)#5406ti-srebot wants to merge 4 commits into
Conversation
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
|
@CharLotteiu you're already a collaborator in bot's repo. |
| DatabaseSym ::= | ||
| DATABASE |
There was a problem hiding this comment.
These lines are newly added. Please take a look~ @kennytm
There was a problem hiding this comment.
it should be DatabaseSym ::= 'DATABASE' | 'SCHEMA', e.g. CREATE SCHEMA ... is a valid CreateDatabaseStmt.
| CreateIndexStmtUnique ::= | ||
| UNIQUE? |
There was a problem hiding this comment.
Same as the previous comment.
There was a problem hiding this comment.
i guess this should be inlined into IndexType. BTW 'UNIQUE' not UNIQUE.
| IndexColNameList ::= | ||
| IndexColName (',' IndexColName)* |
There was a problem hiding this comment.
Same as the previous comment.
There was a problem hiding this comment.
superseded by IndexPartSpecificationList.
There was a problem hiding this comment.
Is it alright to use IndexPartSpecificationList in docs for release 2.1?
There was a problem hiding this comment.
if CREATE INDEX i ON t (col(123)); works on 2.1 then it should be IndexPartSpecificationList.
if not the IndexPartSpecificationList in CreateIndexStmt should be replaced by IndexColNameList.
| TableOptionListOpt ::= | ||
| '' | TableOption* ( ',' TableOption* )* |
There was a problem hiding this comment.
@kennytm Please take a look at these lines as well. Thanks!
There was a problem hiding this comment.
lolwut 🤣
| TableOptionListOpt ::= | |
| '' | TableOption* ( ',' TableOption* )* | |
| TableOptionListOpt ::= | |
| (TableOption (','? TableOption)*)? |
also CreateTableOptionListOpt is equivalent to TableOptionListOpt.
|
@CharLotteiu, @kennytm, @TomShawn, PTAL. |
1 similar comment
|
@CharLotteiu, @kennytm, @TomShawn, PTAL. |
|
Closed as we decided not to maintain the EBNF code of synopsis on the release-2.1 branch. |
cherry-pick #5376 to release-2.1
You can switch your code base to this Pull Request by using git-extras:
# In docs-cn repo: git pr https://github.com/pingcap/docs-cn/pull/5406After apply modifications, you can push your change to this PR via:
What is changed, added or deleted? (Required)
This PR changes the synopsis sections of BEGIN, CHANGE, COMMIT, CREATE, DEALLOCATE, DELETE, DO, and DROP statements to use the
```ebnf+diagrmblock, replacing the original image-based sqlgrams. It is a follow-up PR to pingcap/docs#4389.To avoid making one single PR too large, I will open 4-5 follow-up PRs to process sql-statements files in batches. And I will delete all image files in the last PR in case of any display issues.
Which TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?