@things-factory/integration-base 6.1.127 → 6.1.138

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist-server/engine/task/database-query.js +2 -1
  2. package/dist-server/engine/task/database-query.js.map +1 -1
  3. package/dist-server/engine/task/graphql-mutate.js +2 -1
  4. package/dist-server/engine/task/graphql-mutate.js.map +1 -1
  5. package/dist-server/engine/task/graphql-query.js +2 -1
  6. package/dist-server/engine/task/graphql-query.js.map +1 -1
  7. package/dist-server/engine/task/http-get.js +2 -1
  8. package/dist-server/engine/task/http-get.js.map +1 -1
  9. package/dist-server/engine/task/http-post.js +2 -1
  10. package/dist-server/engine/task/http-post.js.map +1 -1
  11. package/dist-server/engine/task/local-graphql-mutate.js +8 -5
  12. package/dist-server/engine/task/local-graphql-mutate.js.map +1 -1
  13. package/dist-server/engine/task/local-graphql-query.js +8 -5
  14. package/dist-server/engine/task/local-graphql-query.js.map +1 -1
  15. package/dist-server/engine/task/log.js +2 -1
  16. package/dist-server/engine/task/log.js.map +1 -1
  17. package/dist-server/engine/task/oracle-procedure.js +3 -3
  18. package/dist-server/engine/task/oracle-procedure.js.map +1 -1
  19. package/dist-server/engine/task/script.js +3 -2
  20. package/dist-server/engine/task/script.js.map +1 -1
  21. package/dist-server/engine/types.js.map +1 -1
  22. package/dist-server/routers/scenario-schedule-callback-router.js +7 -2
  23. package/dist-server/routers/scenario-schedule-callback-router.js.map +1 -1
  24. package/dist-server/service/scenario/scenario-type.js +1 -1
  25. package/dist-server/service/scenario/scenario-type.js.map +1 -1
  26. package/dist-server/service/scenario-instance/scenario-instance-mutation.js +2 -2
  27. package/dist-server/service/scenario-instance/scenario-instance-mutation.js.map +1 -1
  28. package/dist-server/service/scenario-instance/scenario-instance-type.js +9 -1
  29. package/dist-server/service/scenario-instance/scenario-instance-type.js.map +1 -1
  30. package/dist-server/tsconfig.tsbuildinfo +1 -1
  31. package/helps/integration/task/oracle-procedure.ja.md +139 -0
  32. package/helps/integration/task/oracle-procedure.ko.md +40 -30
  33. package/helps/integration/task/oracle-procedure.md +52 -55
  34. package/helps/integration/task/oracle-procedure.ms.md +50 -51
  35. package/helps/integration/task/oracle-procedure.zh.md +81 -84
  36. package/package.json +8 -8
  37. package/server/engine/task/database-query.ts +2 -1
  38. package/server/engine/task/graphql-mutate.ts +2 -1
  39. package/server/engine/task/graphql-query.ts +2 -1
  40. package/server/engine/task/http-get.ts +2 -1
  41. package/server/engine/task/http-post.ts +2 -1
  42. package/server/engine/task/local-graphql-mutate.ts +8 -5
  43. package/server/engine/task/local-graphql-query.ts +8 -5
  44. package/server/engine/task/log.ts +2 -1
  45. package/server/engine/task/oracle-procedure.ts +3 -4
  46. package/server/engine/task/script.ts +3 -2
  47. package/server/engine/types.ts +1 -0
  48. package/server/routers/scenario-schedule-callback-router.ts +6 -2
  49. package/server/service/scenario/scenario-type.ts +1 -1
  50. package/server/service/scenario-instance/scenario-instance-mutation.ts +2 -2
  51. package/server/service/scenario-instance/scenario-instance-type.ts +9 -1
@@ -0,0 +1,139 @@
1
+ # Oracle プロシージャ タスク
2
+
3
+ このタスクは、Oracle データベースに格納されているプロシージャを呼び出すもので、個々のデータ型に応じてデータのリストまたは特定のデータ型の値を返します。
4
+
5
+ ## パラメータ
6
+
7
+ ### プロシージャ コード
8
+
9
+ - プロシージャ コードは、*プロシージャ名*と*パラメータ*に基づいて自動生成されるコードで、ユーザーが手動で入力する必要はありません。
10
+ - たとえば、プロシージャの名前が*mcs.myproc*で、パラメータが*id*と*out_name*で構成されている場合、次のように表現されます:
11
+
12
+ ```text
13
+ mcs.myproc(:id, :out_name);
14
+ ```
15
+
16
+ ### プロシージャ名
17
+
18
+ - プロシージャの名前を指定します。
19
+ - プロシージャがパッケージまたはユーザー名で区別される必要がある場合は、ピリオド(.)を使用してそれらを区別します。
20
+ - 例:
21
+
22
+ ```text
23
+ mcs.myproc
24
+ ```
25
+
26
+ ### パラメータ
27
+
28
+ - パラメータは次の要素で構成されています。
29
+ - パラメータ名
30
+ - ディレクション: IN、INOUT、OUT
31
+ - データ型: String、Number、Date、Cursor
32
+ - 値: 入力変数の場合、対応する値
33
+ - 最大サイズ: String または Buffer データ型の場合、変数の最大サイズを指定します。
34
+
35
+ #### パラメータ名
36
+
37
+ パラメータ名は、プロシージャで使用されるパラメータの名前を指定します。前述の例では、'id'と'out_name'がパラメータ名です。
38
+
39
+ ### ディレクション
40
+
41
+ 変数が入力(IN)または出力(OUT)変数かを指定します。
42
+
43
+ ### データ型
44
+
45
+ パラメータのデータ型を指定します。データ型は、プロシージャを作成する際に指定された名前と完全に一致するように指定する必要があります。
46
+
47
+ たとえば、プロシージャが次のように実装されている場合:
48
+
49
+ ```sql
50
+ CREATE OR REPLACE NONEDITIONABLE PROCEDURE myproc (in_id IN VARCHAR2, out_name OUT VARCHAR2) AS
51
+ BEGIN
52
+ SELECT name INTO out_name FROM MCS.FMB_USERS WHERE id = in_id ;
53
+ END;
54
+ ```
55
+
56
+ 最初のパラメータと 2 番目のパラメータはどちらも VARCHAR2 型です。
57
+
58
+ このようなプロシージャを呼び出す場合、パラメータのタイプは両方とも String として指定し、出力の場合は最大サイズも指定する必要があります。
59
+
60
+ ここに指定方法の例があります:
61
+
62
+ ![procedure example1](./assets/../../../../assets/images/oracle-procedure-example1.png 'procedure example1')
63
+
64
+ ### アクセサー
65
+
66
+ 設定は[JSONATA のドキュメント](http://docs.jsonata.org/overview.html)に従います。
67
+
68
+ 「アクセサー」が指定されている場合、そのアクセサーで構成された値がパラメータの値として使用されます。アクセサー操作から結
69
+
70
+ 果が生成されない場合、
71
+ 「値(val)」設定で指定された値が使用されます。
72
+
73
+ ### 値(val)
74
+
75
+ パラメータが入力(IN)の場合、このフィールドに値を指定します。このフィールドには「定数」値を直接入力します。
76
+
77
+ 前述の例では、'id'パラメータの入力値として'ID'が指定されている場合、ID タスクから返された値を入力値として使用する必要があります。
78
+
79
+ 「アクセサー」設定から結果が生成されない場合、この値が使用されます。
80
+
81
+ ### 最大サイズ
82
+
83
+ String または Buffer データ型のパラメータの場合、最大サイズを指定します。他のデータ型に対してはこの値を指定しないでください。
84
+
85
+ ## タスクの結果
86
+
87
+ プロシージャを呼び出した結果は、オブジェクト形式で返され、出力として指定されたパラメータ名がキーとなり、それに対応する値が返されます。
88
+
89
+ 例えば、上記のタスクでは、結果の値は以下のようになります:
90
+
91
+ ```javascript
92
+ {
93
+ out_name: 'Admin'
94
+ }
95
+ ```
96
+
97
+ ## 別の例(カーソル)
98
+
99
+ ### プロシージャの実装例
100
+
101
+ ```sql
102
+ CREATE OR REPLACE NONEDITIONABLE PROCEDURE PROCEDURE1(out_cursor OUT SYS_REFCURSOR) AS
103
+ BEGIN
104
+ BEGIN
105
+ OPEN out_cursor FOR
106
+ SELECT * FROM FARMWEATHER WHERE rownum <= 1000;
107
+ END;
108
+ END PROCEDURE1;
109
+ ```
110
+
111
+ ### プロシージャの呼び出し例
112
+
113
+ ![procedure example2](./assets/../../../../assets/images/oracle-procedure-example2.png 'procedure example2')
114
+
115
+ ### プロシージャ呼び出しのタスク結果
116
+
117
+ ```javascript
118
+ {
119
+ "out_cursor": [
120
+ {
121
+ "FARMDATE": "2006-01-07T15:00:00.000Z",
122
+ "MAXT": 29.5,
123
+ "MINT": 21.8,
124
+ "WINDSPEED": 1.6,
125
+ "FARMHUM": 70.2,
126
+ "PRECIPITATION": 0
127
+ },
128
+ {
129
+ "FARMDATE": "2006-01-08T15:00:00.000Z",
130
+ "MAXT": 30.1,
131
+ "MINT": 21,
132
+ "WINDSPEED": 1.6,
133
+ "FARMHUM": 67.4,
134
+ "PRECIPITATION": 0
135
+ },
136
+ ..
137
+ ]
138
+ }
139
+ ```
@@ -1,40 +1,45 @@
1
1
  # Oracle Procedure Task
2
2
 
3
- Oracle 데이터베이스에 저장되어 있는 프로시저를 호출하는 태스크이며,
3
+ Oracle 데이터베이스에 저장되어 있는 프로시저를 호출하는 태스크이며,
4
4
  개별 데이터 타입에 따라서 데이터의 리스트 혹은 특정 데이터 타입의 값을 반환한다.
5
5
 
6
6
  ## Parameters
7
7
 
8
8
  ### 프로시저 코드
9
- - 프로시저 코드는 *프로시저 이름*과 *파라미터*에 의해서 자동으로 생성되는 코드로서, 별도로 사용자가 입력할 필요는 없다.
10
- - 만약, 프로시저의 이름이 *mcs.myproc*이고, 파라미터가 *id*와 *out_name*으로 구성된다면, 다음과 같이 표현된다.
11
- ```text
12
- mcs.myproc(:id, :out_name);
13
- ```
9
+
10
+ - 프로시저 코드는 *프로시저 이름*과 *파라미터*에 의해서 자동으로 생성되는 코드로서, 별도로 사용자가 입력할 필요는 없다.
11
+ - 만약, 프로시저의 이름이 *mcs.myproc*이고, 파라미터가 *id*와 *out_name*으로 구성된다면, 다음과 같이 표현된다.
12
+ ```text
13
+ mcs.myproc(:id, :out_name);
14
+ ```
14
15
 
15
16
  ### 프로시저 이름
16
- - 프로시저의 이름을 지정한다.
17
- - 프로시저가 패키지나 사용자 이름등으로 구분이 필요할 경우 '.'을 통해서 구분한다.
18
- - 사용 예.
19
- ```text
20
- mcs.myproc
21
- ```
17
+
18
+ - 프로시저의 이름을 지정한다.
19
+ - 프로시저가 패키지나 사용자 이름등으로 구분이 필요할 경우 '.'을 통해서 구분한다.
20
+ - 사용 예.
21
+ ```text
22
+ mcs.myproc
23
+ ```
22
24
 
23
25
  ### 파라미터
24
- - 파라미터는 다음과 같은 요소로 구성되어 있다.
25
- - 파라미터 이름
26
- - 입출력 지정: IN, INOUT, OUT
27
- - 파라미터 타입: String, Number, Date, Cursor
28
- - 값: 해당 변수가 입력일 경우, 해당 입력에 대한 값
29
- - 최대크기: 해당 변수타입이 String이나 Buffer일 경우, 변수의 최대 크기를 지정.
26
+
27
+ - 파라미터는 다음과 같은 요소로 구성되어 있다.
28
+ - 파라미터 이름
29
+ - 입출력 지정: IN, INOUT, OUT
30
+ - 파라미터 타입: String, Number, Date, Cursor
31
+ - 값: 해당 변수가 입력일 경우, 해당 입력에 대한
32
+ - 최대크기: 해당 변수타입이 String이나 Buffer일 경우, 변수의 최대 크기를 지정.
30
33
 
31
34
  #### 파라미터 이름
32
35
 
33
36
  파라미터 이름은 프로시저 작성에 사용된 파라미터의 이름을 지정한다.
34
37
  앞의 예의 경우,
35
- ```sql
36
- mcs.myproc(:id, :out_name);
37
- ```
38
+
39
+ ```sql
40
+ mcs.myproc(:id, :out_name);
41
+ ```
42
+
38
43
  id와 out_name이 각각 파라미터 이름이다.
39
44
 
40
45
  ### 입출력 지정
@@ -54,28 +59,34 @@ BEGIN
54
59
  END;
55
60
  ```
56
61
 
57
- 첫번째 파라미터와 두번째 파라미터 모두 VARCHAR2로 지정되어 있으며,
62
+ 첫번째 파라미터와 두번째 파라미터 모두 VARCHAR2로 지정되어 있으며,
58
63
 
59
- 이러한 프로시저를 호출해야 할 경우 파라미터 타입은 모두 String을 지정해야 하고,
64
+ 이러한 프로시저를 호출해야 할 경우 파라미터 타입은 모두 String을 지정해야 하고,
60
65
  출력의 경우, 최대 크기까지 지정해야 한다.
61
66
 
62
67
  호출 지정 예는 다음과 같다.
63
68
 
64
69
  ![procedure example1](./assets/../../../../assets/images/oracle-procedure-example1.png 'procedure example1')
65
70
 
66
-
67
71
  ### 접근자 [accessor](../concept/data-accessor.md)
68
72
 
69
73
  설정 방법은 [JSONATA 도큐먼트](http://docs.jsonata.org/overview.html)를 따른다.
70
74
 
75
+ '접근자'가 지정되면, 해당 접근자로 조성된 값이 프로시져의 파라미터로 사용된다.
71
76
 
72
- ###
77
+ 아래 '' 설정이 '상수'라면, 접근자 설정은 '변수'라고 할 수 있다.
73
78
 
74
- 파라미터가 입력(IN) 경우, 해당 값을 지정한다.
75
- 해당 값에 바로 상수 값을 입력하지 않고, 특정 태스크 이름을 지정하도록 한다.
79
+ 접근자 설정은 다음의 '값' 설정에 우선순위이다. 즉, 만약에 이 '접근자'가 설정되어있으면, '값(val)' 설정에 우선하여 '접근자' 연산의 결과가 프로시져 파라미터 값이 된다.
80
+ 결과 값이 없으면, '값'에 설정된 값이 사용된다.
81
+
82
+ ### 값(val)
83
+
84
+ 파라미터가 입력(IN)일 경우, 해당 값을 지정한다.
85
+ 해당 값에 바로 "상수" 값을 입력한다.
76
86
 
77
87
  위의 예어서 id의 입력 값을 ID라고 지정되어 있다면, ID 태스크에서 반환되는 값을 입력 값으로 지정한다.
78
88
 
89
+ 이 값은 위 '접근자' 설정에 따른 결과가 없는 경우에 이 '값'이 사용된다.
79
90
 
80
91
  ### 최대 크기
81
92
 
@@ -93,13 +104,12 @@ END;
93
104
  }
94
105
  ```
95
106
 
96
-
97
107
  ## 다른 사용 예(커서)
98
108
 
99
109
  ### 프로시저 작성 예
100
110
 
101
111
  ```sql
102
- CREATE OR REPLACDE NONEDITIONABLE PROCEDURE PROCEDURE1(out_cursor OUT SYS_REFCURSOR) AS
112
+ CREATE OR REPLACDE NONEDITIONABLE PROCEDURE PROCEDURE1(out_cursor OUT SYS_REFCURSOR) AS
103
113
  BEGIN
104
114
  BEGIN
105
115
  OPEN out_cursor FOR
@@ -136,4 +146,4 @@ END PROCEDURE1;
136
146
  ..
137
147
  ]
138
148
  }
139
- ```
149
+ ```
@@ -1,51 +1,50 @@
1
1
  # Oracle Procedure Task
2
2
 
3
- A task that calls a procedure stored in the Oracle database,
4
- It returns a list of data or a value of a specific data type, depending on the individual data type.
3
+ This task involves calling a procedure stored in an Oracle database. Depending on individual data types, it either returns a list of data or a specific data type's value.
5
4
 
6
5
  ## Parameters
7
6
 
8
7
  ### Procedure Code
9
- - The procedure code is the code that is automatically generated by the *procedure name* and *parameters* and does not need to be entered by the user.
10
- - If a procedure is named *mcs.myproc* and the parameters consist of *id* and *out_name*, it would look like this
11
- ```text
12
- mcs.myproc(:id, :out_name);
13
- ```
8
+
9
+ - The procedure code is automatically generated based on the _procedure name_ and _parameters_, and there's no need for users to input it.
10
+ - For example, if the procedure's name is _mcs.myproc_ with parameters _id_ and _out_name_, it would be expressed as follows:
11
+
12
+ ```text
13
+ mcs.myproc(:id, :out_name);
14
+ ```
14
15
 
15
16
  ### Procedure Name
16
- - Specifies the name of the procedure.
17
- - If the procedure needs to be separated by a package or user name, use a '.' to separate them.
18
- - Example.
19
- ```text
20
- mcs.myproc
21
- ```text mcs.myproc
17
+
18
+ - Specifies the name of the procedure.
19
+ - If the procedure needs to be distinguished by package or user names, use a period (.) to separate them.
20
+ - Example:
21
+
22
+ ```text
23
+ mcs.myproc
24
+ ```
22
25
 
23
26
  ### Parameters
24
- - A parameter consists of the following elements
25
- - A parameter name
26
- - Input/output designation: IN, INOUT, OUT
27
- - Parameter type: String, Number, Date, Cursor
28
- - Value: If the variable is an input, the value for that input.
29
- - MaxSize: If the variable is of type String or Buffer, the maximum size of the variable.
30
27
 
31
- #### Parameter names
28
+ - Parameters consist of the following elements:
29
+ - Parameter Name
30
+ - Direction: IN, INOUT, OUT
31
+ - Data Type: String, Number, Date, Cursor
32
+ - Value: For input variables, the corresponding value
33
+ - Max Size: For String or Buffer data types, the maximum size of the variable.
34
+
35
+ #### Parameter Name
32
36
 
33
- The parameter name specifies the name of the parameter used in the procedure.
34
- For the previous example,
35
- ```sql
36
- mcs.myproc(:id, :out_name);
37
- ```
38
- id and out_name are the parameter names.
37
+ The parameter name specifies the name of the parameter used in the procedure. In the example above, 'id' and 'out_name' are parameter names.
39
38
 
40
- ### Specifying input and output
39
+ ### Direction
41
40
 
42
- Specifies whether the variable is input (IN) or output (OUT).
41
+ Specifies whether the variable is an input (IN) or output (OUT) variable.
43
42
 
44
- ### parameter type
43
+ ### Data Type
45
44
 
46
- Specifies the type of the parameter. The type must be the same as the name specified in the actual procedure creation.
45
+ Specifies the data type of the parameter. The data type should be specified exactly as it is named when creating the procedure.
47
46
 
48
- If the procedure is implemented like this
47
+ For instance, if a procedure is implemented as follows:
49
48
 
50
49
  ```sql
51
50
  CREATE OR REPLACE NONEDITIONABLE PROCEDURE myproc (in_id IN VARCHAR2, out_name OUT VARCHAR2) AS
@@ -54,38 +53,37 @@ BEGIN
54
53
  END;
55
54
  ```
56
55
 
57
- Note that both the first and second parameters are specified as VARCHAR2,
56
+ Both the first and second parameters are of type VARCHAR2.
58
57
 
59
- If you need to call these procedures, the parameter types must be specified as String,
60
- For the output, the maximum size should be specified.
58
+ When calling such a procedure, you should specify the parameter type as String and, for output, also specify the maximum size.
61
59
 
62
- An example call specification is as follows
60
+ Here's an example of how to specify it:
63
61
 
64
- ![procedure example1](./assets/../../../../../assets/images/oracle-procedure-example1.png 'procedure example1')
62
+ ![procedure example1](./assets/../../../../assets/images/oracle-procedure-example1.png 'procedure example1')
65
63
 
64
+ ### Accessor
66
65
 
67
- ### Accessor [accessor](../concept/data-accessor.md)
66
+ The configuration follows the [JSONATA documentation](http://docs.jsonata.org/overview.html).
68
67
 
69
- Follow the [JSONATA documentation](http://docs.jsonata.org/overview.html) for configuration.
68
+ When the 'accessor' is specified, the value composed by that accessor is used as the parameter value. If no result is generated by the 'accessor' operation, the value set in 'Value (val)' is used.
70
69
 
70
+ ### Value (val)
71
71
 
72
- ### Value
72
+ If the parameter is an input (IN), this field specifies the value. Enter a "constant" value directly for this field.
73
73
 
74
- If the parameter is an input (IN), specify its value.
75
- Do not enter a constant value directly into the value, but specify a specific task name.
74
+ In the example mentioned earlier, if 'ID' is specified as the input value for the 'id' parameter, you should use the value returned by the ID task as the input value.
76
75
 
77
- In the example above, if the input value of id is specified as ID, specify the value returned by the ID task as the input value.
76
+ This value is used if there is no result from the 'accessor' setting.
78
77
 
78
+ ### Max Size
79
79
 
80
- ### Maximum size
81
-
82
- If the parameter type is String or Buffer, specify the maximum size. For other types, do not specify a value and ignore it.
80
+ For parameters with String or Buffer data types, specify the maximum size. Ignore this for other data types.
83
81
 
84
82
  ## Task Result
85
83
 
86
- The result of the procedure call is returned in the form of an Object, and the parameter name specified as the output is the key and returns the value.
84
+ The result of calling the procedure is returned in Object format, with the parameter names specified for output becoming keys and their corresponding values returned.
87
85
 
88
- For example, the task introduced above returns the following result value.
86
+ For example, in the task mentioned above, the result value would be:
89
87
 
90
88
  ```javascript
91
89
  {
@@ -93,13 +91,12 @@ For example, the task introduced above returns the following result value.
93
91
  }
94
92
  ```
95
93
 
94
+ ## Another Example (Cursor)
96
95
 
97
- ## Other usage examples (cursor)
98
-
99
- ### Example of writing a procedure
96
+ ### Procedure Implementation Example
100
97
 
101
98
  ```sql
102
- CREATE OR REPLACE NONEDITIONABLE PROCEDURE PROCEDURE1(out_cursor OUT SYS_REFCURSOR) AS
99
+ CREATE OR REPLACE NONEDITIONABLE PROCEDURE PROCEDURE1(out_cursor OUT SYS_REFCURSOR) AS
103
100
  BEGIN
104
101
  BEGIN
105
102
  OPEN out_cursor FOR
@@ -108,11 +105,11 @@ BEGIN
108
105
  END PROCEDURE1;
109
106
  ```
110
107
 
111
- ### Example of calling a procedure
108
+ ### Procedure Invocation Example
112
109
 
113
- ![procedure example2](./assets/../../../../../assets/images/oracle-procedure-example2.png 'procedure example2')
110
+ ![procedure example2](./assets/../../../../assets/images/oracle-procedure-example2.png 'procedure example2')
114
111
 
115
- ### Procedure task call result
112
+ ### Task Result for Procedure Invocation
116
113
 
117
114
  ```javascript
118
115
  {
@@ -133,7 +130,7 @@ END PROCEDURE1;
133
130
  "FARMHUM": 67.4,
134
131
  "PRECIPITATION": 0
135
132
  },
136
- ...
133
+ ..
137
134
  ]
138
135
  }
139
136
  ```
@@ -1,51 +1,52 @@
1
1
  # Tugas Prosedur Oracle
2
2
 
3
- Tugas ini memanggil prosedur yang disimpan dalam pangkalan data Oracle,
4
- dan mengembalikan senarai data atau nilai jenis data tertentu bergantung pada jenis data individu.
3
+ Tugas ini melibatkan pemanggilan prosedur yang disimpan dalam pangkalan data Oracle. Bergantung pada jenis data individual, tugas ini akan mengembalikan daftar data atau nilai jenis data tertentu.
5
4
 
6
5
  ## Parameter
7
6
 
8
7
  ### Kod Prosedur
9
- - Kod prosedur adalah kod yang dihasilkan secara automatik oleh *nama prosedur* dan *parameter*, dan pengguna tidak perlu memasukkannya secara berasingan.
10
- - Jika nama prosedur adalah *mcs.myproc* dan parameter terdiri daripada *id* dan *out_name*, ia akan dinyatakan seperti berikut.
11
- ```text
12
- mcs.myproc(:id, :out_name);
13
- ```
8
+
9
+ - Kod prosedur dihasilkan secara automatik berdasarkan _nama prosedur_ dan _parameter_, dan pengguna tidak perlu memasukkannya secara manual.
10
+ - Sebagai contoh, jika nama prosedurnya adalah _mcs.myproc_ dengan parameter _id_ dan _out_name_, maka ia akan dinyatakan seperti berikut:
11
+
12
+ ```text
13
+ mcs.myproc(:id, :out_name);
14
+ ```
14
15
 
15
16
  ### Nama Prosedur
16
- - Tentukan nama prosedur.
17
- - Jika prosedur perlu dibezakan dengan nama pakej atau pengguna, dll., ia dibezakan dengan '.'.
18
- - Contoh penggunaan.
19
- ```text
20
- mcs.myproc
21
- ```
17
+
18
+ - Menentukan nama prosedur.
19
+ - Jika prosedur perlu dibezakan mengikut nama pakej atau pengguna, gunakan titik (.) untuk memisahkan mereka.
20
+ - Contoh:
21
+
22
+ ```text
23
+ mcs.myproc
24
+ ```
22
25
 
23
26
  ### Parameter
24
- - Parameter terdiri daripada elemen-elemen berikut.
25
- - Nama parameter
26
- - Penentuan input / output: IN, INOUT, OUT
27
- - Jenis parameter: String, Number, Date, Cursor
28
- - Nilai: Jika pemboleh ubah itu adalah input, nilai untuk input itu
29
- - Saiz maksimum: Jika jenis pemboleh ubah adalah String atau Buffer, tentukan saiz maksimum pemboleh ubah.
27
+
28
+ - Parameter terdiri daripada elemen-elemen berikut:
29
+ - Nama Parameter
30
+ - Arah: IN, INOUT, OUT
31
+ - Jenis Data Parameter: String, Number, Date, Cursor
32
+ - Nilai: Untuk pembolehubah input, nilai yang bersesuaian
33
+ - Saiz Maksimum: Untuk jenis data String atau Buffer, saiz maksimum pembolehubah tersebut.
30
34
 
31
35
  #### Nama Parameter
32
36
 
33
- Nama parameter menentukan nama parameter yang digunakan semasa membuat prosedur.
34
- Dalam contoh di atas,
35
- ```sql
36
- mcs.myproc(:id, :out_name);
37
- ```
38
- id dan out_name adalah nama parameter masing-masing.
37
+ Nama parameter menentukan nama parameter yang digunakan dalam prosedur. Dalam contoh di atas, 'id' dan 'out_name' adalah nama parameter.
38
+
39
+ ### Arah
39
40
 
40
- ### Penentuan Input / Output
41
+ Menentukan sama ada pembolehubah tersebut adalah pembolehubah input (IN) atau output (OUT).
41
42
 
42
- Tentukan sama ada pemboleh ubah itu adalah input (IN) atau output (OUT).
43
+ ### Jenis Data Parameter
43
44
 
44
- ### Jenis Parameter
45
+ Menentukan jenis data parameter. Jenis data ini harus ditentukan dengan tepat seperti yang dinamakan semasa membuat prosedur.
45
46
 
46
- Tentukan jenis parameter. Jenis harus ditentukan sama dengan nama yang ditentukan semasa membuat prosedur sebenar.
47
+ Sebagai contoh
47
48
 
48
- Jika prosedur diimplementasikan seperti berikut,
49
+ , jika sebuah prosedur diimplementasikan seperti berikut:
49
50
 
50
51
  ```sql
51
52
  CREATE OR REPLACE NONEDITIONABLE PROCEDURE myproc (in_id IN VARCHAR2, out_name OUT VARCHAR2) AS
@@ -54,38 +55,37 @@ BEGIN
54
55
  END;
55
56
  ```
56
57
 
57
- Parameter pertama dan kedua kedua-duanya ditentukan sebagai VARCHAR2,
58
+ Kedua-dua parameter pertama dan kedua adalah jenis VARCHAR2.
58
59
 
59
- Jika anda perlu memanggil prosedur seperti itu, anda harus menentukan semua jenis parameter sebagai String,
60
- dan dalam kes output, anda juga harus menentukan saiz maksimum.
60
+ Apabila memanggil prosedur seperti ini, anda perlu menentukan jenis parameter sebagai String dan, untuk output, juga menentukan saiz maksimum.
61
61
 
62
- Contoh penentuan panggilan adalah seperti berikut.
62
+ Inilah contoh bagaimana untuk menentukannya:
63
63
 
64
- ![contoh prosedur1](./assets/../../../../assets/images/oracle-procedure-example1.png 'contoh prosedur1')
64
+ ![contoh prosedur 1](./assets/../../../../assets/images/oracle-procedure-example1.png 'contoh prosedur 1')
65
65
 
66
+ ### Pembolehubah Akses
66
67
 
67
- ### Akses [accessor](../concept/data-accessor.md)
68
+ Konfigurasi mengikuti [dokumentasi JSONATA](http://docs.jsonata.org/overview.html).
68
69
 
69
- Cara menetapkan mengikuti [dokumen JSONATA](http://docs.jsonata.org/overview.html).
70
+ Apabila 'pembolehubah akses' ditentukan, nilai yang disusun oleh pembolehubah tersebut digunakan sebagai nilai parameter. Jika tiada hasil yang dihasilkan oleh operasi 'pembolehubah', nilai yang ditetapkan dalam 'Nilai (val)' juga digunakan.
70
71
 
72
+ ### Nilai (val)
71
73
 
72
- ### Nilai
74
+ Jika pembolehubah tersebut adalah input (IN), medan ini menentukan nilai tersebut. Masukkan nilai "tetap" secara langsung untuk medan ini.
73
75
 
74
- Jika parameter adalah input (IN), tentukan nilainya.
75
- Alih-alih memasukkan nilai konstan secara langsung ke dalam nilai ini, tentukan nama tugas tertentu.
76
-
77
- Dalam contoh di atas, jika nilai input untuk id ditetapkan sebagai ID, nilai yang dikembalikan oleh tugas ID ditetapkan sebagai nilai input.
76
+ Dalam contoh yang disebutkan sebelum ini, jika 'ID' ditetapkan sebagai nilai input untuk parameter 'id', anda harus menggunakan nilai yang dihasilkan oleh tugas ID sebagai nilai input.
78
77
 
78
+ Nilai ini digunakan jika hasil dari tetapan 'pembolehubah' tidak ada.
79
79
 
80
80
  ### Saiz Maksimum
81
81
 
82
- Jika jenis parameter adalah String atau Buffer, tentukan saiz maksimum. Untuk jenis lain, abaikan nilai yang tidak ditentukan.
82
+ Untuk pembolehubah dengan jenis data String atau Buffer, tentukan saiz maksimum. Abaikan ini untuk jenis data lain.
83
83
 
84
84
  ## Hasil Tugas
85
85
 
86
- Hasil panggilan prosedur dikembalikan dalam bentuk Objek, dan nama parameter yang ditetapkan sebagai output menjadi kunci untuk mengembalikan nilainya.
86
+ Hasil daripada pemanggilan prosedur dikembalikan dalam format Objek, dengan nama parameter yang ditentukan untuk output menjadi kunci dan nilai yang sesuai menjadi hasilnya.
87
87
 
88
- Jika tugas yang diperkenalkan di atas mengembalikan hasil seperti berikut.
88
+ Sebagai contoh, dalam tugas yang disebutkan di atas, hasilnya akan seperti berikut:
89
89
 
90
90
  ```javascript
91
91
  {
@@ -93,13 +93,12 @@ Jika tugas yang diperkenalkan di atas mengembalikan hasil seperti berikut.
93
93
  }
94
94
  ```
95
95
 
96
+ ## Contoh Lain (Cursor)
96
97
 
97
- ## Contoh Penggunaan Lain (Kursor)
98
-
99
- ### Contoh Pembuatan Prosedur
98
+ ### Contoh Implementasi Prosedur
100
99
 
101
100
  ```sql
102
- CREATE OR REPLACDE NONEDITIONABLE PROCEDURE PROCEDURE1(out_cursor OUT SYS_REFCURSOR) AS
101
+ CREATE OR REPLACE NONEDITIONABLE PROCEDURE PROCEDURE1(out_cursor OUT SYS_REFCURSOR) AS
103
102
  BEGIN
104
103
  BEGIN
105
104
  OPEN out_cursor FOR
@@ -110,9 +109,9 @@ END PROCEDURE1;
110
109
 
111
110
  ### Contoh Panggilan Prosedur
112
111
 
113
- ![contoh prosedur2](./assets/../../../../assets/images/oracle-procedure-example2.png 'contoh prosedur2')
112
+ ![contoh prosedur 2](./assets/../../../../assets/images/oracle-procedure-example2.png 'contoh prosedur 2')
114
113
 
115
- ### Hasil Panggilan Tugas Prosedur
114
+ ### Hasil Tugas untuk Panggilan Prosedur
116
115
 
117
116
  ```javascript
118
117
  {