OmniSciDB  95562058bd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OmniSqlTypeNameSpec.java
Go to the documentation of this file.
1 package com.mapd.parser.extension.ddl.omnisql;
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 OmniSqlTypeNameSpec extends SqlBasicTypeNameSpec {
9  private String name;
10  private Integer coordinate = null;
11 
12  public OmniSqlTypeNameSpec(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 
24  public Integer getCoordinate() {
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 }
OmniSqlTypeNameSpec(String name, SqlTypeName type, SqlParserPos pos)
void unparse(SqlWriter writer, int leftPrec, int rightPrec)
OmniSqlTypeNameSpec(String name, Integer coordinate, SqlTypeName type, SqlParserPos pos)