-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: call statement and request mode SQL (#3884)
- Loading branch information
1 parent
99c179e
commit 992de88
Showing
6 changed files
with
173 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# CALL | ||
|
||
Invoke a procedure | ||
|
||
## Syntax | ||
|
||
```yacc | ||
CALL [db_name.]procedure_name (procedure_argument[, …]) | ||
``` | ||
|
||
## Use CALL statement to invoke a deployment | ||
|
||
SQL [Deployment](../deployment_manage/DEPLOY_STATEMENT.md] is implemented internally with stored procedure, so it's natural to invoke a deployed deployment with CALL statement, required parameters are exactly the same with deployment SQL's request table schema. | ||
|
||
## Examples | ||
|
||
```sql | ||
-- table t1 schema is (id int, val string) | ||
deploy dp1 select * from t1; | ||
|
||
-- dp1 has two parameter corresponding to table t1's schema: (int, string) | ||
call dp1 (12, "str") | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ Data Manipulation Statement(DML) | |
LOAD_DATA_STATEMENT | ||
DELETE_STATEMENT | ||
ALTER_STATEMENT | ||
CALL_STATEMENT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# CALL | ||
|
||
调用一个存储过程 | ||
|
||
## 语法 | ||
|
||
```yacc | ||
CALL [db_name.]procedure_name (procedure_argument[, …]) | ||
``` | ||
|
||
## CALL 语句调用 Deployment | ||
|
||
SQL [Deployment](../deployment_manage/DEPLOY_STATEMENT.md) 内部以存储过程的形式实现,它的参数是 SQL 主表的 schema, 可以通过 CALL 语句在 SQL 上直接执行验证对应的 deployment. | ||
|
||
## Examples | ||
|
||
```sql | ||
-- table t1 schema is (id int, val string) | ||
deploy dp1 select * from t1; | ||
|
||
-- 调用存储过程 dp1, dp1 有两个参数 (int, string) | ||
call dp1 (12, "str") | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ | |
LOAD_DATA_STATEMENT | ||
DELETE_STATEMENT | ||
ALTER_STATEMENT | ||
CALL_STATEMENT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters