public class AbstractTransactSQLIdentityColumnSupport extends IdentityColumnSupportImpl
Constructor and Description |
---|
AbstractTransactSQLIdentityColumnSupport() |
Modifier and Type | Method and Description |
---|---|
String |
appendIdentitySelectToInsert(String insertSQL)
Provided we
IdentityColumnSupport.supportsInsertSelectIdentity() , then attach the
"select identity" clause to the insert statement. |
String |
getIdentityColumnString(int type)
The syntax used during DDL to define a column as being an IDENTITY of
a particular type.
|
String |
getIdentitySelectString(String table,
String column,
int type)
Get the select command to use to retrieve the last generated IDENTITY
value for a particular table
|
boolean |
supportsIdentityColumns()
Does this dialect support identity column key generation?
|
boolean |
supportsInsertSelectIdentity()
Does the dialect support some form of inserting and selecting
the generated IDENTITY value all in the same statement.
|
buildGetGeneratedKeysDelegate, getIdentityInsertString, hasDataTypeInIdentityColumn
public AbstractTransactSQLIdentityColumnSupport()
public boolean supportsIdentityColumns()
IdentityColumnSupport
supportsIdentityColumns
in interface IdentityColumnSupport
supportsIdentityColumns
in class IdentityColumnSupportImpl
public String getIdentityColumnString(int type) throws MappingException
IdentityColumnSupport
getIdentityColumnString
in interface IdentityColumnSupport
getIdentityColumnString
in class IdentityColumnSupportImpl
type
- The Types
type code.MappingException
- If IDENTITY generation is not supported.public String getIdentitySelectString(String table, String column, int type) throws MappingException
IdentityColumnSupport
getIdentitySelectString
in interface IdentityColumnSupport
getIdentitySelectString
in class IdentityColumnSupportImpl
table
- The table into which the insert was donecolumn
- The PK column.type
- The Types
type code.MappingException
- If IDENTITY generation is not supported.public boolean supportsInsertSelectIdentity()
IdentityColumnSupport
supportsInsertSelectIdentity
in interface IdentityColumnSupport
supportsInsertSelectIdentity
in class IdentityColumnSupportImpl
public String appendIdentitySelectToInsert(String insertSQL)
IdentityColumnSupport
IdentityColumnSupport.supportsInsertSelectIdentity()
, then attach the
"select identity" clause to the insert statement.
Note, if IdentityColumnSupport.supportsInsertSelectIdentity()
== false then
the insert-string should be returned without modification.appendIdentitySelectToInsert
in interface IdentityColumnSupport
appendIdentitySelectToInsert
in class IdentityColumnSupportImpl
insertSQL
- The insert commandCopyright © 2021 JBoss by Red Hat. All rights reserved.