- java.lang.Object
-
- org.tentackle.sql.backends.AbstractBackend
-
- org.tentackle.sql.backends.AbstractSql92Backend
-
- org.tentackle.sql.backends.MySql
-
- org.tentackle.sql.backends.MariaDb
-
- All Implemented Interfaces:
Backend
@Service(Backend.class) public class MariaDb extends MySql
Backend for MariaDB.- Author:
- harald
-
-
Field Summary
-
Fields inherited from class org.tentackle.sql.backends.MySql
SQL_LIMIT, SQL_LIMIT_PAR, SQL_OFFSET, SQL_OFFSET_PAR
-
Fields inherited from class org.tentackle.sql.backends.AbstractSql92Backend
RESERVED_WORDS_SQL92, SQL_COALESCE, SQL_FOR_UPDATE
-
Fields inherited from class org.tentackle.sql.backends.AbstractBackend
TYPE_BIGINT, TYPE_BIT, TYPE_BLOB, TYPE_BOOL, TYPE_BOOLEAN, TYPE_BYTE, TYPE_BYTEA, TYPE_CHAR_1, TYPE_CLOB, TYPE_DATE, TYPE_DATETIME, TYPE_DATETIME_YEAR_TO_SECOND, TYPE_DECIMAL, TYPE_DECIMAL_19, TYPE_DOUBLE, TYPE_FLOAT, TYPE_FLOAT4, TYPE_FLOAT8, TYPE_INT, TYPE_INT2, TYPE_INT4, TYPE_INT8, TYPE_INTEGER, TYPE_NCHAR_1, TYPE_NUMBER, TYPE_NUMBER_1, TYPE_NUMBER_10, TYPE_NUMBER_19, TYPE_NUMBER_5, TYPE_NVARCHAR, TYPE_NVARCHAR_MAX, TYPE_REAL, TYPE_SMALLFLOAT, TYPE_SMALLINT, TYPE_TEXT, TYPE_TIME, TYPE_TIMESTAMP, TYPE_TINYINT, TYPE_VARBINARY_MAX, TYPE_VARCHAR
-
Fields inherited from interface org.tentackle.sql.Backend
SQL_ALLSTAR, SQL_ALTER_COLUMN, SQL_ALTER_INDEX, SQL_ALTER_TABLE, SQL_AND, SQL_ANDNOT, SQL_ARRAY_ALL, SQL_ARRAY_ALL_PAR, SQL_ARRAY_ANY, SQL_ARRAY_ANY_PAR, SQL_ARRAY_IN, SQL_ARRAY_IN_PAR, SQL_ARRAY_NOT_IN, SQL_ARRAY_NOT_IN_PAR, SQL_ARRAY_PAR, SQL_COMMA, SQL_COMMA_PAR, SQL_DELETE, SQL_EQUAL, SQL_EQUAL_PAR, SQL_EQUAL_PAR_COMMA, SQL_EQUAL_ZERO, SQL_EXISTS, SQL_FROM, SQL_GREATER, SQL_GREATER_PAR, SQL_GREATEROREQUAL, SQL_GREATEROREQUAL_PAR, SQL_GROUPBY, SQL_IF_EXISTS, SQL_INSERT_INTO, SQL_INSERT_VALUES, SQL_ISNOTNULL, SQL_ISNULL, SQL_LEFT_PARENTHESIS, SQL_LESS, SQL_LESS_PAR, SQL_LESSOREQUAL, SQL_LESSOREQUAL_PAR, SQL_LIKE, SQL_LIKE_PAR, SQL_MAX, SQL_MIN, SQL_NOT, SQL_NOTEQUAL, SQL_NOTEQUAL_PAR, SQL_NOTEQUAL_ZERO, SQL_NOTLIKE, SQL_NOTLIKE_PAR, SQL_OR, SQL_ORDERBY, SQL_ORNOT, SQL_PAR, SQL_PAR_COMMA, SQL_PLUS_ONE, SQL_RIGHT_PARENTHESIS, SQL_SELECT, SQL_SELECT_ALL_FROM, SQL_SET, SQL_SORTASC, SQL_SORTDESC, SQL_UPDATE, SQL_WHERE, SQL_WHEREALL, SQL_WHEREAND, SQL_WHERENOTHING, SQL_WHEREOR
-
-
Constructor Summary
Constructors Constructor Description MariaDb()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDriverClassName()Gets the JDBC driver class name.java.lang.StringgetName()Gets the name of the backend.protected booleanisDropIfExistsSupported()Adds "IF EXISTS" to drop clauses, if supported by the backend.
Makes migration a little more robust in case the same SQL scripts are applied to different databases than those used to generate the migration scripts for.booleanisMatchingUrl(java.lang.String url)Checks whether the backend belongs to the given jdbc url.
If multiple backend implementations are provided for the same database type, only one backend should match the URL.-
Methods inherited from class org.tentackle.sql.backends.MySql
allowsExpressionsReferringToTablesBeingUpdated, buildSelectSql, createColumnMetaData, extractWhereClause, getBackendId, getMaxSize, getMetaData, getMigrationStrategy, isFunctionBasedIndexSupported, isReleaseSavepointSupported, isReservedSchemaName, jdbcTypeToSqlType, setLeadingSelectParameters, setTrailingSelectParameters, sqlAddColumn, sqlAlterColumnComment, sqlAlterColumnType, sqlCreateColumn, sqlCreateTableClosing, sqlDropIndex, sqlRenameAndAlterColumnType, sqlRenameColumn, sqlRenameIndex, sqlTypeToString
-
Methods inherited from class org.tentackle.sql.backends.AbstractSql92Backend
getCoalesceKeyword, getReservedWords, sqlCreateForeignKey, sqlDropForeignKey, sqlNextFromSequene, supportsSequences
-
Methods inherited from class org.tentackle.sql.backends.AbstractBackend
assertValidName, buildSelectSql, columnTypeNullDefaultToString, columnTypeToString, createConnection, createIndexColumnMetaData, createIndexMetaData, createPassword, createTableMetaData, getDefaultSchema, getDefaultSize, getEmptyString, getMaxScale, getModelMetaData, getTableHeaders, getTableMetaData, isArrayOperatorSupported, isClobSupported, isCommunicationLinkException, isConstraintException, isDefaultEqual, isDropIfExistsEnabled, isFilteredIndexSupported, isMatchingName, isReservedTableName, isTemporaryName, needAliasForSubselect, needSetLongWorkaround, needTxForFetchsize, normalizeDefault, optimizeSql, setArray, setDropIfExistsEnabled, sqlAlterColumnDefault, sqlAlterColumnNullConstraint, sqlAlterTableComment, sqlAsBeforeTableAlias, sqlComment, sqlCreateColumnComment, sqlCreateIndex, sqlCreateTableAttributeWithoutComment, sqlCreateTableComment, sqlCreateTableIntro, sqlCreateTableIntroWithoutComment, sqlDropColumn, sqlDropTable, sqlFunction, sqlJoin, sqlJoinSelects, sqlJoinSelects, sqlRenameTable, sqlRequiresExtraCommit, sqlResultSetIsClosedSupported, sqlUpdateToNotNull, toInternalType, toQuotedString, toString, valueToLiteral
-
-
-
-
Method Detail
-
isMatchingUrl
public boolean isMatchingUrl(java.lang.String url)
Description copied from interface:BackendChecks whether the backend belongs to the given jdbc url.
If multiple backend implementations are provided for the same database type, only one backend should match the URL. The others must be selected via name.- Specified by:
isMatchingUrlin interfaceBackend- Overrides:
isMatchingUrlin classMySql- Parameters:
url- the jdbc url- Returns:
- true if matches
-
getName
public java.lang.String getName()
Description copied from interface:BackendGets the name of the backend.
-
getDriverClassName
public java.lang.String getDriverClassName()
Description copied from interface:BackendGets the JDBC driver class name.- Specified by:
getDriverClassNamein interfaceBackend- Overrides:
getDriverClassNamein classMySql- Returns:
- the class name
-
isDropIfExistsSupported
protected boolean isDropIfExistsSupported()
Description copied from class:AbstractBackendAdds "IF EXISTS" to drop clauses, if supported by the backend.
Makes migration a little more robust in case the same SQL scripts are applied to different databases than those used to generate the migration scripts for.- Overrides:
isDropIfExistsSupportedin classAbstractBackend- Returns:
- true if supported
-
-