public class MySQLDatabaseAdapter extends GenericDatabaseAdapter
| Constructor and Description |
|---|
MySQLDatabaseAdapter() |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getAlterTableStatements(String tableName,
List<ColumnDescription> columnsToAdd,
boolean quoteTableName,
boolean quoteColumnNames) |
String |
getColumnQuoteString() |
String |
getDescription() |
String |
getInsertIgnoreStatement(String table,
List<String> columnNames,
Collection<String> uniqueKeyColumnNames)
Returns an SQL INSERT_IGNORE statement - i.e.
|
String |
getName() |
String |
getSQLForDataType(int sqlType) |
String |
getTableQuoteString() |
int |
getTimesToAddColumnObjectsForUpsert()
Tells How many times the column values need to be inserted into the prepared statement.
|
String |
getUpsertStatement(String table,
List<String> columnNames,
Collection<String> uniqueKeyColumnNames)
Returns an SQL UPSERT statement - i.e.
|
boolean |
supportsCreateTableIfNotExists() |
boolean |
supportsInsertIgnore()
Tells whether this adapter supports INSERT_IGNORE.
|
boolean |
supportsUpsert()
Tells whether this adapter supports UPSERT.
|
String |
unwrapIdentifier(String identifier)
Returns a bare identifier string by removing wrapping escape characters
from identifier strings such as table and column names.
|
getSelectStatement, getSelectStatementclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgenerateTableName, getCreateTableStatement, getTableAliasClausepublic String getName()
getName in interface DatabaseAdaptergetName in class GenericDatabaseAdapterpublic String getDescription()
getDescription in interface DatabaseAdaptergetDescription in class GenericDatabaseAdapterpublic String unwrapIdentifier(String identifier)
DatabaseAdapterReturns a bare identifier string by removing wrapping escape characters from identifier strings such as table and column names.
The default implementation of this method removes double quotes. If the target database engine supports different escape characters, then its DatabaseAdapter implementation should override this method so that such escape characters can be removed properly.
identifier - An identifier which may be wrapped with escape characterspublic boolean supportsUpsert()
DatabaseAdapterpublic boolean supportsInsertIgnore()
DatabaseAdapterpublic int getTimesToAddColumnObjectsForUpsert()
public String getUpsertStatement(String table, List<String> columnNames, Collection<String> uniqueKeyColumnNames)
DatabaseAdapterDatabaseAdapter.supportsUpsert()!table - The name of the table in which to update/insert a record into.columnNames - The name of the columns in the table to add values to.uniqueKeyColumnNames - The name of the columns that form a unique key.public String getInsertIgnoreStatement(String table, List<String> columnNames, Collection<String> uniqueKeyColumnNames)
DatabaseAdapterDatabaseAdapter.supportsInsertIgnore()!table - The name of the table in which to ignore/insert a record into.columnNames - The name of the columns in the table to add values to.uniqueKeyColumnNames - The name of the columns that form a unique key.public String getTableQuoteString()
public String getColumnQuoteString()
public boolean supportsCreateTableIfNotExists()
public List<String> getAlterTableStatements(String tableName, List<ColumnDescription> columnsToAdd, boolean quoteTableName, boolean quoteColumnNames)
public String getSQLForDataType(int sqlType)
Copyright © 2023 Apache NiFi Project. All rights reserved.