public class Oracle12DatabaseAdapter extends Object implements DatabaseAdapter
| Constructor and Description |
|---|
Oracle12DatabaseAdapter() |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getAlterTableStatements(String tableName,
List<ColumnDescription> columnsToAdd,
boolean quoteTableName,
boolean quoteColumnNames) |
private String |
getColumnAssignment(String table,
String columnName,
String newTableAlias) |
private List<String> |
getColumnsAssignment(Collection<String> columnsNames,
String newTableAlias,
String table) |
private List<String> |
getConflictColumnsClause(Collection<String> uniqueKeyColumnNames,
List<String> conflictColumns,
String table,
String newTableAlias) |
String |
getDescription() |
String |
getName() |
String |
getSelectStatement(String tableName,
String columnNames,
String whereClause,
String orderByClause,
Long limit,
Long offset)
Returns a SQL SELECT statement with the given clauses applied.
|
String |
getSelectStatement(String tableName,
String columnNames,
String whereClause,
String orderByClause,
Long limit,
Long offset,
String columnForPartitioning)
Returns a SQL SELECT statement with the given clauses applied.
|
String |
getSQLForDataType(int sqlType) |
String |
getTableAliasClause(String tableName) |
String |
getUpsertStatement(String table,
List<String> columnNames,
Collection<String> uniqueKeyColumnNames)
Returns an SQL UPSERT statement - i.e.
|
private String |
normalizeColumnName(String colName) |
boolean |
supportsUpsert()
Tells whether this adapter supports UPSERT.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgenerateTableName, getColumnQuoteString, getCreateTableStatement, getInsertIgnoreStatement, getTableQuoteString, getTimesToAddColumnObjectsForUpsert, supportsCreateTableIfNotExists, supportsInsertIgnore, unwrapIdentifierpublic String getName()
getName in interface DatabaseAdapterpublic String getDescription()
getDescription in interface DatabaseAdapterpublic String getSelectStatement(String tableName, String columnNames, String whereClause, String orderByClause, Long limit, Long offset)
DatabaseAdaptergetSelectStatement in interface DatabaseAdaptertableName - The name of the table to fetch rows fromcolumnNames - The names of the columns to fetch from the tablewhereClause - The filter to apply to the statement. This should not include the WHERE keywordorderByClause - The columns/clause used for ordering the result rows. This should not include the ORDER BY keywordslimit - The value for the LIMIT clause (i.e. the number of rows to return)offset - The value for the OFFSET clause (i.e. the number of rows to skip)public String getSelectStatement(String tableName, String columnNames, String whereClause, String orderByClause, Long limit, Long offset, String columnForPartitioning)
DatabaseAdaptergetSelectStatement in interface DatabaseAdaptertableName - The name of the table to fetch rows fromcolumnNames - The names of the columns to fetch from the tablewhereClause - The filter to apply to the statement. This should not include the WHERE keywordorderByClause - The columns/clause used for ordering the result rows. This should not include the ORDER BY keywordslimit - The value for the LIMIT clause (i.e. the number of rows to return)offset - The value for the OFFSET clause (i.e. the number of rows to skip)columnForPartitioning - The (optional) column name that, if provided, the limit and offset values are based on values from the column itself (rather than the row number)public String getTableAliasClause(String tableName)
getTableAliasClause in interface DatabaseAdapterpublic boolean supportsUpsert()
DatabaseAdaptersupportsUpsert in interface DatabaseAdapterpublic String getUpsertStatement(String table, List<String> columnNames, Collection<String> uniqueKeyColumnNames) throws IllegalArgumentException
DatabaseAdapterDatabaseAdapter.supportsUpsert()!getUpsertStatement in interface DatabaseAdaptertable - 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.IllegalArgumentExceptionprivate List<String> getConflictColumnsClause(Collection<String> uniqueKeyColumnNames, List<String> conflictColumns, String table, String newTableAlias)
private List<String> getColumnsAssignment(Collection<String> columnsNames, String newTableAlias, String table)
private String getColumnAssignment(String table, String columnName, String newTableAlias)
public List<String> getAlterTableStatements(String tableName, List<ColumnDescription> columnsToAdd, boolean quoteTableName, boolean quoteColumnNames)
getAlterTableStatements in interface DatabaseAdapterpublic String getSQLForDataType(int sqlType)
getSQLForDataType in interface DatabaseAdapterCopyright © 2023 Apache NiFi Project. All rights reserved.