public class SqlCollectionTypeNameSpec extends SqlTypeNameSpec
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 and Description |
|---|
SqlCollectionTypeNameSpec(SqlTypeNameSpec elementTypeName,
SqlTypeName collectionTypeName,
SqlParserPos pos)
Creates a
SqlCollectionTypeNameSpec. |
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
deriveType(SqlValidator validator)
Derive type from this SqlTypeNameSpec.
|
boolean |
equalsDeep(SqlTypeNameSpec spec,
Litmus litmus)
Returns whether this spec is structurally equivalent to another spec.
|
SqlTypeNameSpec |
getElementTypeName() |
void |
unparse(SqlWriter writer,
int leftPrec,
int rightPrec)
Writes a SQL representation of this spec to a writer.
|
getParserPos, getTypeNamepublic SqlCollectionTypeNameSpec(SqlTypeNameSpec elementTypeName, SqlTypeName collectionTypeName, SqlParserPos pos)
SqlCollectionTypeNameSpec.elementTypeName - Type of the collection elementcollectionTypeName - Collection type namepos - Parser position, must not be nullpublic SqlTypeNameSpec getElementTypeName()
public RelDataType deriveType(SqlValidator validator)
SqlTypeNameSpecderiveType in class SqlTypeNameSpecvalidator - The sql validatorRelDataType instance, throws exception if we could not
deduce the typepublic void unparse(SqlWriter writer, int leftPrec, int rightPrec)
SqlTypeNameSpecunparse in class SqlTypeNameSpecpublic boolean equalsDeep(SqlTypeNameSpec spec, Litmus litmus)
SqlTypeNameSpecequalsDeep in class SqlTypeNameSpecCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.