HomeMogDBMogDB StackUqbar
v5.0

Documentation:v5.0

Supported Versions:

Other Versions:

Support For Passing The Count Attribute Of An Array As A Parameter Of The Array Extend

Availability

This feature is available since MogDB 5.0.0.

Introduction

This feature supports passing the count attribute of an array as a parameter to the extend syntax of a procedure that extends an array.

Currently, there is an extend method for arrays, but this method does not support passing "array.count" as a parameter, so this feature only adds support for passing "array.count" as a parameter without changing the behavior of This feature only adds support for passing the "array.count" attribute as a parameter, and does not change any existing behavior.

Currently, the extend method of array does not support calling methods with two arguments.

Benefits

Enhance MogDB compatibility with Oracle to reduce application migration costs.

Constraints

Must conform to "array_var.extend(other_array_var.count)" syntax. Two arrays can be the same variable.

Syntax Description

array_var.extend(array_var.count);

Example

CREATE PROCEDURE proc_test_typearray_pro IS
type t1 IS record (a int);
type t1_t IS TABLE of t1;
v1 t1_t;
v2 t1_t;
BEGIN
  v1[1].a:=1;
  v1[2].a:=2;
  v2.extend(v1.count);
  raise notice '%',v2.count;
END;
Copyright © 2011-2024 www.enmotech.com All rights reserved.