Closed jwovens closed 8 years ago
The motivation is that the user doesn't need to think in terms of a nested table of strings versus a nested table of integers. This can be achieved in part by subtyping objects, but it is easier to just define a type (nested table of strings) which can also cast numbers as strings. By naming this type as varargs, it has more semantic meaning. e.g can do both of
my_array VARARGS := VARARGS('hello','world');
my_array VARARGS := VARARGS(1,2,3,4);
Hello
Consider creating an object type within the TAP schema with different constructor methods that, depending on the arguments, a different constructor is invoked returning a nested_table of different intrinsic data types. e.g.
my_array ARRAY := ARRAY('hello','world'); -- creates a nested table of strings
my_array ARRAY := ARRAY(1,2,3,4); -- creates a nested table of numbers
etc.Don't know if you can do this, but using an overloaded ARRAY constructor would make testing collections easier.