OmniSciDB  085a039ca4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
com.mapd.parser.extension.ddl.heavysql.HeavySqlDataType Class Reference
+ Inheritance diagram for com.mapd.parser.extension.ddl.heavysql.HeavySqlDataType:
+ Collaboration diagram for com.mapd.parser.extension.ddl.heavysql.HeavySqlDataType:

Public Member Functions

 HeavySqlDataType (final SqlDataTypeSpec type, final boolean notNull, final HeavySqlArray array, final HeavySqlEncoding encoding)
 
- Public Member Functions inherited from com.mapd.parser.extension.ddl.heavysql.HeavySqlJson
String toString ()
 
- Public Member Functions inherited from com.mapd.parser.extension.ddl.JsonSerializableDdl
default String toJsonString ()
 

Private Attributes

String type
 
HeavySqlArray array
 
Integer precision
 
Integer scale
 
boolean notNull
 
Integer coordinateSystem
 
HeavySqlEncoding encoding
 

Detailed Description

Definition at line 10 of file HeavySqlDataType.java.

Constructor & Destructor Documentation

com.mapd.parser.extension.ddl.heavysql.HeavySqlDataType.HeavySqlDataType ( final SqlDataTypeSpec  type,
final boolean  notNull,
final HeavySqlArray  array,
final HeavySqlEncoding  encoding 
)
inline

Definition at line 26 of file HeavySqlDataType.java.

References com.mapd.parser.extension.ddl.heavysql.HeavySqlDataType.encoding, com.mapd.parser.extension.ddl.heavysql.HeavySqlArray.getSize(), com.mapd.parser.extension.ddl.heavysql.HeavySqlDataType.notNull, and com.mapd.parser.extension.ddl.heavysql.HeavySqlJson.toString().

29  {
30  requireNonNull(type);
31  if (type.getTypeNameSpec() instanceof HeavySqlTypeNameSpec) {
32  HeavySqlTypeNameSpec typeNameSpec = (HeavySqlTypeNameSpec) type.getTypeNameSpec();
33  this.type = typeNameSpec.getName();
34  this.coordinateSystem = typeNameSpec.getCoordinate();
35  } else {
36  this.type = type.getTypeName().toString();
37  }
38  if (type.getTypeNameSpec() instanceof SqlBasicTypeNameSpec) {
39  SqlBasicTypeNameSpec typeNameSpec = (SqlBasicTypeNameSpec) type.getTypeNameSpec();
40  this.precision =
41  typeNameSpec.getPrecision() == -1 ? null : typeNameSpec.getPrecision();
42  this.scale = typeNameSpec.getScale() == -1 ? null : typeNameSpec.getScale();
43  }
44  if (array != null) {
45  this.array = new HeavySqlArray(this.type, array.getSize());
46  this.type = "ARRAY";
47  }
48  this.notNull = notNull;
49  this.encoding = encoding;
50  }

+ Here is the call graph for this function:

Member Data Documentation

HeavySqlArray com.mapd.parser.extension.ddl.heavysql.HeavySqlDataType.array
private

Definition at line 14 of file HeavySqlDataType.java.

Integer com.mapd.parser.extension.ddl.heavysql.HeavySqlDataType.coordinateSystem
private

Definition at line 22 of file HeavySqlDataType.java.

HeavySqlEncoding com.mapd.parser.extension.ddl.heavysql.HeavySqlDataType.encoding
private
boolean com.mapd.parser.extension.ddl.heavysql.HeavySqlDataType.notNull
private
Integer com.mapd.parser.extension.ddl.heavysql.HeavySqlDataType.precision
private
Integer com.mapd.parser.extension.ddl.heavysql.HeavySqlDataType.scale
private
String com.mapd.parser.extension.ddl.heavysql.HeavySqlDataType.type
private

The documentation for this class was generated from the following file: