OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HeavySqlTypeNameSpec.java
Go to the documentation of this file.
1 package com.mapd.parser.extension.ddl.heavysql;
2 
3 import org.apache.calcite.sql.SqlBasicTypeNameSpec;
4 import org.apache.calcite.sql.SqlWriter;
5 import org.apache.calcite.sql.parser.SqlParserPos;
6 import org.apache.calcite.sql.type.SqlTypeName;
7 
8 public class HeavySqlTypeNameSpec extends SqlBasicTypeNameSpec {
9  private String name;
10  private Integer coordinate = null;
11 
12  public HeavySqlTypeNameSpec(String name, SqlTypeName type, SqlParserPos pos) {
13  super(type, pos);
14  this.name = name;
15  }
16 
18  String name, Integer coordinate, SqlTypeName type, SqlParserPos pos) {
19  super(type, pos);
20  this.name = name;
21  this.coordinate = coordinate;
22  }
23 
25  return coordinate;
26  }
27 
28  public String getName() {
29  return name;
30  }
31 
32  @Override
33  public void unparse(SqlWriter writer, int leftPrec, int rightPrec) {
34  writer.keyword(name);
35  }
36 }
void unparse(SqlWriter writer, int leftPrec, int rightPrec)
HeavySqlTypeNameSpec(String name, SqlTypeName type, SqlParserPos pos)
HeavySqlTypeNameSpec(String name, Integer coordinate, SqlTypeName type, SqlParserPos pos)