diff --git a/media/sqlgram/BRIETables.png b/media/sqlgram/BRIETables.png deleted file mode 100644 index e460994bfdc0..000000000000 Binary files a/media/sqlgram/BRIETables.png and /dev/null differ diff --git a/media/sqlgram/BackupOption.png b/media/sqlgram/BackupOption.png deleted file mode 100644 index 4425d81c996e..000000000000 Binary files a/media/sqlgram/BackupOption.png and /dev/null differ diff --git a/media/sqlgram/BackupStmt.png b/media/sqlgram/BackupStmt.png deleted file mode 100644 index 5ffa691835a7..000000000000 Binary files a/media/sqlgram/BackupStmt.png and /dev/null differ diff --git a/media/sqlgram/BackupTSO.png b/media/sqlgram/BackupTSO.png deleted file mode 100644 index 29ea0bf28a54..000000000000 Binary files a/media/sqlgram/BackupTSO.png and /dev/null differ diff --git a/media/sqlgram/Boolean.png b/media/sqlgram/Boolean.png deleted file mode 100644 index b44f358d666e..000000000000 Binary files a/media/sqlgram/Boolean.png and /dev/null differ diff --git a/media/sqlgram/RestoreOption.png b/media/sqlgram/RestoreOption.png deleted file mode 100644 index 8ff807478df1..000000000000 Binary files a/media/sqlgram/RestoreOption.png and /dev/null differ diff --git a/media/sqlgram/RestoreStmt.png b/media/sqlgram/RestoreStmt.png deleted file mode 100644 index 7fae5bc1152b..000000000000 Binary files a/media/sqlgram/RestoreStmt.png and /dev/null differ diff --git a/media/sqlgram/ShowBRIEStmt.png b/media/sqlgram/ShowBRIEStmt.png deleted file mode 100644 index 651e03a67802..000000000000 Binary files a/media/sqlgram/ShowBRIEStmt.png and /dev/null differ diff --git a/sql-statements/sql-statement-backup.md b/sql-statements/sql-statement-backup.md index 6dc9e4aaf867..244d34532e67 100644 --- a/sql-statements/sql-statement-backup.md +++ b/sql-statements/sql-statement-backup.md @@ -18,25 +18,28 @@ aliases: ['/docs-cn/dev/sql-statements/sql-statement-backup/'] ## 语法图 -**BackupStmt:** - -![BackupStmt](/media/sqlgram/BackupStmt.png) - -**BRIETables:** - -![BRIETables](/media/sqlgram/BRIETables.png) - -**BackupOption:** - -![BackupOption](/media/sqlgram/BackupOption.png) - -**Boolean:** - -![Boolean](/media/sqlgram/Boolean.png) - -**BackupTSO:** - -![BackupTSO](/media/sqlgram/BackupTSO.png) +```ebnf+diagram +BackupStmt ::= + "BACKUP" BRIETables "TO" stringLit BackupOption* + +BRIETables ::= + "DATABASE" ( '*' | DBName (',' DBName)* ) +| "TABLE" TableNameList + +BackupOption ::= + "RATE_LIMIT" '='? LengthNum "MB" '/' "SECOND" +| "CONCURRENCY" '='? LengthNum +| "CHECKSUM" '='? Boolean +| "SEND_CREDENTIALS_TO_TIKV" '='? Boolean +| "LAST_BACKUP" '='? BackupTSO +| "SNAPSHOT" '='? ( BackupTSO | LengthNum TimestampUnit "AGO" ) + +Boolean ::= + NUM | "TRUE" | "FALSE" + +BackupTSO ::= + LengthNum | stringLit +``` ## 示例 diff --git a/sql-statements/sql-statement-restore.md b/sql-statements/sql-statement-restore.md index c69fef1462d9..5e70ab7fb2ca 100644 --- a/sql-statements/sql-statement-restore.md +++ b/sql-statements/sql-statement-restore.md @@ -26,21 +26,23 @@ aliases: ['/docs-cn/dev/sql-statements/sql-statement-restore/'] ## 语法图 -**RestoreStmt:** - -![RestoreStmt](/media/sqlgram/RestoreStmt.png) - -**BRIETables:** - -![BRIETables](/media/sqlgram/BRIETables.png) - -**RestoreOption:** - -![RestoreOption](/media/sqlgram/RestoreOption.png) - -**Boolean:** - -![Boolean](/media/sqlgram/Boolean.png) +```ebnf+diagram +RestoreStmt ::= + "RESTORE" BRIETables "FROM" stringLit RestoreOption* + +BRIETables ::= + "DATABASE" ( '*' | DBName (',' DBName)* ) +| "TABLE" TableNameList + +RestoreOption ::= + "RATE_LIMIT" '='? LengthNum "MB" '/' "SECOND" +| "CONCURRENCY" '='? LengthNum +| "CHECKSUM" '='? Boolean +| "SEND_CREDENTIALS_TO_TIKV" '='? Boolean + +Boolean ::= + NUM | "TRUE" | "FALSE" +``` ## 示例 diff --git a/sql-statements/sql-statement-show-backups.md b/sql-statements/sql-statement-show-backups.md index f08535eb3b11..50e9ba4904d4 100644 --- a/sql-statements/sql-statement-show-backups.md +++ b/sql-statements/sql-statement-show-backups.md @@ -12,13 +12,14 @@ aliases: ['/docs-cn/dev/sql-statements/sql-statement-show-backups/'] ## 语法图 -**ShowBRIEStmt:** +```ebnf+diagram +ShowBRIEStmt ::= + "SHOW" ("BACKUPS" | "RESTORES") ShowLikeOrWhere? -![ShowBRIEStmt](/media/sqlgram/ShowBRIEStmt.png) - -**ShowLikeOrWhereOpt:** - -![ShowLikeOrWhereOpt](/media/sqlgram/ShowLikeOrWhereOpt.png) +ShowLikeOrWhere ::= + "LIKE" SimpleExpr +| "WHERE" Expression +``` ## 示例