Class SQLServerTypeInfo
java.lang.Object
org.datanucleus.store.rdbms.schema.SQLTypeInfo
org.datanucleus.store.rdbms.adapter.SQLServerTypeInfo
- All Implemented Interfaces:
org.datanucleus.store.schema.StoreSchemaData
SQL Type info for SQLServer datastores.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
sql type NTEXTstatic final int
sql type NVARCHARstatic final int
sql type UNIQUEIDENTIFIERFields inherited from class org.datanucleus.store.rdbms.schema.SQLTypeInfo
allowsPrecisionSpec, autoIncrement, caseSensitive, createParams, dataType, fixedPrecScale, fromJdbcDriver, literalPrefix, literalSuffix, localTypeName, maximumScale, minimumScale, nullable, numPrecRadix, precision, searchable, typeName, unsignedAttribute
-
Constructor Summary
ConstructorsConstructorDescriptionSQLServerTypeInfo
(String typeName, short dataType, int precision, String literalPrefix, String literalSuffix, String createParams, int nullable, boolean caseSensitive, short searchable, boolean unsignedAttribute, boolean fixedPrecScale, boolean autoIncrement, String localTypeName, short minimumScale, short maximumScale, int numPrecRadix) Constructs a type information object from the current row of the given result set. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isCompatibleWith
(RDBMSColumnInfo colInfo) Convenience method for returning if this type is compatible with the provided column.Methods inherited from class org.datanucleus.store.rdbms.schema.SQLTypeInfo
addProperty, equals, getCreateParams, getDataType, getLiteralPrefix, getLiteralSuffix, getLocalTypeName, getMaximumScale, getMinimumScale, getNullable, getNumPrecRadix, getPrecision, getProperty, getSearchable, getTypeName, hashCode, isAllowsPrecisionSpec, isAutoIncrement, isCaseSensitive, isFixedPrecScale, isUnsignedAttribute, setAllowsPrecisionSpec, setLocalTypeName, setTypeName, toString, toString
-
Field Details
-
NVARCHAR
public static final int NVARCHARsql type NVARCHAR- See Also:
-
NTEXT
public static final int NTEXTsql type NTEXT- See Also:
-
UNIQUEIDENTIFIER
public static final int UNIQUEIDENTIFIERsql type UNIQUEIDENTIFIER- See Also:
-
-
Constructor Details
-
SQLServerTypeInfo
Constructs a type information object from the current row of the given result set.- Parameters:
rs
- The result set returned from DatabaseMetaData.getTypeInfo().
-
SQLServerTypeInfo
public SQLServerTypeInfo(String typeName, short dataType, int precision, String literalPrefix, String literalSuffix, String createParams, int nullable, boolean caseSensitive, short searchable, boolean unsignedAttribute, boolean fixedPrecScale, boolean autoIncrement, String localTypeName, short minimumScale, short maximumScale, int numPrecRadix)
-
-
Method Details
-
isCompatibleWith
Description copied from class:SQLTypeInfo
Convenience method for returning if this type is compatible with the provided column. Compares the data type of each record, and returns true if the types are equivalent. For example one could be VARCHAR, and the other LONGVARCHAR so they both store string data, and hence they are compatible.- Overrides:
isCompatibleWith
in classSQLTypeInfo
- Parameters:
colInfo
- The column- Returns:
- Whether they are considered compatible
-