Package io.jmix.dynmodel.impl.db
Class SqlServerDynamicModelDbSupport
java.lang.Object
io.jmix.dynmodel.impl.db.DynamicModelDbSupport
io.jmix.dynmodel.impl.db.SqlServerDynamicModelDbSupport
-
Field Summary
Fields inherited from class io.jmix.dynmodel.impl.db.DynamicModelDbSupport
DEFAULT_BYTES_LENGTH, DEFAULT_STRING_LENGTH, DEFAULT_URI_LENGTH, FALLBACK_IDENTIFIER, IDENTIFIER_HASH_LENGTH, maxIdentifierLength, metadataTools, reservedWords, STANDARD_RESERVED_WORDS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAddColumnSql(String tableName, String columnName, String columnType) Returns SQL that adds a single column to an existing table.protected Stringprotected Stringprotected StringgetBytesType(int length) protected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected StringgetStringType(int length) protected StringgetUniqueDuplicateCheckPredicate(List<String> columnNames) Returns the WHERE predicate (without theWHEREkeyword) that excludes rows from the duplicate-data pre-check run before adding a unique constraint, reflecting how this DBMS treats NULLs in unique keys.protected Stringprotected ObjecttoDbOffsetDateTime(OffsetDateTime value) protected ObjecttoDbOffsetTime(OffsetTime value) protected OffsetDateTimetoOffsetDateTime(Object dbValue) protected OffsetTimetoOffsetTime(Object dbValue) booleanuniqueConstraintExists(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, String tableName, String constraintName) Checks whether the named unique constraint already exists on the given table.Methods inherited from class io.jmix.dynmodel.impl.db.DynamicModelDbSupport
appendTrailingUnderscore, applyPaging, canonicalizeIdentifier, configureIdentifierRules, extractUniqueConstraintName, getAlterColumnTypeSql, getCreateUniqueConstraintSql, getDropUniqueConstraintSql, getEnumIdType, getFloatType, getLength, getLikeEscapeClause, getLocalTimeType, getReferenceJavaType, getSqlType, getSqlTypeByJavaType, hashIdentifier, isDuplicateConstraintException, isLob, isReservedWord, normalizeGeneratedIdentifier, resolveConstraintName, setMetadataTools, shortenIdentifier, toBoolean, toByteArray, toDbBoolean, toDbLocalTime, toDbUuid, toDbValue, toEnumValue, toLocalDate, toLocalDateTime, toLocalTime, toNumber, toPropertyValue, toUnderscoreSeparated, toUuid
-
Constructor Details
-
SqlServerDynamicModelDbSupport
public SqlServerDynamicModelDbSupport()
-
-
Method Details
-
getUuidSqlType
- Specified by:
getUuidSqlTypein classDynamicModelDbSupport
-
getUniqueDuplicateCheckPredicate
Description copied from class:DynamicModelDbSupportReturns the WHERE predicate (without theWHEREkeyword) that excludes rows from the duplicate-data pre-check run before adding a unique constraint, reflecting how this DBMS treats NULLs in unique keys. The default treats NULLs as distinct, so a row with a NULL in any constrained column never collides and is ignored. Returns an empty string when no rows should be excluded.- Overrides:
getUniqueDuplicateCheckPredicatein classDynamicModelDbSupport
-
getStringType
- Overrides:
getStringTypein classDynamicModelDbSupport
-
getStringLobType
- Overrides:
getStringLobTypein classDynamicModelDbSupport
-
getBytesType
- Overrides:
getBytesTypein classDynamicModelDbSupport
-
getBytesLobType
- Overrides:
getBytesLobTypein classDynamicModelDbSupport
-
getBooleanType
- Overrides:
getBooleanTypein classDynamicModelDbSupport
-
getDoubleType
- Overrides:
getDoubleTypein classDynamicModelDbSupport
-
getAddColumnSql
Description copied from class:DynamicModelDbSupportReturns SQL that adds a single column to an existing table.- Overrides:
getAddColumnSqlin classDynamicModelDbSupport- Parameters:
tableName- physical table namecolumnName- physical column namecolumnType- physical column type- Returns:
- DDL statement
-
getLocalDateTimeType
- Overrides:
getLocalDateTimeTypein classDynamicModelDbSupport
-
getOffsetTimeType
- Overrides:
getOffsetTimeTypein classDynamicModelDbSupport
-
getOffsetDateTimeType
- Overrides:
getOffsetDateTimeTypein classDynamicModelDbSupport
-
toDbOffsetTime
- Overrides:
toDbOffsetTimein classDynamicModelDbSupport
-
toOffsetTime
- Overrides:
toOffsetTimein classDynamicModelDbSupport
-
toDbOffsetDateTime
- Overrides:
toDbOffsetDateTimein classDynamicModelDbSupport
-
toOffsetDateTime
- Overrides:
toOffsetDateTimein classDynamicModelDbSupport
-
getUniqueConstraintViolationPattern
- Overrides:
getUniqueConstraintViolationPatternin classDynamicModelDbSupport
-
uniqueConstraintExists
public boolean uniqueConstraintExists(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, String tableName, String constraintName) Description copied from class:DynamicModelDbSupportChecks whether the named unique constraint already exists on the given table.- Overrides:
uniqueConstraintExistsin classDynamicModelDbSupport- Parameters:
jdbcTemplate- JDBC template for the target storetableName- physical table nameconstraintName- physical constraint name- Returns:
trueif the constraint already exists
-
getDuplicateConstraintPattern
- Overrides:
getDuplicateConstraintPatternin classDynamicModelDbSupport
-