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, truncateTableprivate static final char MAX_ESCAPE
private static final String[] ESCAPES
protected String createAddDateExpression(String referenceDate, long value, String unit)
GeneratorDialectcreateAddDateExpression in class GeneratorDialectreferenceDate - 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 GeneratorDialectblob - the bytes to convertpublic Object getEmptyValuesExpression()
GeneratorDialectgetEmptyValuesExpression in class GeneratorDialectpublic String getOptionalTable()
GeneratorDialectgetOptionalTable in class GeneratorDialectpublic boolean isEmulatingSequences()
GeneratorDialectGenerationType.SEQUENCE is defined for a
GeneratedValue.isEmulatingSequences in class GeneratorDialecttrue if sequences are emulated with tables, false if sequences are supportedpublic boolean isFastInTransaction()
GeneratorDialectisFastInTransaction in class GeneratorDialecttrue if an transaction is faster than auto commitpublic boolean isSelectFromSameTableInInsertSupported()
GeneratorDialectisSelectFromSameTableInInsertSupported in class GeneratorDialecttrue if "INSERT INTO XXX (a) VALUES (SELECT max(a) FROM XXX)" is supportedpublic String quoteString(String value)
quoteString in class GeneratorDialectvalue - the value to quoteCopyright © 2022 fastnate.org. All rights reserved.