HomeMogDBMogDB StackUqbar
v5.0

Documentation:v5.0

Supported Versions:

Other Versions:

Custom Type Array

Availability

This feature is available since MogDB 5.0.0.

Introduction

This feature supports the creation of custom type arrays.

Benefits

Enhance MogDB compatibility with Oracle to reduce application migration costs.

Description

This feature supports the creation of custom type arrays.

Constraints

  • The element type of the array must be of a pre-existing type and cannot be an array.
  • Array size is ignored.
  • Custom type arrays do not support nested types.
  • Custom type arrays do not support column storage.
  • The fields of custom type array do not support GIN index, BRIN index, BLOOM index.
  • The fields of a custom type array are not supported as Hash partition keys.
  • The fields of a custom type array are not supported as RANGE partition keys.
  • Fields in a custom type array are not supported as list partition keys.
  • Fields of a custom type array do not support array nesting.
  • The fields of a custom type array are not supported as encrypted fields.

Syntax Description

CreateType ::= CREATE TYPE name { AS | IS } { VARRAY | ARRAY } (integer_value) OF data_type;

This syntax is equivalent to the following syntax (ignoring integer_value):

CreateType ::= CREATE TYPE name { AS | IS } TABLE OF data_type;

Parameter Description:

  • integer_value

    Unsigned 32bit positive integers (0-2147483647) such as 1, 100, 300, etc.

Example

CREATE TYPE t_array IS VARRAY(10000) OF VARCHAR2(1000);

CREATE TYPEALTER TYPEDROP TYPE

Copyright © 2011-2024 www.enmotech.com All rights reserved.