public class DataType extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DataType.ExaCharset |
static class |
DataType.ExaDataType |
static class |
DataType.IntervalType |
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_EXASOL_CHAR_SIZE |
static int |
MAX_EXASOL_DECIMAL_PRECISION |
static int |
MAX_EXASOL_VARCHAR_SIZE |
| Modifier and Type | Method and Description |
|---|---|
static DataType |
createBool()
Create a
BOOL data type |
static DataType |
createChar(int size,
DataType.ExaCharset charset)
Create a
CHAR data type with a given size and character set |
static DataType |
createDate()
Create a
DATE data type |
static DataType |
createDecimal(int precision,
int scale)
Create a
DECIMAL (i.e. |
static DataType |
createDouble()
Create a
DOUBLE (i.e. |
static DataType |
createGeometry(int srid)
Create a
GEOMETRY data type |
static DataType |
createIntervalDaySecond(int precision,
int fraction)
Create an
INTERVAL DAY TO SECOND data type |
static DataType |
createIntervalYearMonth(int precision)
Create an
INTERVAL YEAR TO MONTH data type |
static DataType |
createMaximumSizeChar(DataType.ExaCharset charset)
Create a
CHAR data type with the maximum size supported by Exasol |
static DataType |
createMaximumSizeVarChar(DataType.ExaCharset charset)
Create a
VARCHAR data type with the maximum size supported by Exasol |
static DataType |
createTimestamp(boolean withLocalTimezone)
Create a
TIMESTAMP data type |
static DataType |
createUnsupported()
Create an
UNSUPPORTED data type |
static DataType |
createVarChar(int size,
DataType.ExaCharset charset)
Create a
VARCHAR data type with a given size and character set |
boolean |
equals(Object o) |
DataType.ExaCharset |
getCharset()
Get the character set
|
DataType.ExaDataType |
getExaDataType()
Get the Exasol data type without parameters
|
int |
getGeometrySrid()
Get the Spatial Reference System Identifier (SRID) that was used to encode the geometry
|
int |
getIntervalFraction()
Get the interval fraction
|
DataType.IntervalType |
getIntervalType()
Get the interval type
|
int |
getPrecision()
Get the precision
|
int |
getScale()
Get the scale
|
int |
getSize()
Get the size
|
int |
hashCode() |
boolean |
isSupported()
Check if the data type is supported.
|
boolean |
isWithLocalTimezone()
Check whether the timestamp uses the local time zone
|
String |
toString() |
public static final int MAX_EXASOL_CHAR_SIZE
public static final int MAX_EXASOL_VARCHAR_SIZE
public static final int MAX_EXASOL_DECIMAL_PRECISION
public static DataType createVarChar(int size, DataType.ExaCharset charset)
VARCHAR data type with a given size and character setsize - size of the data type in characterscharset - character set to be used when creating the data typeVARCHAR typepublic static DataType createMaximumSizeVarChar(DataType.ExaCharset charset)
VARCHAR data type with the maximum size supported by Exasolcharset - character set to be used when creating the data typeVARCHAR typepublic static DataType createChar(int size, DataType.ExaCharset charset)
CHAR data type with a given size and character setsize - size of the data type in characterscharset - character set to be used when creating the data typeCHAR typepublic static DataType createMaximumSizeChar(DataType.ExaCharset charset)
CHAR data type with the maximum size supported by Exasolcharset - character set to be used when creating the data typeCHAR typepublic static DataType createDecimal(int precision, int scale)
DECIMAL (i.e. fixed point value) data typeprecision - total number of places before and after the point that an instance of this type can holdscale - number of decimal places behind the pointDECIMAL data typepublic static DataType createDouble()
DOUBLE (i.e. double-precision floating point value) data typeDOUBLE data typepublic static DataType createDate()
DATE data typeDATE data typepublic static DataType createUnsupported()
UNSUPPORTED data typeUNSUPPORTED data typepublic static DataType createTimestamp(boolean withLocalTimezone)
TIMESTAMP data typewithLocalTimezone - defines whether the timestamp is local time (true) or
UTC(false)TIMESTAMP data typepublic static DataType createBool()
BOOL data typeBOOL data typepublic static DataType createGeometry(int srid)
GEOMETRY data typesrid - Spatial Reference System IdentifierGEOMETRY data typepublic static DataType createIntervalDaySecond(int precision, int fraction)
INTERVAL DAY TO SECOND data typeprecision - number of days the interval can spanfraction - decimal places after the pointINTERVAL DAY TO SECOND data typepublic static DataType createIntervalYearMonth(int precision)
INTERVAL YEAR TO MONTH data typeprecision - number of years the interval can spanINTERVAL YEAR TO MONTH data typepublic DataType.ExaDataType getExaDataType()
public int getPrecision()
public int getScale()
public int getSize()
public DataType.ExaCharset getCharset()
public boolean isWithLocalTimezone()
true if the timestamp uses the local time zonepublic int getGeometrySrid()
public DataType.IntervalType getIntervalType()
public int getIntervalFraction()
public boolean isSupported()
true if the data type is supported by the Virtual Schema.Copyright © 2019. All rights reserved.