public class MySqlDialect extends GeneratorDialect
Modifier and Type | Field and Description |
---|---|
private static String[] |
ESCAPES |
private static char |
MAX_ESCAPE |
NOW
Constructor and Description |
---|
MySqlDialect() |
Modifier and Type | Method and Description |
---|---|
protected String |
createAddDateExpression(String referenceDate,
long value,
String unit)
Creates an SQL expression to add a value to a date.
|
String |
createBlobExpression(byte[] blob)
Create MySQL specific binary expression.
|
Object |
getEmptyValuesExpression()
The SQL expression to use in an empty insert statement.
|
String |
getOptionalTable()
Returns the string to use when no table is required, e.g. for "SELECT 1, 2 FROM DUAL" this would return "FROM
DUAL".
|
boolean |
isEmulatingSequences()
Indicates that tables are used in place of sequences, if
GenerationType.SEQUENCE is defined for a
GeneratedValue . |
boolean |
isFastInTransaction()
Indicates that the database usually faster when all statements are executed within an transaction.
|
boolean |
isSelectFromSameTableInInsertSupported()
Indicates that this dialect may select from the same table in a select.
|
String |
quoteString(String value)
Create MySQL specific quoting of the string.
|
addQuotedCharacter, adjustNextIdentityValue, adjustNextSequenceValue, buildCurrentSequenceValue, buildNextSequenceValue, convertBooleanValue, convertNumberValue, convertTemporalValue, convertTemporalValue, convertToDatabaseDate, createHexBlobExpression, getAutoGenerationType, getConcatOperator, getLetter, isEmptyStringEqualToNull, isIdentitySupported, isNextSequenceValueInInsertSupported, isSequenceInWhereSupported, isSequenceSupported, isSettingIdentityAllowed, truncateTable
private static final char MAX_ESCAPE
private static final String[] ESCAPES
protected String createAddDateExpression(String referenceDate, long value, String unit)
GeneratorDialect
createAddDateExpression
in class GeneratorDialect
referenceDate
- the expression for the reference datevalue
- the value to add to the dateunit
- the unit of the valuepublic String createBlobExpression(byte[] blob)
createBlobExpression
in class GeneratorDialect
blob
- the bytes to convertpublic Object getEmptyValuesExpression()
GeneratorDialect
getEmptyValuesExpression
in class GeneratorDialect
public String getOptionalTable()
GeneratorDialect
getOptionalTable
in class GeneratorDialect
public 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 isFastInTransaction()
GeneratorDialect
isFastInTransaction
in class GeneratorDialect
true
if an transaction is faster than auto commitpublic boolean isSelectFromSameTableInInsertSupported()
GeneratorDialect
isSelectFromSameTableInInsertSupported
in class GeneratorDialect
true
if "INSERT INTO XXX (a) VALUES (SELECT max(a) FROM XXX)" is supportedpublic String quoteString(String value)
quoteString
in class GeneratorDialect
value
- the value to quoteCopyright © 2022 fastnate.org. All rights reserved.