Class TTypeName
- Namespace
- gudusoft.gsqlparser.nodes
- Assembly
- gudusoft.gsqlparser.dll
This class represents SQL Datatype. call method String will return string representation of datatype including type name,length,precision,scale and attributes
- typename
- typename(length)
- length: Length
- typename(precision,scale)
datetype attribute
In datatype like this: MEDIUMTEXT [CHARACTER SET cs_name] [COLLATE collation_name],
CHARACTER SET and COLLATE were treated as attribute of the MEDIUMTEXT datatype,those attributes
can be fetched from DatatypeAttributeList. For more detailed information about
attributes in datatype, please check TDatatypeAttribute.
method DatatypeAttributeList can be used to get datatype attribute such as FORMAT 'yyyymmdd' of DATE in this fuction: CAST('20120802' AS DATE FORMAT 'yyyymmdd').
BINARY
- BINARY[(n)]
- BINARY LARGE OBJECT
- BLOB
- GRAPHIC
- LONGBLOB
- LONG RAW
- VARBINARY[(n)]
- BYTEA
- IMAGE(SQL Server)
- TINYBLOB(MySQL, SQL Server)
BOOLEAN
CHARACTER STRING
- CHAR[(n)]/CHARACTER[(n)]
- CHARACTER VARYING(n)/VARCHAR(n)/CHAR VARYING(n)/VARCHAR2(n) (Oracle)
- NATIONAL CHARACTER[(n)]/NATIONAL CHAR[(n)]/NCHAR[(n)]
- NATIONAL CHARACTER VARYING(n)/NATIONAL CHAR VARYING(n)/NCHAR VARYING(n)/NVARCHAR/VARGRAPHIC(n)
- nvarchar_t
- n: Length
- NVARCHAR2(n) (Oracle)
- CHARACTER LARGE OBJECT/CLOB
- NATIONAL CHARACTER LARGE OBJECT
- NCLOB
- DBCLOB
- NTEXT/NATIONAL TEXT(SQL Server)
- TEXT
- CHAR FOR BIT DATA
- VARCHAR FOR BIT DATA
- TINYTEXT(MySQL)
DATALINK
- DATALINK
INTERVAL
- INTERVAL
- INTERVAL DAY[(precision)]
- interval_day_t
- precision: Precision
- INTERVAL DAY[(precision)] TO SECOND[(second precision)]
- interval_day_to_second_t
- precision: Precision
- second precision: SecondsPrecision
- INTERVAL DAY[(precision)] TO MINUTE
- interval_day_to_minute_t
- precision: Precision
- INTERVAL DAY[(precision)] TO HOUR
- interval_day_to_hour_t
- precision: Precision
- INTERVAL YEAR[(precision)] TO MONTH
- interval_year_to_month_t
- precision: Precision
- TIMESPAN
COLLECTION
- ARRAY
- MULTISET
NUMERIC
- INTEGER/INT
- INT4(PostgreSQL)
- MEDIUMINT(MySQL)
- SMALLINT
- INT2(PostgreSQL)
- BIGINT
- NUMERIC(p,s)
- NUMBER(p,s)
- DEC[IMAL](p,s)
- FLOAT(p,s)
- FLOAT4(PostgreSQL)
- FLOAT8(PostgreSQL)
- REAL
- DOUBLE/DOUBLE PRECISION
- BINARY_FLOAT(Oracle)
- BINARY_DOUBLE(Oracle)
- TINYINT/YEAR(MySQL)
TEMPORAL
- DATE
- TIME
- TIME WITH TIME ZONE/TIMETZ(PostgreSQL)
- TIMESTAMP [(fractional_seconds)]
- timestamp_t
- fractional_seconds: Precision
- TIMESTAMP [(fractional_seconds)] WITH TIME ZONE
- timestamp_with_time_zone_t
- fractional_seconds: Precision
- DATETIME
- SMALLDATETIME
- DATETIMEOFFSET[ (fractional seconds precision) ]
- datetimeoffset_t
- fractional seconds precision: Precision
- DATETIME2[ (fractional seconds precision) ](SQL Server)
- datetime2_t
- fractional seconds precision: Precision
- TIMESTAMPTZ
XML
- XML
- XMLTYPE(Oracle)
HIVE array <T>
- arry <T>
OTHERS
- BFILE(Oracle)
- BIT(MySQL,PostgreSQL,SQL Server)
- BITVARYING/VARBIT(PostgreSQL)
- BOX(PostgreSQL)
- CIDR(PostgreSQL)
- CIRCLE(PostgreSQL)
- CURSOR(SQL Server)
- ENUM(MySQL, PostgreSQL)
- GEOGRAPHY(SQL Server)
- GEOMETRY(SQL Server)
- HIERARCHYID(SQL Server)
- INET(PostgreSQL)
- LINE(PostgreSQL)
- LONG(Oracle)
- LONG VARCHAR
- LONG VARGRAPHIC
- LONGTEXT(MySQL)
- LSEG(PostgreSQL)
- MACADDR(PostgreSQL)
- MEDIUMBLOB(MySQL)
- MEDIUMTEXT(MySQL)
- MONEY(PostgreSQL,SQL Server)
- OID(PostgreSQL)
- PATH(PostgreSQL)
- POINT(PostgreSQL)
- POLYGON(PostgreSQL)
- RAW(Oracle)
- ROWID(Oracle)
- ROWVERSION(SQL Server)
- SERIAL, SERIAL4(MySQL,PostgreSQL)
- SERIAL8, BIGSERIAL(PostgreSQL)
- SET(MySQL)
- SMALLMONEY(SQL Server)
- SQL_VARIANT(SQL Server)
- TABLE(SQL Server)
- UNIQUEIDENTIFIER(SQL Server)
- UROWID(Oracle)
datatypes optional attributes:
- NSIGNED (MySQL)
- ZEROFILL (MySQL)
- CHARACTER SET cs_name (MySQL)
- COLLATE collation_name (MySQL)
public class TTypeName : TParseTreeNode, Visitable
- Inheritance
-
TTypeName
- Implements
- Inherited Members
Fields
lfdBfile
public const int lfdBfile = 79
Field Value
lfdBigInt
public const int lfdBigInt = 45
Field Value
lfdBinary
public const int lfdBinary = 34
Field Value
lfdBinaryInteger
public const int lfdBinaryInteger = 107
Field Value
lfdBinaryLargeObject
public const int lfdBinaryLargeObject = 102
Field Value
lfdBit
public const int lfdBit = 22
Field Value
lfdBlob
public const int lfdBlob = 76
Field Value
lfdBoolean
public const int lfdBoolean = 23
Field Value
lfdByte
public const int lfdByte = 143
Field Value
lfdByteint
public const int lfdByteint = 120
Field Value
lfdChar
public const int lfdChar = 47
Field Value
lfdCharLargeObject
public const int lfdCharLargeObject = 171
Field Value
lfdCharVarying
public const int lfdCharVarying = 146
Field Value
lfdCharacter
public const int lfdCharacter = 46
Field Value
lfdCharacterLargeObject
public const int lfdCharacterLargeObject = 148
Field Value
lfdCharacterVarying
public const int lfdCharacterVarying = 145
Field Value
lfdClob
public const int lfdClob = 77
Field Value
lfdDBClob
public const int lfdDBClob = 172
Field Value
lfdDatalink
public const int lfdDatalink = 106
Field Value
lfdDate
public const int lfdDate = 63
Field Value
lfdDatetime
public const int lfdDatetime = 69
Field Value
lfdDec
public const int lfdDec = 10
Field Value
lfdDecimal
public const int lfdDecimal = 9
Field Value
lfdDoublePrecision
public const int lfdDoublePrecision = 8
Field Value
lfdEnum
public const int lfdEnum = 91
Field Value
lfdFloat
public const int lfdFloat = 4
Field Value
lfdGeneric
public const int lfdGeneric = 3
Field Value
lfdGeoGraphy
public const int lfdGeoGraphy = 151
Field Value
lfdGeoMetry
public const int lfdGeoMetry = 150
Field Value
lfdGraphic
public const int lfdGraphic = 103
Field Value
lfdInt
public const int lfdInt = 40
Field Value
lfdInteger
public const int lfdInteger = 14
Field Value
lfdInterval
public const int lfdInterval = 181
Field Value
lfdIntervalDTS
public const int lfdIntervalDTS = 72
Field Value
lfdIntervalDay
public const int lfdIntervalDay = 133
Field Value
lfdIntervalDayToHour
public const int lfdIntervalDayToHour = 134
Field Value
lfdIntervalDayToMinute
public const int lfdIntervalDayToMinute = 135
Field Value
lfdIntervalDayToSecond
public const int lfdIntervalDayToSecond = 136
Field Value
lfdIntervalHour
public const int lfdIntervalHour = 137
Field Value
lfdIntervalHourToMinute
public const int lfdIntervalHourToMinute = 138
Field Value
lfdIntervalHourToSecond
public const int lfdIntervalHourToSecond = 139
Field Value
lfdIntervalMinute
public const int lfdIntervalMinute = 140
Field Value
lfdIntervalMinuteToSecond
public const int lfdIntervalMinuteToSecond = 141
Field Value
lfdIntervalMonth
public const int lfdIntervalMonth = 132
Field Value
lfdIntervalSecond
public const int lfdIntervalSecond = 142
Field Value
lfdIntervalYTM
public const int lfdIntervalYTM = 71
Field Value
lfdIntervalYear
public const int lfdIntervalYear = 130
Field Value
lfdIntervalYearToMonth
public const int lfdIntervalYearToMonth = 131
Field Value
lfdLong
public const int lfdLong = 73
Field Value
lfdLongRaw
public const int lfdLongRaw = 75
Field Value
lfdLongVarGraphic
public const int lfdLongVarGraphic = 105
Field Value
lfdLongblob
public const int lfdLongblob = 83
Field Value
lfdLongtext
public const int lfdLongtext = 89
Field Value
lfdLongvarbinary
public const int lfdLongvarbinary = 57
Field Value
lfdLongvarchar
public const int lfdLongvarchar = 56
Field Value
lfdMediumblob
public const int lfdMediumblob = 82
Field Value
lfdMediumtext
public const int lfdMediumtext = 88
Field Value
lfdNClob
public const int lfdNClob = 78
Field Value
lfdNationalChar
public const int lfdNationalChar = 61
Field Value
lfdNationalCharVarying
public const int lfdNationalCharVarying = 162
Field Value
lfdNchar
public const int lfdNchar = 62
Field Value
lfdNcharVarying
public const int lfdNcharVarying = 163
Field Value
lfdNum
public const int lfdNum = 13
Field Value
lfdNumeric
public const int lfdNumeric = 11
Field Value
lfdPeriod
public const int lfdPeriod = 147
Field Value
lfdPlsInteger
public const int lfdPlsInteger = 108
Field Value
lfdRaw
public const int lfdRaw = 74
Field Value
lfdReal
public const int lfdReal = 42
Field Value
lfdRowTypeAtribute
plsql rowtype atribute
public const int lfdRowTypeAtribute = 108
Field Value
lfdSet
public const int lfdSet = 164
Field Value
lfdSmallint
public const int lfdSmallint = 41
Field Value
lfdText
public const int lfdText = 85
Field Value
lfdTime
public const int lfdTime = 68
Field Value
lfdTimeStampWithLTZ
public const int lfdTimeStampWithLTZ = 66
Field Value
lfdTimeStampWithTZ
public const int lfdTimeStampWithTZ = 65
Field Value
lfdTimeWithTZ
public const int lfdTimeWithTZ = 121
Field Value
lfdTimestamp
public const int lfdTimestamp = 64
Field Value
lfdTinyInt
public const int lfdTinyInt = 43
Field Value
lfdTinyblob
public const int lfdTinyblob = 81
Field Value
lfdTinytext
public const int lfdTinytext = 84
Field Value
lfdTypeAtribute
plsql type atribute
public const int lfdTypeAtribute = 107
Field Value
lfdURowid
public const int lfdURowid = 90
Field Value
lfdUnknown
public const int lfdUnknown = 2
Field Value
lfdVarByte
public const int lfdVarByte = 144
Field Value
lfdVarGraphic
public const int lfdVarGraphic = 104
Field Value
lfdVarbinary
public const int lfdVarbinary = 33
Field Value
lfdVarchar
public const int lfdVarchar = 48
Field Value
lfdVarchar2
public const int lfdVarchar2 = 49
Field Value
lfdYear
public const int lfdYear = 59
Field Value
lfdntext
public const int lfdntext = 86
Field Value
lfdnumber
public const int lfdnumber = 12
Field Value
Properties
Arrays
index value of datetype in PostgreSQL. like this: SimpleTypename ARRAY [n,...].
public virtual List<TIndices> Arrays { get; set; }
Property Value
ByteUnit
Obsolete since v3.2.7.0, use charUnitToken instead.
public virtual bool ByteUnit { get; }
Property Value
CharsetAndCollation
public virtual TDummy CharsetAndCollation { set; }
Property Value
CharsetName
public virtual string CharsetName { get; set; }
Property Value
CharsetNameByToken
public virtual TSourceToken CharsetNameByToken { set; }
Property Value
ColTypeList
public virtual List<TTypeName> ColTypeList { get; set; }
Property Value
CollationName
public virtual string CollationName { get; set; }
Property Value
ColumnDefList
public virtual TColumnDefinitionList ColumnDefList { get; set; }
Property Value
DataType
public virtual EDataType DataType { get; set; }
Property Value
DataTypeByObjectName
public virtual TObjectName DataTypeByObjectName { set; }
Property Value
DataTypeByToken
public virtual TSourceToken DataTypeByToken { set; }
Property Value
DataTypeName
public virtual string DataTypeName { get; }
Property Value
DataTypeObjectName
public virtual TObjectName DataTypeObjectName { get; }
Property Value
DatatypeAttributeList
public virtual List<TDatatypeAttribute> DatatypeAttributeList { get; set; }
Property Value
Length
public virtual TConstant Length { get; set; }
Property Value
Max
public virtual TConstant Max { get; set; }
Property Value
Precision
public virtual TConstant Precision { get; set; }
Property Value
PrecisionScale
public virtual TPrecisionScale PrecisionScale { set; }
Property Value
PrimitiveTypeOfMap
public virtual TTypeName PrimitiveTypeOfMap { get; set; }
Property Value
Reserve
public virtual TConstant Reserve { get; set; }
Property Value
Scale
public virtual TConstant Scale { get; set; }
Property Value
SecondsPrecision
public virtual TConstant SecondsPrecision { get; }
Property Value
Start
public virtual TConstant Start { get; set; }
Property Value
Type
public virtual int Type { get; set; }
Property Value
TypeModifiers
public virtual TExpressionList TypeModifiers { set; }
Property Value
TypeOfList
public virtual TTypeName TypeOfList { get; set; }
Property Value
TypeOfMap
public virtual TTypeName TypeOfMap { get; set; }
Property Value
charUnitToken
public TSourceToken charUnitToken { get; set; }
Property Value
signedToken
public TSourceToken signedToken { get; set; }
Property Value
zeroFillToken
public TSourceToken zeroFillToken { get; set; }
Property Value
Methods
accept(TParseTreeVisitor)
public override void accept(TParseTreeVisitor v)
Parameters
acceptChildren(TParseTreeVisitor)
public override void acceptChildren(TParseTreeVisitor v)
Parameters
init(object)
Initialize a query tree node.
public override void init(object arg1)
Parameters
arg1object
init(object, object)
public override void init(object arg1, object arg2)
Parameters
init(object, object, object)
public override void init(object arg1, object arg2, object arg3)
Parameters
isCharUnit()
Obsolete since v3.2.7.0, use charUnitToken instead.
public virtual bool isCharUnit()
Returns
isVarying()
public virtual bool isVarying()
Returns
searchTypeByName(string)
public static EDataType searchTypeByName(string typenameStr)
Parameters
typenameStrstring
Returns
setArrays(List<TIndices>)
public void setArrays(List<TIndices> l)
Parameters
setCharUnit(TSourceToken)
public virtual void setCharUnit(TSourceToken st)
Parameters
stTSourceToken
setDataTypeByToken(TSourceToken)
public void setDataTypeByToken(TSourceToken st)
Parameters
stTSourceToken
setDataTypeInTokens()
used in y file, setup dbobject type of all source tokens consist of this datatype.
public virtual void setDataTypeInTokens()
setType(int)
public void setType(int t)
Parameters
tint
setTypeModifiers(TExpressionList)
public void setTypeModifiers(TExpressionList l)
Parameters
setVarying(TSourceToken)
public virtual void setVarying(TSourceToken st)
Parameters
stTSourceToken