Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file removed media/sqlgram/BRIETables.png
Binary file not shown.
Binary file removed media/sqlgram/BackupOption.png
Binary file not shown.
Binary file removed media/sqlgram/BackupStmt.png
Binary file not shown.
Binary file removed media/sqlgram/BackupTSO.png
Binary file not shown.
Binary file removed media/sqlgram/Boolean.png
Binary file not shown.
Binary file removed media/sqlgram/RestoreOption.png
Binary file not shown.
Binary file removed media/sqlgram/RestoreStmt.png
Binary file not shown.
Binary file removed media/sqlgram/ShowBRIEStmt.png
Binary file not shown.
41 changes: 22 additions & 19 deletions sql-statements/sql-statement-backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Copy link
Contributor

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?

Copy link
Contributor

@kennytm kennytm Dec 10, 2020

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


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
```

## 示例

Expand Down
32 changes: 17 additions & 15 deletions sql-statements/sql-statement-restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
```

## 示例

Expand Down
13 changes: 7 additions & 6 deletions sql-statements/sql-statement-show-backups.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

## 示例

Expand Down