-
Notifications
You must be signed in to change notification settings - Fork 1.2k
sql-statements: use EBNF to render syntax diagrams for BACKUP and RESTORE #5069
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
Conversation
|  | ||
| ```ebnf+diagram | ||
| BackupStmt ::= | ||
| "BACKUP" BRIETables "TO" stringLit BackupOption* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the blank lines affect the display?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No the parser treats new lines as the same as spaces which are ignored. Even
```ebnf+diagram
a ::= b c ::= d
```will work
ran-huang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
kennytm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but maybe you should fix the PR title 😉
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
|
cherry pick to release-4.0 in PR #5074 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com> Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
…TORE
What is changed, added or deleted? (Required)
Change the synopsis sections of BACKUP, RESTORE and SHOW {BACKUPS|RESTORES} to use the
```ebnf+diagrmblock introduced since pingcap/website-docs#83, replacing the original image-based sqlgrams (which files are deleted).Output preview
The syntax diagrams are now rendered server-side as SVG when building (similar to SQLite3 / IBM DB2 / CockroachDB's docs), and user can also toggle between syntax diagram and the source EBNF (similar to Oracle's docs).
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?