public class MsSqlDialect extends GeneratorDialect
NOW
Constructor and Description |
---|
MsSqlDialect() |
Modifier and Type | Method and Description |
---|---|
protected void |
addQuotedCharacter(StringBuilder result,
char c)
Adds a quoted character to the result string buffer.
|
String |
buildCurrentSequenceValue(String sequence,
int incrementSize,
boolean firstCall)
Builds the SQL expression that is used for referencing the current value of the given sequence.
|
String |
buildNextSequenceValue(String sequence,
int incrementSize)
Builds the SQL expression resp. statement that is used for creating the next value of the given sequence.
|
protected String |
convertTemporalValue(Date value)
Builds the SQL expression for a date / time / timestamp.
|
String |
convertTemporalValue(Date value,
javax.persistence.TemporalType type)
Converts a date to an appropriate SQL expression.
|
String |
createBlobExpression(byte[] blob)
Converts the given byte array to an SQL expression for the current database.
|
String |
getConcatOperator()
The operator used to concat two Strings.
|
boolean |
isEmulatingSequences()
Indicates that tables are used in place of sequences, if
GenerationType.SEQUENCE is defined for a
GeneratedValue . |
boolean |
isSettingIdentityAllowed()
Indicates if this dialect supports writing absolute values to an
GenerationType.IDENTITY column. |
adjustNextIdentityValue, adjustNextSequenceValue, convertBooleanValue, convertNumberValue, convertToDatabaseDate, createAddDateExpression, createHexBlobExpression, getAutoGenerationType, getEmptyValuesExpression, getLetter, getOptionalTable, isEmptyStringEqualToNull, isFastInTransaction, isIdentitySupported, isNextSequenceValueInInsertSupported, isSelectFromSameTableInInsertSupported, isSequenceInWhereSupported, isSequenceSupported, quoteString, truncateTable
protected void addQuotedCharacter(StringBuilder result, char c)
GeneratorDialect
addQuotedCharacter
in class GeneratorDialect
result
- the current result bufferc
- the character to quotepublic String buildCurrentSequenceValue(String sequence, int incrementSize, boolean firstCall)
GeneratorDialect
buildCurrentSequenceValue
in class GeneratorDialect
sequence
- the fully qualified name of the sequenceincrementSize
- the expected incrementSize, as given in the schema - used by some dialects to ensure that exactly that
inrement is usedfirstCall
- indicates that the sequence was not updated before in this session - we may need to use a different
approach to get the current valuepublic String buildNextSequenceValue(String sequence, int incrementSize)
GeneratorDialect
GeneratorDialect.isNextSequenceValueInInsertSupported()
this will return an expression or a statement.buildNextSequenceValue
in class GeneratorDialect
sequence
- the fully qualified name of the sequenceincrementSize
- the expected incrementSize, as given in the schema - used by some dialects to ensure that exactly that
inrement is usedprotected String convertTemporalValue(Date value)
GeneratorDialect
convertTemporalValue
in class GeneratorDialect
value
- the date, already converted to one from javax.sql.*
public String convertTemporalValue(Date value, javax.persistence.TemporalType type)
GeneratorDialect
convertTemporalValue
in class GeneratorDialect
value
- the timestamp valuetype
- the typepublic String createBlobExpression(byte[] blob)
GeneratorDialect
createBlobExpression
in class GeneratorDialect
blob
- the bytes to convertpublic String getConcatOperator()
GeneratorDialect
getConcatOperator
in class GeneratorDialect
null
if this dialect does not have such an operatorpublic boolean isEmulatingSequences()
GeneratorDialect
GenerationType.SEQUENCE
is defined for a
GeneratedValue
.isEmulatingSequences
in class GeneratorDialect
true
if sequences are emulated with tables, false
if sequences are supportedpublic boolean isSettingIdentityAllowed()
GeneratorDialect
GenerationType.IDENTITY
column.isSettingIdentityAllowed
in class GeneratorDialect
true
if we can write fix values for identity columnsCopyright © 2022 fastnate.org. All rights reserved.