Package net.sourceforge.jtds.jdbc
Class TdsData.TypeInfo
java.lang.Object
net.sourceforge.jtds.jdbc.TdsData.TypeInfo
- Enclosing class:
- TdsData
This class implements a descriptor for TDS data types;
- Author:
- Mike Hutchinson.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal int
The display size of the type.final boolean
true if type requires TDS80 collation.final boolean
true if type is a signed numeric.final int
The java.sql.Types constant for this data type.final int
The precision of the type.final int
The size of this type or < 0 for variable sizes.final String
The SQL type name. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
sqlType
The SQL type name. -
size
public final int sizeThe size of this type or < 0 for variable sizes.Special values as follows:
- -5 sql_variant type.
- -4 text, image or ntext types.
- -2 SQL Server 7+ long char and var binary types.
- -1 varchar, varbinary, null types.
-
precision
public final int precisionThe precision of the type.If this is -1 precision must be calculated from buffer size eg for varchar fields.
-
displaySize
public final int displaySizeThe display size of the type.-1 If the display size must be calculated from the buffer size.
-
isSigned
public final boolean isSignedtrue if type is a signed numeric. -
isCollation
public final boolean isCollationtrue if type requires TDS80 collation. -
jdbcType
public final int jdbcTypeThe java.sql.Types constant for this data type.
-
-
Constructor Details
-
TypeInfo
TypeInfo(String sqlType, int size, int precision, int displaySize, boolean isSigned, boolean isCollation, int jdbcType) Construct a new TDS data type descriptor.- Parameters:
sqlType
- SQL type name.size
- Byte size for this type or < 0 for variable length types.precision
- Decimal precision or -1displaySize
- Printout size for this type or special values -1,-2.isSigned
- True if signed numeric type.isCollation
- True if type has TDS 8 collation information.jdbcType
- The java.sql.Type constant for this type.
-