OmniSciDB  95562058bd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType Class Reference
+ Inheritance diagram for com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType:
+ Collaboration diagram for com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType:

Public Member Functions

 OmniSqlDataType (final SqlDataTypeSpec type, final boolean notNull, final OmniSqlArray array, final OmniSqlEncoding encoding)
 
- Public Member Functions inherited from com.mapd.parser.extension.ddl.omnisql.OmniSqlJson
String toString ()
 
- Public Member Functions inherited from com.mapd.parser.extension.ddl.JsonSerializableDdl
default String toJsonString ()
 

Private Attributes

String type
 
OmniSqlArray array
 
Integer precision
 
Integer scale
 
boolean notNull
 
Integer coordinateSystem
 
OmniSqlEncoding encoding
 

Detailed Description

Definition at line 10 of file OmniSqlDataType.java.

Constructor & Destructor Documentation

com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType.OmniSqlDataType ( final SqlDataTypeSpec  type,
final boolean  notNull,
final OmniSqlArray  array,
final OmniSqlEncoding  encoding 
)
inline

Definition at line 26 of file OmniSqlDataType.java.

References com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType.encoding, com.mapd.parser.extension.ddl.omnisql.OmniSqlArray.getSize(), com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType.notNull, and com.mapd.parser.extension.ddl.omnisql.OmniSqlJson.toString().

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

+ Here is the call graph for this function:

Member Data Documentation

OmniSqlArray com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType.array
private

Definition at line 14 of file OmniSqlDataType.java.

Integer com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType.coordinateSystem
private

Definition at line 22 of file OmniSqlDataType.java.

OmniSqlEncoding com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType.encoding
private
boolean com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType.notNull
private
Integer com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType.precision
private
Integer com.mapd.parser.extension.ddl.omnisql.OmniSqlDataType.scale
private

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