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

sql-statements: use EBNF to render syntax diagrams for BACKUP and RESTORE #4342

Merged

Conversation

kennytm
Copy link
Contributor

@kennytm kennytm commented Dec 4, 2020

What is changed, added or deleted? (Required)

Change the synopsis sections of BACKUP, RESTORE and SHOW {BACKUPS|RESTORES} to use the ```ebnf+diagrm block introduced since pingcap/website-docs#83, replacing the original image-based sqlgrams (which files are deleted).

Output preview

1-fs8

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)

  • master (the latest development version)
  • v4.0 (TiDB 4.0 versions)
  • v3.1 (TiDB 3.1 versions)
  • v3.0 (TiDB 3.0 versions)
  • v2.1 (TiDB 2.1 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

@kennytm kennytm force-pushed the use-ebnf-diagram-for-backup-and-restore branch from 39a6e89 to 1ea8d98 Compare December 4, 2020 21:07
@kennytm
Copy link
Contributor Author

kennytm commented Dec 4, 2020

/cc @TomShawn (#2618 (comment))

@morgo
Copy link
Contributor

morgo commented Dec 5, 2020

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Dec 5, 2020
@TomShawn TomShawn requested a review from g1eny0ung December 7, 2020 02:27
@TomShawn TomShawn self-assigned this Dec 7, 2020
@TomShawn TomShawn added needs-cherry-pick-4.0 size/small Changes of a small size. status/PTAL This PR is ready for reviewing. translation/doing This PR's assignee is translating this PR. labels Dec 7, 2020
Copy link
Contributor

@g1eny0ung g1eny0ung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-srebot
Copy link
Contributor

@g1eny0ung, Thanks for your review. The bot only counts LGTMs from Reviewers and higher roles, but you're still welcome to leave your comments. See the corresponding SIG page for more information. Related SIG: docs(slack).

Copy link
Contributor

@TomShawn TomShawn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Dec 7, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Dec 7, 2020
@TomShawn TomShawn merged commit ee61597 into pingcap:master Dec 7, 2020
ti-srebot pushed a commit to ti-srebot/docs that referenced this pull request Dec 7, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #4350

TomShawn pushed a commit that referenced this pull request Dec 7, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>

Co-authored-by: kennytm <kennytm@gmail.com>
@kennytm kennytm deleted the use-ebnf-diagram-for-backup-and-restore branch December 7, 2020 06:28
@TomShawn TomShawn added translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. and removed translation/doing This PR's assignee is translating this PR. labels Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/small Changes of a small size. status/LGT2 Indicates that a PR has LGTM 2. status/PTAL This PR is ready for reviewing. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants