public class MariaDbDialect extends SqlDialect
DataObject
Modifier and Type | Field and Description |
---|---|
static char |
BOOLEAN_FALSE_CHAR |
static java.lang.String |
BOOLEAN_FALSE_STRING |
static char |
BOOLEAN_TRUE_CHAR |
static java.lang.String |
BOOLEAN_TRUE_STRING |
BOOLEAN_FALSE_INT, BOOLEAN_TRUE_INT, dataObject, timestampFormat
Constructor and Description |
---|
MariaDbDialect() |
Modifier and Type | Method and Description |
---|---|
protected void |
extendCreateStatement(java.lang.StringBuilder createStatement,
AbstractAttribute attribute) |
protected void |
extendInsertStatementWithValues(int i,
java.sql.PreparedStatement statementForInsertion,
java.util.HashMap<java.lang.String,java.lang.Object> original,
java.util.HashMap<java.lang.String,java.lang.Object> workedOn,
java.lang.String columnName,
int columnType,
int columnScale,
java.lang.String columnNameOfRecordingDate,
java.lang.String columnNameOfRecordingUser,
java.lang.String recordingUser) |
protected int |
extendUpdatePhrase(int countUpdateColumns,
java.lang.StringBuilder updateStatement,
java.util.HashMap<java.lang.String,java.lang.Object> original,
java.util.HashMap<java.lang.String,java.lang.Object> workedOn,
java.lang.String columnName,
int columnType,
int columnScale) |
boolean |
getBoolean(java.lang.String columnName,
java.util.HashMap<java.lang.String,java.lang.Object> original)
Returns the value of a column as boolean.
|
static java.lang.String |
getCreateIndexStatement(java.lang.String tableName,
Index index,
java.lang.String indexName)
Returns the specific create index statement string of the specified table
|
java.lang.String |
getCreateStatement(EntityInfo entityInfo)
Returns the specific create statement string of the specified table
|
static java.lang.String |
getDbExpression(java.sql.Date sqlDate)
Returns the database specific expression of the date as specified.
|
static java.lang.String |
getDbExpression(java.sql.Time sqlTime)
Returns the database specific expression of the time as specified.
|
static java.lang.String |
getDbExpression(java.sql.Timestamp timeStamp)
Returns the database specific expression of the timestamp as specified.
|
protected java.lang.String |
getLimitationFragment(int limit,
int offset)
Returns the limitation fragment of the SQL statement.
|
java.lang.String |
getSqlCompareString(boolean b)
Returns the specific variant how boolean values are compared.
|
java.lang.String |
getSqlCompareString(java.sql.Date date)
Returns the specific variant how date values are compared.
|
java.lang.String |
getSqlCompareString(DateString dateString)
Returns the specific variant how date values are compared.
|
boolean |
getWorkedOnBoolean(java.lang.String columnName,
java.util.HashMap<java.lang.String,java.lang.Object> workedOn)
Returns the value of a column as boolean in a worked on state -
it might already been modified and differ from the original value.
|
protected void |
initColumn(java.util.HashMap<java.lang.String,java.lang.Object> original,
java.util.HashMap<java.lang.String,java.lang.Object> workedOn,
java.lang.String columnName,
int columnType,
int columnScale) |
protected void |
loadColumn(java.sql.ResultSet rs,
java.util.HashMap<java.lang.String,java.lang.Object> original,
java.util.HashMap<java.lang.String,java.lang.Object> workedOn,
java.lang.String columnName,
int columnType,
int columnScale) |
void |
setBoolean(java.lang.String columnName,
boolean boolValue,
java.util.HashMap<java.lang.String,java.lang.Object> workedOn)
Sets the value of the specified column.
|
protected java.lang.String |
sqlSecure(java.lang.String stringField)
Replaces ' by '' to avoid SQL error while inserting or updating.
|
java.lang.String |
unifyColumnName(java.lang.String columnName)
Unifies the column name.
|
java.lang.String |
unifyTableName(java.lang.String TableName)
Unifies the table name.
|
compress, extendToLength, fillInsertStatementWithValues, getCreateStatement, getCreateStatement, getIntDateValue, getRowBoolean, getRowBoolean, getRowDate, getRowDate, getRowDouble, getRowDouble, getRowFloat, getRowFloat, getRowInt, getRowInt, getRowLong, getRowLong, getRowString, getRowString, getRowTime, getRowTime, getRowTimestamp, getSqlCompareString, getSQLFormat, getUpdatePhrase, getWhereConditionFragementForExactDateComparison, initRow, isKnownAsBoolean, isPartOfUniqueIndex, loadRow, setAttributes, setDataObject, supportsForeignKey, supportsPrimaryKey, transformStringWhenSaving
public static final char BOOLEAN_TRUE_CHAR
public static final char BOOLEAN_FALSE_CHAR
public static final java.lang.String BOOLEAN_TRUE_STRING
public static final java.lang.String BOOLEAN_FALSE_STRING
protected void initColumn(java.util.HashMap<java.lang.String,java.lang.Object> original, java.util.HashMap<java.lang.String,java.lang.Object> workedOn, java.lang.String columnName, int columnType, int columnScale)
initColumn
in class SqlDialect
protected void loadColumn(java.sql.ResultSet rs, java.util.HashMap<java.lang.String,java.lang.Object> original, java.util.HashMap<java.lang.String,java.lang.Object> workedOn, java.lang.String columnName, int columnType, int columnScale)
loadColumn
in class SqlDialect
protected void extendInsertStatementWithValues(int i, java.sql.PreparedStatement statementForInsertion, java.util.HashMap<java.lang.String,java.lang.Object> original, java.util.HashMap<java.lang.String,java.lang.Object> workedOn, java.lang.String columnName, int columnType, int columnScale, java.lang.String columnNameOfRecordingDate, java.lang.String columnNameOfRecordingUser, java.lang.String recordingUser) throws java.sql.SQLException
extendInsertStatementWithValues
in class SqlDialect
java.sql.SQLException
protected int extendUpdatePhrase(int countUpdateColumns, java.lang.StringBuilder updateStatement, java.util.HashMap<java.lang.String,java.lang.Object> original, java.util.HashMap<java.lang.String,java.lang.Object> workedOn, java.lang.String columnName, int columnType, int columnScale)
extendUpdatePhrase
in class SqlDialect
public static java.lang.String getDbExpression(java.sql.Date sqlDate)
sqlDate
- the date to be formattedpublic static java.lang.String getDbExpression(java.sql.Time sqlTime)
sqlTime
- the time to be formattedpublic static java.lang.String getDbExpression(java.sql.Timestamp timeStamp)
timeStamp
- the time stamp to be formattedpublic java.lang.String unifyTableName(java.lang.String TableName)
unifyTableName
in class SqlDialect
tableName
- the table name to unifypublic java.lang.String unifyColumnName(java.lang.String columnName)
unifyColumnName
in class SqlDialect
columnName
- the column name to unifypublic java.lang.String getSqlCompareString(DateString dateString)
getSqlCompareString
in class SqlDialect
dateString
- the DateString to be preparedpublic java.lang.String getSqlCompareString(java.sql.Date date)
getSqlCompareString
in class SqlDialect
date
- the date value to be preparedpublic java.lang.String getSqlCompareString(boolean b)
SqlDialect
getSqlCompareString
in class SqlDialect
b
- the boolean value to be preparedpublic boolean getBoolean(java.lang.String columnName, java.util.HashMap<java.lang.String,java.lang.Object> original)
getBoolean
in class SqlDialect
columnName
- the name of the columnoriginal
- the buffer of original values of the rowpublic boolean getWorkedOnBoolean(java.lang.String columnName, java.util.HashMap<java.lang.String,java.lang.Object> workedOn)
columnName
- the name of the columnworkedOn
- the buffer of worked on values of the rowpublic void setBoolean(java.lang.String columnName, boolean boolValue, java.util.HashMap<java.lang.String,java.lang.Object> workedOn)
setBoolean
in class SqlDialect
columnName
- the name of the column to be setboolValue
- the value the column shall be set toworkedOn
- the buffer of worked on values of the rowpublic java.lang.String getCreateStatement(EntityInfo entityInfo)
SqlDialect
getCreateStatement
in class SqlDialect
entityInfo
- informations about the table to be createdprotected void extendCreateStatement(java.lang.StringBuilder createStatement, AbstractAttribute attribute)
extendCreateStatement
in class SqlDialect
public static java.lang.String getCreateIndexStatement(java.lang.String tableName, Index index, java.lang.String indexName)
tableName
- the name of the table to be indexedindex
- the index to be createdprotected java.lang.String getLimitationFragment(int limit, int offset)
getLimitationFragment
in class SqlDialect
limit
- maximum of entries to be put into the result setoffset
- the number of records that don't have to be read anymoreprotected java.lang.String sqlSecure(java.lang.String stringField)
SqlDialect
sqlSecure
in class SqlDialect
stringField
- the String to modifyCopyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de