Details
-
New Feature
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
None
Description
This tasks is a subtask of MDEV-13139.
Under terms of this task we'll implement a way to declare SP variables using TYPE declarations from package specifications.
For example:
This package specification declares a public data type varchar_array:
SET sql_mode=ORACLE; |
DELIMITER $$
|
CREATE OR REPLACE PACKAGE pkg AS |
TYPE varchar_array IS TABLE OF VARCHAR(2000) INDEX BY INTEGER; |
END; |
$$
|
DELIMITER ;
|
This procedure uses the data type varchar_array using a qualified notation:
DELIMITER $$
|
CREATE OR REPLACE PROCEDURE p1 AS |
v pkg.varchar_array;
|
BEGIN
|
v(0):='test'; |
SELECT v(0); |
END; |
$$
|
DELIMITER ;
|
CALL p1();
|
+------+
|
| v(0) |
|
+------+
|
| test |
|
+------+
|
Note, this task is only about variables. Stored routine parameters and stored function return values will be implemented separately.