Class PlatformInfo
java.lang.Object
edu.internet2.middleware.grouper.ext.org.apache.ddlutils.PlatformInfo
Conatains information about the database platform such as supported features and native type mappings.
- Version:
- $Revision: 289996 $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNativeTypeMapping(int jdbcTypeCode, String nativeType) Adds a mapping from jdbc type to database-native type.voidaddNativeTypeMapping(int jdbcTypeCode, String nativeType, int targetJdbcTypeCode) Adds a mapping from jdbc type to database-native type.voidaddNativeTypeMapping(String jdbcTypeName, String nativeType) Adds a mapping from jdbc type to database-native type.voidaddNativeTypeMapping(String jdbcTypeName, String nativeType, String targetJdbcTypeName) Adds a mapping from jdbc type to database-native type.Returns the string that denotes the beginning of a comment.Returns the string that denotes the end of a comment.getDefaultSize(int jdbcTypeCode) Returns the default size value for the given type, if any.Returns the text that is used to delimit identifiers (eg.booleanDetermines whether the platform is able to read the auto-increment status for columns from an existing database.intReturns the maximum number of characters that a column name can have.intReturns the maximum number of characters that a constraint name can have.intReturns the maximum number of characters that a foreign key name can have.intReturns the maximum number of characters that a table name can have.getNativeType(int typeCode) Returns the database-native type for the given type code.Returns the text separating individual sql commands.intgetTargetJdbcType(int typeCode) Returns the jdbc type corresponding to the native type that is used for the given jdbc type.Returns the text that is used for for quoting values (e.g.booleanhasNullDefault(int sqlTypeCode) Determines whether the native type for the given sql type code (one of theTypesconstants) has a null default value on this platform.booleanhasPrecisionAndScale(int sqlTypeCode) Determines whether the native type for the given sql type code (one of theTypesconstants) has precision and scale specifications on this platform.booleanhasSize(int sqlTypeCode) Determines whether the native type for the given sql type code (one of theTypesconstants) has a size specification on this platform.booleanDetermines whether an ALTER TABLE statement shall be used for dropping indices or constraints.booleanDetermines whether auto-commit mode for the reading of the values of identity columns after insertion shall be used, i.e.booleanDetermines whether default values can be specified for LONGVARCHAR/LONGVARBINARY columns.booleanDetermines whether the auto-increment specification uses the DEFAULT value of the column definition.booleanDetermines whether delimited identifiers are supported.booleanReturns whether embedded foreign key constraints should have a name.booleanDetermines whether foreign key constraints are embedded in the create table clause or as seperate alter table statements.booleanDetermines whether the platform is allows the explicit specification of values for identity columns in INSERT/UPDATE statements.booleanDetermines whether the indices are embedded in the create table clause or as seperate statements.booleanDetermines whether indices are supported.booleanDetermines whether the values of identity columns can be read back from the database after insertion of a row.booleanDetermines whether non-primary key columns can be auto-incrementing (IDENTITY columns).booleanDetermines whether a NULL needs to be explicitly stated when the column has no specified default value.booleanDetermines whether primary key constraints are embedded in the create table clause or as seperate alter table statements.booleanDetermines whether the database supports SQL comments.booleanDetermines whether the platform returns synthetic default values (e.g.booleanDetermines whether system indices for foreign keys are always non-unique or can be unique (i.e.booleanDetermines whether database-generated indices for primary and foreign keys are returned when reading a model from a database.voidsetAlterTableForDropUsed(boolean useAlterTableForDrop) Specifies whether an ALTER TABLE statement shall be used for dropping indices or constraints.voidsetAutoCommitModeForLastIdentityValueReading(boolean autoCommitModeForLastIdentityValueReading) Determines whether auto-commit mode for the reading of the values of identity columns after insertion shall be used, i.e.voidsetCommentPrefix(String commentPrefix) Sets the text that starts a comment.voidsetCommentSuffix(String commentSuffix) Sets the text that ends a comment.voidsetDefaultSize(int jdbcTypeCode, int defaultSize) Adds a default size for the given jdbc type.voidsetDefaultSize(String jdbcTypeName, int defaultSize) Adds a default size for the given jdbc type.voidsetDefaultValuesForLongTypesSupported(boolean isSupported) Specifies whether default values can be specified for LONGVARCHAR/LONGVARBINARY columns.voidsetDefaultValueUsedForIdentitySpec(boolean identitySpecUsesDefaultValue) Specifies whether the auto-increment specification uses the DEFAULT value of the column definition.voidsetDelimitedIdentifiersSupported(boolean areSupported) Specifies whether delimited identifiers are supported.voidsetDelimiterToken(String delimiterToken) Sets the text that is used to delimit identifiers (eg.voidsetEmbeddedForeignKeysNamed(boolean embeddedForeignKeysNamed) Specifies whether embedded foreign key constraints should be named.voidsetForeignKeysEmbedded(boolean foreignKeysEmbedded) Specifies whether foreign key constraints are embedded in the create table clause or as seperate alter table statements.voidsetHasNullDefault(int sqlTypeCode, boolean hasNullDefault) Specifies whether the native type for the given sql type code (one of theTypesconstants) has a null default value on this platform.voidsetHasPrecisionAndScale(int sqlTypeCode, boolean hasPrecisionAndScale) Specifies whether the native type for the given sql type code (one of theTypesconstants) has precision and scale specifications on this platform.voidsetHasSize(int sqlTypeCode, boolean hasSize) Specifies whether the native type for the given sql type code (one of theTypesconstants) has a size specification on this platform.voidsetIdentityOverrideAllowed(boolean identityOverrideAllowed) Specifies whether the platform is allows the explicit specification of values for identity columns in INSERT/UPDATE statements.voidsetIdentityStatusReadingSupported(boolean canReadAutoIncrementStatus) Specifies whether the platform is able to read the auto-increment status for columns from an existing database.voidsetIndicesEmbedded(boolean indicesEmbedded) Specifies whether indices are embedded in the create table clause or as seperate alter table statements.voidsetIndicesSupported(boolean supportingIndices) Specifies whether indices are supported.voidsetLastIdentityValueReadable(boolean lastIdentityValueReadable) Specifies whether the values of identity columns can be read back from the database after insertion of a row.voidsetMaxColumnNameLength(int maxColumnNameLength) Sets the maximum length of column names that this database allows.voidsetMaxConstraintNameLength(int maxConstraintNameLength) Sets the maximum length of constraint names that this database allows.voidsetMaxForeignKeyNameLength(int maxForeignKeyNameLength) Sets the maximum length of foreign key names that this database allows.voidsetMaxIdentifierLength(int maxIdentifierLength) Sets the maximum length of all identifiers that this database allows.voidsetMaxTableNameLength(int maxTableNameLength) Sets the maximum length of table names that this database allows.voidsetNonPKIdentityColumnsSupported(boolean supportingNonPKIdentityColumns) Specifies whether non-primary key columns can be auto-incrementing (IDENTITY columns).voidsetNullAsDefaultValueRequired(boolean requiresNullAsDefaultValue) Specifies whether a NULL needs to be explicitly stated when the column has no specified default value.voidsetPrimaryKeyEmbedded(boolean primaryKeyEmbedded) Specifies whether the primary key constraints are embedded in the create table clause or as seperate alter table statements.voidsetSqlCommandDelimiter(String sqlCommandDelimiter) Sets the text separating individual sql commands.voidsetSqlCommentsSupported(boolean commentsSupported) Specifies whether SQL comments are supported by the database.voidsetSyntheticDefaultValueForRequiredReturned(boolean returningDefaultValue) Specifies whether the platform returns synthetic default values (e.g.voidsetSystemForeignKeyIndicesAlwaysNonUnique(boolean alwaysNonUnique) Specifies whether system indices for foreign keys are always non-unique or can be unique (i.e.voidsetSystemIndicesReturned(boolean returningSystemIndices) Specifies whether database-generated indices for primary and foreign keys are returned when reading a model from a database.voidsetValueQuoteToken(String valueQuoteChar) Sets the text that is used for for quoting values (e.g.
-
Constructor Details
-
PlatformInfo
public PlatformInfo()Creates a new platform info object.
-
-
Method Details
-
isNullAsDefaultValueRequired
public boolean isNullAsDefaultValueRequired()Determines whether a NULL needs to be explicitly stated when the column has no specified default value. Default is false.- Returns:
trueif NULL must be written for empty default values
-
setNullAsDefaultValueRequired
public void setNullAsDefaultValueRequired(boolean requiresNullAsDefaultValue) Specifies whether a NULL needs to be explicitly stated when the column has no specified default value. Default is false.- Parameters:
requiresNullAsDefaultValue- Whether NULL must be written for empty default values
-
isDefaultValuesForLongTypesSupported
public boolean isDefaultValuesForLongTypesSupported()Determines whether default values can be specified for LONGVARCHAR/LONGVARBINARY columns.- Returns:
trueif default values are allowed
-
setDefaultValuesForLongTypesSupported
public void setDefaultValuesForLongTypesSupported(boolean isSupported) Specifies whether default values can be specified for LONGVARCHAR/LONGVARBINARY columns.- Parameters:
isSupported-trueif default values are supported
-
isPrimaryKeyEmbedded
public boolean isPrimaryKeyEmbedded()Determines whether primary key constraints are embedded in the create table clause or as seperate alter table statements. The default is embedded pks.- Returns:
trueif pk constraints are embedded
-
setPrimaryKeyEmbedded
public void setPrimaryKeyEmbedded(boolean primaryKeyEmbedded) Specifies whether the primary key constraints are embedded in the create table clause or as seperate alter table statements.- Parameters:
primaryKeyEmbedded- Whether pk constraints are embedded
-
isForeignKeysEmbedded
public boolean isForeignKeysEmbedded()Determines whether foreign key constraints are embedded in the create table clause or as seperate alter table statements. Per default, foreign keys are external.- Returns:
trueif fk constraints are embedded
-
setForeignKeysEmbedded
public void setForeignKeysEmbedded(boolean foreignKeysEmbedded) Specifies whether foreign key constraints are embedded in the create table clause or as seperate alter table statements.- Parameters:
foreignKeysEmbedded- Whether fk constraints are embedded
-
isEmbeddedForeignKeysNamed
public boolean isEmbeddedForeignKeysNamed()Returns whether embedded foreign key constraints should have a name.- Returns:
trueif embedded fks have name
-
setEmbeddedForeignKeysNamed
public void setEmbeddedForeignKeysNamed(boolean embeddedForeignKeysNamed) Specifies whether embedded foreign key constraints should be named.- Parameters:
embeddedForeignKeysNamed- Whether embedded fks shall have a name
-
isIndicesSupported
public boolean isIndicesSupported()Determines whether indices are supported.- Returns:
trueif indices are supported
-
setIndicesSupported
public void setIndicesSupported(boolean supportingIndices) Specifies whether indices are supported.- Parameters:
supportingIndices-trueif indices are supported
-
isIndicesEmbedded
public boolean isIndicesEmbedded()Determines whether the indices are embedded in the create table clause or as seperate statements. Per default, indices are external.- Returns:
trueif indices are embedded
-
setIndicesEmbedded
public void setIndicesEmbedded(boolean indicesEmbedded) Specifies whether indices are embedded in the create table clause or as seperate alter table statements.- Parameters:
indicesEmbedded- Whether indices are embedded
-
isNonPKIdentityColumnsSupported
public boolean isNonPKIdentityColumnsSupported()Determines whether non-primary key columns can be auto-incrementing (IDENTITY columns).- Returns:
trueif normal non-PK columns can be auto-incrementing
-
setNonPKIdentityColumnsSupported
public void setNonPKIdentityColumnsSupported(boolean supportingNonPKIdentityColumns) Specifies whether non-primary key columns can be auto-incrementing (IDENTITY columns).- Parameters:
supportingNonPKIdentityColumns-trueif normal non-PK columns can be auto-incrementing
-
isDefaultValueUsedForIdentitySpec
public boolean isDefaultValueUsedForIdentitySpec()Determines whether the auto-increment specification uses the DEFAULT value of the column definition.- Returns:
trueif the auto-increment spec is done via the DEFAULT value
-
setDefaultValueUsedForIdentitySpec
public void setDefaultValueUsedForIdentitySpec(boolean identitySpecUsesDefaultValue) Specifies whether the auto-increment specification uses the DEFAULT value of the column definition.- Parameters:
identitySpecUsesDefaultValue-trueif the auto-increment spec is done via the DEFAULT value
-
isSystemIndicesReturned
public boolean isSystemIndicesReturned()Determines whether database-generated indices for primary and foreign keys are returned when reading a model from a database.- Returns:
trueif system indices are read from a live database
-
setSystemIndicesReturned
public void setSystemIndicesReturned(boolean returningSystemIndices) Specifies whether database-generated indices for primary and foreign keys are returned when reading a model from a database.- Parameters:
returningSystemIndices-trueif system indices are read from a live database
-
isSystemForeignKeyIndicesAlwaysNonUnique
public boolean isSystemForeignKeyIndicesAlwaysNonUnique()Determines whether system indices for foreign keys are always non-unique or can be unique (i.e. if a primary key column is used to establish the foreign key).- Returns:
trueif system foreign key indices are always non-unique; default isfalse
-
setSystemForeignKeyIndicesAlwaysNonUnique
public void setSystemForeignKeyIndicesAlwaysNonUnique(boolean alwaysNonUnique) Specifies whether system indices for foreign keys are always non-unique or can be unique (i.e. if a primary key column is used to establish the foreign key).- Parameters:
alwaysNonUnique-trueif system foreign key indices are always non-unique
-
isSyntheticDefaultValueForRequiredReturned
public boolean isSyntheticDefaultValueForRequiredReturned()Determines whether the platform returns synthetic default values (e.g. 0 for numeric columns etc.) for non-identity required columns when reading a model from a database.- Returns:
trueif synthetic default values are returned for non-identity required columns
-
setSyntheticDefaultValueForRequiredReturned
public void setSyntheticDefaultValueForRequiredReturned(boolean returningDefaultValue) Specifies whether the platform returns synthetic default values (e.g. 0 for numeric columns etc.) for non-identity required columns when reading a model from a database.- Parameters:
returningDefaultValue-trueif synthetic default values are returned for non-identity required columns
-
getIdentityStatusReadingSupported
public boolean getIdentityStatusReadingSupported()Determines whether the platform is able to read the auto-increment status for columns from an existing database.- Returns:
trueif the auto-increment status can be determined from an existing database
-
setIdentityStatusReadingSupported
public void setIdentityStatusReadingSupported(boolean canReadAutoIncrementStatus) Specifies whether the platform is able to read the auto-increment status for columns from an existing database.- Parameters:
canReadAutoIncrementStatus-trueif the auto-increment status can be determined from an existing database
-
isSqlCommentsSupported
public boolean isSqlCommentsSupported()Determines whether the database supports SQL comments.- Returns:
trueif comments are supported
-
setSqlCommentsSupported
public void setSqlCommentsSupported(boolean commentsSupported) Specifies whether SQL comments are supported by the database.- Parameters:
commentsSupported-trueif comments are supported
-
isDelimitedIdentifiersSupported
public boolean isDelimitedIdentifiersSupported()Determines whether delimited identifiers are supported.- Returns:
trueif delimited identifiers are supported
-
setDelimitedIdentifiersSupported
public void setDelimitedIdentifiersSupported(boolean areSupported) Specifies whether delimited identifiers are supported.- Parameters:
areSupported-trueif delimited identifiers are supported
-
isAlterTableForDropUsed
public boolean isAlterTableForDropUsed()Determines whether an ALTER TABLE statement shall be used for dropping indices or constraints. The default is false.- Returns:
trueif ALTER TABLE is required
-
setAlterTableForDropUsed
public void setAlterTableForDropUsed(boolean useAlterTableForDrop) Specifies whether an ALTER TABLE statement shall be used for dropping indices or constraints.- Parameters:
useAlterTableForDrop- Whether ALTER TABLE will be used
-
isIdentityOverrideAllowed
public boolean isIdentityOverrideAllowed()Determines whether the platform is allows the explicit specification of values for identity columns in INSERT/UPDATE statements.- Returns:
trueif values for identity columns can be specified
-
setIdentityOverrideAllowed
public void setIdentityOverrideAllowed(boolean identityOverrideAllowed) Specifies whether the platform is allows the explicit specification of values for identity columns in INSERT/UPDATE statements.- Parameters:
identityOverrideAllowed-trueif values for identity columns can be specified
-
isLastIdentityValueReadable
public boolean isLastIdentityValueReadable()Determines whether the values of identity columns can be read back from the database after insertion of a row.- Returns:
trueif the identity column(s) can be read back
-
setLastIdentityValueReadable
public void setLastIdentityValueReadable(boolean lastIdentityValueReadable) Specifies whether the values of identity columns can be read back from the database after insertion of a row.- Parameters:
lastIdentityValueReadable-trueif the identity column(s) can be read back
-
isAutoCommitModeForLastIdentityValueReading
public boolean isAutoCommitModeForLastIdentityValueReading()Determines whether auto-commit mode for the reading of the values of identity columns after insertion shall be used, i.e. whether between the insertion of the row and the reading of the database-generated identity value a commit is issued.- Returns:
trueif auto-commit mode is used
-
setAutoCommitModeForLastIdentityValueReading
public void setAutoCommitModeForLastIdentityValueReading(boolean autoCommitModeForLastIdentityValueReading) Determines whether auto-commit mode for the reading of the values of identity columns after insertion shall be used, i.e. whether between the insertion of the row and the reading of the database-generated identity value a commit is issued.- Parameters:
autoCommitModeForLastIdentityValueReading-trueif auto-commit mode shall be used
-
getMaxTableNameLength
public int getMaxTableNameLength()Returns the maximum number of characters that a table name can have.- Returns:
- The number of characters, or -1 if not limited
-
getMaxColumnNameLength
public int getMaxColumnNameLength()Returns the maximum number of characters that a column name can have.- Returns:
- The number of characters, or -1 if not limited
-
getMaxConstraintNameLength
public int getMaxConstraintNameLength()Returns the maximum number of characters that a constraint name can have.- Returns:
- The number of characters, or -1 if not limited
-
getMaxForeignKeyNameLength
public int getMaxForeignKeyNameLength()Returns the maximum number of characters that a foreign key name can have.- Returns:
- The number of characters, or -1 if not limited
-
setMaxIdentifierLength
public void setMaxIdentifierLength(int maxIdentifierLength) Sets the maximum length of all identifiers that this database allows. Use this method if the length limit is the same for all kinds of identifiers.- Parameters:
maxIdentifierLength- The maximum identifier length, -1 if unlimited
-
setMaxTableNameLength
public void setMaxTableNameLength(int maxTableNameLength) Sets the maximum length of table names that this database allows.- Parameters:
maxTableNameLength- The maximum length, -1 if unlimited
-
setMaxColumnNameLength
public void setMaxColumnNameLength(int maxColumnNameLength) Sets the maximum length of column names that this database allows.- Parameters:
maxColumnNameLength- The maximum length, -1 if unlimited
-
setMaxConstraintNameLength
public void setMaxConstraintNameLength(int maxConstraintNameLength) Sets the maximum length of constraint names that this database allows.- Parameters:
maxConstraintNameLength- The maximum length, -1 if unlimited
-
setMaxForeignKeyNameLength
public void setMaxForeignKeyNameLength(int maxForeignKeyNameLength) Sets the maximum length of foreign key names that this database allows.- Parameters:
maxForeignKeyNameLength- The maximum length, -1 if unlimited
-
getDelimiterToken
Returns the text that is used to delimit identifiers (eg. table names). Per default, this is a double quotation character (").- Returns:
- The delimiter text
-
setDelimiterToken
Sets the text that is used to delimit identifiers (eg. table names).- Parameters:
delimiterToken- The delimiter text
-
getValueQuoteToken
Returns the text that is used for for quoting values (e.g. text) when printing default values and in generates insert/update/delete statements. Per default, this is a single quotation character (').- Returns:
- The quote text
-
setValueQuoteToken
Sets the text that is used for for quoting values (e.g. text) when printing default values and in generates insert/update/delete statements.- Parameters:
valueQuoteChar- The new quote text
-
getCommentPrefix
Returns the string that denotes the beginning of a comment.- Returns:
- The comment prefix
-
setCommentPrefix
Sets the text that starts a comment.- Parameters:
commentPrefix- The new comment prefix
-
getCommentSuffix
Returns the string that denotes the end of a comment. Note that comments will be always on their own line.- Returns:
- The comment suffix
-
setCommentSuffix
Sets the text that ends a comment.- Parameters:
commentSuffix- The new comment suffix
-
getSqlCommandDelimiter
Returns the text separating individual sql commands.- Returns:
- The delimiter text
-
setSqlCommandDelimiter
Sets the text separating individual sql commands.- Parameters:
sqlCommandDelimiter- The delimiter text
-
getNativeType
Returns the database-native type for the given type code.- Parameters:
typeCode- TheTypestype code- Returns:
- The native type or
nullif there isn't one defined
-
getTargetJdbcType
public int getTargetJdbcType(int typeCode) Returns the jdbc type corresponding to the native type that is used for the given jdbc type. This is most often the same jdbc type, but can also be a different one. For instance, if a database has no native boolean type, then the source jdbc type would beBITorBOOLEAN, and the target jdbc type might beTINYINTorSMALLINT.- Parameters:
typeCode- TheTypestype code- Returns:
- The target jdbc type
-
addNativeTypeMapping
Adds a mapping from jdbc type to database-native type.- Parameters:
jdbcTypeCode- The jdbc type code as defined byTypesnativeType- The native type
-
addNativeTypeMapping
Adds a mapping from jdbc type to database-native type.- Parameters:
jdbcTypeCode- The jdbc type code as defined byTypesnativeType- The native typetargetJdbcTypeCode- The jdbc type code corresponding to the native type (e.g. when reading the model from the database)
-
addNativeTypeMapping
Adds a mapping from jdbc type to database-native type. Note that this method accesses the named constant inTypesvia reflection and is thus safe to use under JDK 1.2/1.3 even with constants defined only in later Java versions - for these, the method simply will not add a mapping.- Parameters:
jdbcTypeName- The jdbc type name, one of the constants defined inTypesnativeType- The native type
-
addNativeTypeMapping
Adds a mapping from jdbc type to database-native type. Note that this method accesses the named constant inTypesvia reflection and is thus safe to use under JDK 1.2/1.3 even with constants defined only in later Java versions - for these, the method simply will not add a mapping.- Parameters:
jdbcTypeName- The jdbc type name, one of the constants defined inTypesnativeType- The native typetargetJdbcTypeName- The jdbc type corresponding to the native type (e.g. when reading the model from the database)
-
hasNullDefault
public boolean hasNullDefault(int sqlTypeCode) Determines whether the native type for the given sql type code (one of theTypesconstants) has a null default value on this platform.- Parameters:
sqlTypeCode- The sql type code- Returns:
trueif the native type has a null default value
-
setHasNullDefault
public void setHasNullDefault(int sqlTypeCode, boolean hasNullDefault) Specifies whether the native type for the given sql type code (one of theTypesconstants) has a null default value on this platform.- Parameters:
sqlTypeCode- The sql type codehasNullDefault-trueif the native type has a null default value
-
hasSize
public boolean hasSize(int sqlTypeCode) Determines whether the native type for the given sql type code (one of theTypesconstants) has a size specification on this platform.- Parameters:
sqlTypeCode- The sql type code- Returns:
trueif the native type has a size specification
-
setHasSize
public void setHasSize(int sqlTypeCode, boolean hasSize) Specifies whether the native type for the given sql type code (one of theTypesconstants) has a size specification on this platform.- Parameters:
sqlTypeCode- The sql type codehasSize-trueif the native type has a size specification
-
getDefaultSize
Returns the default size value for the given type, if any.- Parameters:
jdbcTypeCode- The jdbc type code- Returns:
- The default size or
nullif none is defined
-
setDefaultSize
public void setDefaultSize(int jdbcTypeCode, int defaultSize) Adds a default size for the given jdbc type.- Parameters:
jdbcTypeCode- The jdbc type codedefaultSize- The default size
-
setDefaultSize
Adds a default size for the given jdbc type.- Parameters:
jdbcTypeName- The name of the jdbc type, one of theTypesconstantsdefaultSize- The default size
-
hasPrecisionAndScale
public boolean hasPrecisionAndScale(int sqlTypeCode) Determines whether the native type for the given sql type code (one of theTypesconstants) has precision and scale specifications on this platform.- Parameters:
sqlTypeCode- The sql type code- Returns:
trueif the native type has precision and scale specifications
-
setHasPrecisionAndScale
public void setHasPrecisionAndScale(int sqlTypeCode, boolean hasPrecisionAndScale) Specifies whether the native type for the given sql type code (one of theTypesconstants) has precision and scale specifications on this platform.- Parameters:
sqlTypeCode- The sql type codehasPrecisionAndScale-trueif the native type has precision and scale specifications
-