Class SqlCollectionTypeNameSpec

java.lang.Object
org.apache.calcite.sql.SqlTypeNameSpec
org.apache.calcite.sql.SqlCollectionTypeNameSpec

public class SqlCollectionTypeNameSpec extends SqlTypeNameSpec
A sql type name specification of collection type.

The grammar definition in SQL-2011 IWD 9075-2:201?(E) 6.1 <collection type> is as following:

 <collection type> ::=
     <array type>
   | <multiset type>

 <array type> ::=
   <data type> ARRAY
   [ <left bracket or trigraph>
     <maximum cardinality>
     <right bracket or trigraph> ]

 <maximum cardinality> ::=
   <unsigned integer>

 <multiset type> ::=
   <data type> MULTISET
 

This class is intended to describe SQL collection type. It can describe either simple collection type like "int array" or nested collection type like "int array array" or "int array multiset". For nested collection type, the element type name of this SqlCollectionTypeNameSpec is also a SqlCollectionTypeNameSpec.

  • Constructor Details

    • SqlCollectionTypeNameSpec

      public SqlCollectionTypeNameSpec(SqlTypeNameSpec elementTypeName, SqlTypeName collectionTypeName, SqlParserPos pos)
      Creates a SqlCollectionTypeNameSpec.
      Parameters:
      elementTypeName - Type of the collection element
      collectionTypeName - Collection type name
      pos - Parser position, must not be null
  • Method Details