Class TTypeName
- All Implemented Interfaces:
Visitable,Cloneable,Iterator<TSourceToken>
toString will return string representation of datatype
including type name,length,precision,scale and attributes
- typename
- typename(length)
- length:
getLength()
- length:
- typename(precision,scale)
- precision:
getPrecision() - precision:
getScale()
- precision:
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 getDatatypeAttributeList(). For more detailed information about
attributes in datatype, please check TDatatypeAttribute.
method getDatatypeAttributeList() 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
- BOOL
- 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)
- 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)]
EDataType.interval_day_t- precision:
getPrecision()
- INTERVAL DAY[(precision)] TO SECOND[(second precision)]
EDataType.interval_day_to_second_t- precision:
getPrecision() - second precision:
getSecondsPrecision()
- INTERVAL DAY[(precision)] TO MINUTE
EDataType.interval_day_to_minute_t- precision:
getPrecision()
- INTERVAL DAY[(precision)] TO HOUR
EDataType.interval_day_to_hour_t- precision:
getPrecision()
- INTERVAL YEAR[(precision)] TO MONTH
EDataType.interval_year_to_month_t- precision:
getPrecision()
- 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)]
EDataType.timestamp_t- fractional_seconds:
getPrecision()
- TIMESTAMP [(fractional_seconds)] WITH TIME ZONE
EDataType.timestamp_with_time_zone_t- fractional_seconds:
getPrecision()
- DATETIME
- SMALLDATETIME
- DATETIMEOFFSET[ (fractional seconds precision) ]
EDataType.datetimeoffset_t- fractional seconds precision:
getPrecision()
- DATETIME2[ (fractional seconds precision) ](SQL Server)
EDataType.datetime2_t- fractional seconds precision:
getPrecision()
- TIMESTAMPTZ
XML
- XML
- XMLTYPE(Oracle)
HIVE array
- array
EDataType.listType_t- T:
getTypeOfList()
OTHERS
- BFILE(Oracle)
EDataType.bfile_t- BIT(MySQL,PostgreSQL,SQL Server)
- BITVARYING/VARBIT(PostgreSQL)
- BOX(PostgreSQL)
- CIDR(PostgreSQL)
- CIRCLE(PostgreSQL)
- CURSOR(SQL Server)
- ENUM(MySQL, PostgreSQL)
- GEOGRAPHY(SQL Server)
EDataType.geography_t- GEOMETRY(SQL Server)
EDataType.geometry_t- HIERARCHYID(SQL Server)
- INET(PostgreSQL)
- LINE(PostgreSQL)
- LONG(Oracle)
EDataType.long_t- 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)
EDataType.raw_t- 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)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.static final intDeprecated.As of v1.4.3.0, replaced byEDataType.bigint_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.binary_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.binary_integer_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.binary_large_object_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.bit_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.blob_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.bool_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.byte_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.byteint_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.char_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.char_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.char_large_object_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.varchar_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.char_large_object_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.varchar_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.clob_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.datalink_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.date_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.datetime_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.dbclob_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.dec_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.dec_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.double_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.enum_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.float_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.generic_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.geography_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.geometry_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.graphic_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.int_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.int_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.interval_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.interval_day_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.interval_day_to_hour_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.interval_day_to_minute_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.interval_day_to_second_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.interval_day_to_second_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.interval_hour_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.interval_hour_to_minute_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.interval_hour_to_second_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.interval_minute_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.interval_minute_to_second_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.interval_month_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.interval_second_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.interval_year_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.interval_year_to_month_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.interval_year_to_month_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.long_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.longblob_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.long_raw_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.longtext_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.long_varbinary_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.long_varchar_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.long_vargraphic_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.mediumblob_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.mediumtext_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.nchar_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.nvarchar_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.nchar_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.nvarchar_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.nclob_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.ntext_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.number_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.number_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.numeric_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.period_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.pls_integer_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.raw_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.real_tstatic final intDeprecated.As of v1.4.3.0, replaced byTDatatypeAttributestatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.set_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.smallint_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.text_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.time_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.timestamp_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.timestamp_with_local_time_zone_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.timestamp_with_time_zone_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.time_with_time_zone_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.tinyblob_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.tinyint_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.tinytext_tstatic final intDeprecated.As of v1.4.3.0, replaced byTDatatypeAttributestatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.unknown_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.urowid_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.varbinary_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.varbyte_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.varchar_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.varchar2_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.vargraphic_tstatic final intDeprecated.As of v1.4.3.0, replaced byEDataType.year_tFields inherited from class gudusoft.gsqlparser.nodes.TParseTreeNode
dbvendor, doubleLinkedTokenListToString, nodeActionAppend, nodeActionInsert, nodeActionRemove, nodeActionUnknown, nodeActionUpdate, nodeActionUpdateText, nodeChangeEndToken, nodeChangeStartToken -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAccept a visitorvoidAccept a visitor to iterate this class and sub-nodes of this classclone()index value of datetype in PostgreSQL.Fields in the BigQuery struct <fields>datatype attribute element.The string representation of the datatypemysql display length for integer datatypeit's a number, or a max constant.getMax()getScale()getStart()intgetType()Type of <T> in Hive, BigQuery Array <T>.voidInitialize a query tree node.voidvoidbooleanbooleanbooleanstatic EDataTypesearchTeradataTypeByName(String typenameStr) static EDataTypesearchTypeByName(String typenameStr) static EDataTypesearchTypeByName(String typenameStr, EDbVendor dbVendor) voidsetArrays(TPTNodeList<TIndices> arrays) voidsetByteUnit(boolean byteUnit) voidsetCharacterDatatypeProperty(TCharacterDatatypeProperty characterDatatypeProperty) voidsetCharsetAndCollation(TDummy dummy) voidsetCharsetName(String charsetName) voidvoidsetCharUnit(boolean charUnit) voidvoidsetCollationName(String collationName) voidsetColTypeList(TPTNodeList<TTypeName> colTypeList) voidsetColumnDefList(TColumnDefinitionList columnDefList) voidsetDataType(EDataType dataType) voidsetDatatypeAttributeList(TPTNodeList<TDatatypeAttribute> datatypeAttributeList) voidsetDataTypeByObjectName(TObjectName objectName) voidvoidused in y file, setup dbobject type of all source tokens consist of this datatype.voidsetFractionalSecondsPrecision(TConstant fractionalSecondsPrecision) voidsetIntervalType(TDummy dummy) voidvoidvoidsetPlainText(String plainText) voidsetPrecision(TConstant precision) voidsetPrecisionScale(TPrecisionScale precisionScale) voidsetPrimitiveTypeOfMap(TTypeName primitiveTypeOfMap) voidsetReserve(TConstant reserve) voidvoidsetSecondsPrecision(TConstant secondsPrecision) voidvoidsetType(int type) voidsetTypeModifiers(TExpressionList exprList) voidsetTypeOfList(TTypeName typeOfList) voidsetTypeOfMap(TTypeName typeOfMap) voidsetVarying(boolean varying) voidtoString()将一个语法树节点(TParseTreeNode)转换回它对应的原始SQL字符串。 它通过遍历一个由startToken(起始词法单元)和endToken(结束词法单元)界定的双向链表来实现这一功能。Methods inherited from class gudusoft.gsqlparser.nodes.TParseTreeNode
addAllMyTokensToTokenList, addToTokenChain, appendNewNode, calculateTokenCount, doAppendNewNode, doParse, fastSetString, getAnchorNode, getColumnNo, getCommentAfterNode, getCommentBeforeNode, getCompactString, getDummyTag, getEndToken, getEvaluateDatatype, getEvalValue, getGsqlparser, getLineNo, getLocation, getMd5, getNodeStatus, getNodeType, getParentObjectName, getPlainText, getStartToken, getTokenCount, hasNext, init, init, init, insertAfterAToken, insertNewNodeBeforeMe, isChanged, isTokensInChain, next, refreshAllNodesTokenCount, remove, removeAllMyTokensFromTokenList, removeTokens, removeTokensBetweenNodes, removeTokensBetweenToken, replaceWithNewNode, resetIterator, setAnchorNode, setChanged, setDummyTag, setEndToken, setEndToken, setEndToken, setEndToken, setEndToken, setEndTokenDirectly, setEvaluateDatatype, setEvalValue, setGsqlparser, setIncludingComment, setLocation, setNewSubNode, setNodeStatus, setNodeType, setParent, setStartToken, setStartToken, setStartToken, setStartToken, setStartTokenDirectly, setString, setString2, subNodeInNode, toScript, toString2Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
lfdUnknown
Deprecated.As of v1.4.3.0, replaced byEDataType.unknown_t- See Also:
-
lfdGeneric
Deprecated.As of v1.4.3.0, replaced byEDataType.generic_t- See Also:
-
lfdFloat
Deprecated.As of v1.4.3.0, replaced byEDataType.float_t- See Also:
-
lfdDoublePrecision
Deprecated.As of v1.4.3.0, replaced byEDataType.double_t- See Also:
-
lfdDecimal
Deprecated.As of v1.4.3.0, replaced byEDataType.dec_t- See Also:
-
lfdDec
Deprecated.As of v1.4.3.0, replaced byEDataType.dec_t- See Also:
-
lfdNumeric
Deprecated.As of v1.4.3.0, replaced byEDataType.numeric_t- See Also:
-
lfdnumber
Deprecated.As of v1.4.3.0, replaced byEDataType.number_t- See Also:
-
lfdNum
Deprecated.As of v1.4.3.0, replaced byEDataType.number_t- See Also:
-
lfdInteger
Deprecated.As of v1.4.3.0, replaced byEDataType.int_t- See Also:
-
lfdBit
Deprecated.As of v1.4.3.0, replaced byEDataType.bit_t- See Also:
-
lfdBoolean
Deprecated.As of v1.4.3.0, replaced byEDataType.bool_t- See Also:
-
lfdVarbinary
Deprecated.As of v1.4.3.0, replaced byEDataType.varbinary_t- See Also:
-
lfdBinary
Deprecated.As of v1.4.3.0, replaced byEDataType.binary_t- See Also:
-
lfdInt
Deprecated.As of v1.4.3.0, replaced byEDataType.int_t- See Also:
-
lfdSmallint
Deprecated.As of v1.4.3.0, replaced byEDataType.smallint_t- See Also:
-
lfdReal
Deprecated.As of v1.4.3.0, replaced byEDataType.real_t- See Also:
-
lfdTinyInt
Deprecated.As of v1.4.3.0, replaced byEDataType.tinyint_t- See Also:
-
lfdBigInt
Deprecated.As of v1.4.3.0, replaced byEDataType.bigint_t- See Also:
-
lfdCharacter
Deprecated.As of v1.4.3.0, replaced byEDataType.char_t- See Also:
-
lfdChar
Deprecated.As of v1.4.3.0, replaced byEDataType.char_t- See Also:
-
lfdVarchar
Deprecated.As of v1.4.3.0, replaced byEDataType.varchar_t- See Also:
-
lfdVarchar2
Deprecated.As of v1.4.3.0, replaced byEDataType.varchar2_t- See Also:
-
lfdLongvarchar
Deprecated.As of v1.4.3.0, replaced byEDataType.long_varchar_t- See Also:
-
lfdLongvarbinary
Deprecated.As of v1.4.3.0, replaced byEDataType.long_varbinary_t- See Also:
-
lfdYear
Deprecated.As of v1.4.3.0, replaced byEDataType.year_t- See Also:
-
lfdNationalChar
Deprecated.As of v1.4.3.0, replaced byEDataType.nchar_t- See Also:
-
lfdNchar
Deprecated.As of v1.4.3.0, replaced byEDataType.nchar_t- See Also:
-
lfdDate
Deprecated.As of v1.4.3.0, replaced byEDataType.date_t- See Also:
-
lfdTimestamp
Deprecated.As of v1.4.3.0, replaced byEDataType.timestamp_t- See Also:
-
lfdTimeStampWithTZ
Deprecated.As of v1.4.3.0, replaced byEDataType.timestamp_with_time_zone_t- See Also:
-
lfdTimeStampWithLTZ
Deprecated.As of v1.4.3.0, replaced byEDataType.timestamp_with_local_time_zone_t- See Also:
-
lfdTime
Deprecated.As of v1.4.3.0, replaced byEDataType.time_t- See Also:
-
lfdDatetime
Deprecated.As of v1.4.3.0, replaced byEDataType.datetime_t- See Also:
-
lfdIntervalYTM
Deprecated.As of v1.4.3.0, replaced byEDataType.interval_year_to_month_t- See Also:
-
lfdIntervalDTS
Deprecated.As of v1.4.3.0, replaced byEDataType.interval_day_to_second_t- See Also:
-
lfdLong
Deprecated.As of v1.4.3.0, replaced byEDataType.long_t- See Also:
-
lfdRaw
Deprecated.As of v1.4.3.0, replaced byEDataType.raw_t- See Also:
-
lfdLongRaw
Deprecated.As of v1.4.3.0, replaced byEDataType.long_raw_t- See Also:
-
lfdBlob
Deprecated.As of v1.4.3.0, replaced byEDataType.blob_t- See Also:
-
lfdClob
Deprecated.As of v1.4.3.0, replaced byEDataType.clob_t- See Also:
-
lfdNClob
Deprecated.As of v1.4.3.0, replaced byEDataType.nclob_t- See Also:
-
lfdBfile
Deprecated.As of v1.4.3.0, replaced byEDataType.bfile_t- See Also:
-
lfdTinyblob
Deprecated.As of v1.4.3.0, replaced byEDataType.tinyblob_t- See Also:
-
lfdMediumblob
Deprecated.As of v1.4.3.0, replaced byEDataType.mediumblob_t- See Also:
-
lfdLongblob
Deprecated.As of v1.4.3.0, replaced byEDataType.longblob_t- See Also:
-
lfdTinytext
Deprecated.As of v1.4.3.0, replaced byEDataType.tinytext_t- See Also:
-
lfdText
Deprecated.As of v1.4.3.0, replaced byEDataType.text_t- See Also:
-
lfdntext
Deprecated.As of v1.4.3.0, replaced byEDataType.ntext_t- See Also:
-
lfdMediumtext
Deprecated.As of v1.4.3.0, replaced byEDataType.mediumtext_t- See Also:
-
lfdLongtext
Deprecated.As of v1.4.3.0, replaced byEDataType.longtext_t- See Also:
-
lfdURowid
Deprecated.As of v1.4.3.0, replaced byEDataType.urowid_t- See Also:
-
lfdEnum
Deprecated.As of v1.4.3.0, replaced byEDataType.enum_t- See Also:
-
lfdBinaryLargeObject
Deprecated.As of v1.4.3.0, replaced byEDataType.binary_large_object_t- See Also:
-
lfdGraphic
Deprecated.As of v1.4.3.0, replaced byEDataType.graphic_t- See Also:
-
lfdVarGraphic
Deprecated.As of v1.4.3.0, replaced byEDataType.vargraphic_t- See Also:
-
lfdLongVarGraphic
Deprecated.As of v1.4.3.0, replaced byEDataType.long_vargraphic_t- See Also:
-
lfdDatalink
Deprecated.As of v1.4.3.0, replaced byEDataType.datalink_t- See Also:
-
lfdBinaryInteger
Deprecated.As of v1.4.3.0, replaced byEDataType.binary_integer_t- See Also:
-
lfdPlsInteger
Deprecated.As of v1.4.3.0, replaced byEDataType.pls_integer_t- See Also:
-
lfdByteint
Deprecated.As of v1.4.3.0, replaced byEDataType.byteint_t- See Also:
-
lfdTimeWithTZ
Deprecated.As of v1.4.3.0, replaced byEDataType.time_with_time_zone_t- See Also:
-
lfdIntervalYear
Deprecated.As of v1.4.3.0, replaced byEDataType.interval_year_t- See Also:
-
lfdIntervalYearToMonth
Deprecated.As of v1.4.3.0, replaced byEDataType.interval_year_to_month_t- See Also:
-
lfdIntervalMonth
Deprecated.As of v1.4.3.0, replaced byEDataType.interval_month_t- See Also:
-
lfdIntervalDay
Deprecated.As of v1.4.3.0, replaced byEDataType.interval_day_t- See Also:
-
lfdIntervalDayToHour
Deprecated.As of v1.4.3.0, replaced byEDataType.interval_day_to_hour_t- See Also:
-
lfdIntervalDayToMinute
Deprecated.As of v1.4.3.0, replaced byEDataType.interval_day_to_minute_t- See Also:
-
lfdIntervalDayToSecond
Deprecated.As of v1.4.3.0, replaced byEDataType.interval_day_to_second_t- See Also:
-
lfdIntervalHour
Deprecated.As of v1.4.3.0, replaced byEDataType.interval_hour_t- See Also:
-
lfdIntervalHourToMinute
Deprecated.As of v1.4.3.0, replaced byEDataType.interval_hour_to_minute_t- See Also:
-
lfdIntervalHourToSecond
Deprecated.As of v1.4.3.0, replaced byEDataType.interval_hour_to_second_t- See Also:
-
lfdIntervalMinute
Deprecated.As of v1.4.3.0, replaced byEDataType.interval_minute_t- See Also:
-
lfdIntervalMinuteToSecond
Deprecated.As of v1.4.3.0, replaced byEDataType.interval_minute_to_second_t- See Also:
-
lfdIntervalSecond
Deprecated.As of v1.4.3.0, replaced byEDataType.interval_second_t- See Also:
-
lfdByte
Deprecated.As of v1.4.3.0, replaced byEDataType.byte_t- See Also:
-
lfdVarByte
Deprecated.As of v1.4.3.0, replaced byEDataType.varbyte_t- See Also:
-
lfdCharacterVarying
Deprecated.As of v1.4.3.0, replaced byEDataType.varchar_t- See Also:
-
lfdCharVarying
Deprecated.As of v1.4.3.0, replaced byEDataType.varchar_t- See Also:
-
lfdPeriod
Deprecated.As of v1.4.3.0, replaced byEDataType.period_t- See Also:
-
lfdCharacterLargeObject
Deprecated.As of v1.4.3.0, replaced byEDataType.char_large_object_t- See Also:
-
lfdGeoMetry
Deprecated.As of v1.4.3.0, replaced byEDataType.geometry_t- See Also:
-
lfdGeoGraphy
Deprecated.As of v1.4.3.0, replaced byEDataType.geography_t- See Also:
-
lfdNationalCharVarying
Deprecated.As of v1.4.3.0, replaced byEDataType.nvarchar_t- See Also:
-
lfdNcharVarying
Deprecated.As of v1.4.3.0, replaced byEDataType.nvarchar_t- See Also:
-
lfdSet
Deprecated.As of v1.4.3.0, replaced byEDataType.set_t- See Also:
-
lfdCharLargeObject
Deprecated.As of v1.4.3.0, replaced byEDataType.char_large_object_t- See Also:
-
lfdDBClob
Deprecated.As of v1.4.3.0, replaced byEDataType.dbclob_t- See Also:
-
lfdInterval
Deprecated.As of v1.4.3.0, replaced byEDataType.interval_t- See Also:
-
lfdTypeAtribute
Deprecated.As of v1.4.3.0, replaced byTDatatypeAttributeplsql type atribute- See Also:
-
lfdRowTypeAtribute
Deprecated.As of v1.4.3.0, replaced byTDatatypeAttributeplsql rowtype atribute- See Also:
-
-
Constructor Details
-
TTypeName
public TTypeName() -
TTypeName
-
TTypeName
-
TTypeName
-
-
Method Details
-
setCharacterDatatypeProperty
-
getCharacterDatatypeProperty
-
toString
Description copied from class:TParseTreeNode将一个语法树节点(
TParseTreeNode)转换回它对应的原始SQL字符串。 它通过遍历一个由startToken(起始词法单元)和endToken(结束词法单元)界定的双向链表来实现这一功能。这个方法的设计采用了“两遍扫描”(Two-Pass)的策略,也就是使用了两个
while循环。 第一个循环是预处理阶段,用于清理格式;第二个循环则负责构建最终的字符串。第一个
while循环这个循环的主要目标是识别并“软删除”多余的换行符(newline tokens)。这种情况尤其在SQL被程序动态修改后容易出现。 这个循环本身不构建字符串,只负责分析和更新词法单元的状态。 其工作原理是:
- 遍历: 它从
startToken开始,通过getNextTokenInChain()方法遍历到endToken。 - 检测链表变化: 它通过比较当前和前一个词法单元的
posinlist(词法单元在原始完整列表中的位置索引)来判断链表是否“自然”。 如果不连续,意味着词法单元被插入或重排了,此时isChainModified标志位会被设为true。 - 标记换行符: 当遇到第一个换行符时,它会设置一个标志。如果紧接着又遇到了另一个换行符,并且此时链表已经被修改过, 那么它会将这个多余的换行符标记为待删除状态。这个逻辑能有效地将代码被修改后可能产生的多个连续换行压缩成一个。
第二个
while循环这个循环负责从(经过第一步清理后的)词法单元流中实际地构建最终的输出字符串。 其工作原理是:
- 遍历: 它再次遍历完全相同的词法单元序列。
- 构建字符串: 在将每个词法单元追加到
StringBuffer之前,它会进行检查。 - 跳过特定单元: 如果一个词法单元在第一个循环中被标记为待删除,或者它是一个注释(且配置为不包含注释),那么它将被跳过。
- 拼接字符串: 对于所有未被跳过的词法单元,它会将其字符串值追加到
StringBuffer中。
StringBuffer就包含了该语法树节点的最终、重构后的SQL文本。- Overrides:
toStringin classTParseTreeNode- Returns:
- 节点对应的SQL字符串。
- 遍历: 它从
-
clone
-
setPlainText
- Overrides:
setPlainTextin classTParseTreeNode
-
setFractionalSecondsPrecision
-
getFractionalSecondsPrecision
-
isCharUnit
-
isByteUnit
-
isVarying
-
searchTeradataTypeByName
-
searchTypeByName
-
searchTypeByName
-
setCharsetAndCollation
-
setCharsetNameByToken
-
setCharsetName
-
setCollationName
-
getCharsetName
-
getCollationName
-
setColTypeList
-
getColTypeList
-
setColumnDefList
-
getColumnDefList
Fields in the BigQuery struct <fields>- Returns:
- BigQuery struct <fields>
-
setTypeOfMap
-
setPrimitiveTypeOfMap
-
getTypeOfMap
-
getPrimitiveTypeOfMap
-
setTypeOfList
-
getTypeOfList
Type of <T> in Hive, BigQuery Array <T>. BigQuery struct <T>- Returns:
- HIVE, BigQuery element type of Array <T>, struct <T>
-
setDataTypeByObjectName
-
setDataTypeByToken
-
getDataTypeObjectName
-
getDataTypeName
The string representation of the datatype- Returns:
- The string representation of the datatype
-
setDataType
-
getDataType
- Returns:
- a value of
EDataType
-
setStart
-
getStart
-
setMax
-
setReserve
-
getMax
-
getReserve
-
getDisplayLength
mysql display length for integer datatype- Returns:
- constant
-
setLength
-
getLength
it's a number, or a max constant.- Returns:
- a value of
TConstant, length of this datatype.
-
getSecondsPrecision
- Returns:
- a value of
TConstant, typically the second precision value of datatype.
-
setPrecision
-
getScale
- Returns:
- a value of
TConstant, scale value of datatypes such as numeric, float.
-
getPrecision
- Returns:
- a value of
TConstant, precision value of datatypes such as numeric, float.
-
setScale
-
setPrecisionScale
-
getArrays
index value of datetype in PostgreSQL. like this: SimpleTypename ARRAY [n,...].- Returns:
- a list of
TIndices,
-
setArrays
-
setDatatypeAttributeList
-
getDatatypeAttributeList
datatype attribute element.- Returns:
- a list of
TDatatypeAttribute
-
init
- Overrides:
initin classTParseTreeNode
-
setTypeModifiers
-
getElementType
-
getKeyType
-
getValueType
-
init
- Overrides:
initin classTParseTreeNode
-
init
Description copied from class:TParseTreeNodeInitialize a query tree node. Used internally- Overrides:
initin classTParseTreeNode- Parameters:
arg1- first argument
-
setByteUnit
-
setCharUnit
-
setVarying
-
setSecondsPrecision
-
setCharUnit
-
setVarying
-
setDataTypeInTokens
used in y file, setup dbobject type of all source tokens consist of this datatype. -
setIntervalType
-
accept
Description copied from class:TParseTreeNodeAccept a visitor- Specified by:
acceptin interfaceVisitable- Overrides:
acceptin classTParseTreeNode- Parameters:
v- visitor is a descendant class ofTParseTreeVisitor
-
acceptChildren
Description copied from class:TParseTreeNodeAccept a visitor to iterate this class and sub-nodes of this class- Specified by:
acceptChildrenin interfaceVisitable- Overrides:
acceptChildrenin classTParseTreeNode- Parameters:
v- visitor is a descendant class ofTParseTreeVisitor
-
setType
-
getType
-
EDataType.bfile_t