Class SqlRowTypeNameSpec

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

public class SqlRowTypeNameSpec extends SqlTypeNameSpec
A sql type name specification of row type.

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

 <row type> ::=
   ROW <row type body>
 <row type body> ::=
   <left paren> <field definition>
   [ { <comma> <field definition> }... ]
   <right paren>

 <field definition> ::=
   <field name> <data type>
 

As a extended syntax to the standard SQL, each field type can have a [ NULL | NOT NULL ] suffix specification, i.e. Row(f0 int null, f1 varchar not null). The default is NOT NULL(not nullable).

  • Constructor Details

    • SqlRowTypeNameSpec

      public SqlRowTypeNameSpec(SqlParserPos pos, List<SqlIdentifier> fieldNames, List<SqlDataTypeSpec> fieldTypes)
      Creates a row type specification.
      Parameters:
      pos - The parser position
      fieldNames - The field names
      fieldTypes - The field data types
  • Method Details