public class AggregatedDialect extends JdbcDialect
param: dialects List of dialects.
Constructor and Description |
---|
AggregatedDialect(scala.collection.immutable.List<JdbcDialect> dialects) |
Modifier and Type | Method and Description |
---|---|
boolean |
canHandle(String url)
Check if this dialect instance can handle a certain jdbc url.
|
scala.Option<DataType> |
getCatalystType(int sqlType,
String typeName,
int size,
MetadataBuilder md)
Get the custom datatype mapping for the given jdbc meta information.
|
scala.Option<JdbcType> |
getJDBCType(DataType dt)
Retrieve the jdbc / sql type for a given datatype.
|
String |
getSchemaQuery(String table)
The SQL query that should be used to discover the schema of a table.
|
String |
getTableExistsQuery(String table)
Get the SQL query that should be used to find if the given table exists.
|
String |
getTruncateQuery(String table,
scala.Option<Object> cascade)
The SQL query used to truncate a table.
|
scala.Option<Object> |
isCascadingTruncateTable()
Return Some[true] iff
TRUNCATE TABLE causes cascading default. |
String |
quoteIdentifier(String colName)
Quotes the identifier.
|
alterTable, beforeFetch, classifyException, compileValue, getAddColumnQuery, getDeleteColumnQuery, getRenameColumnQuery, getSchemaCommentQuery, getTableCommentQuery, getTruncateQuery, getUpdateColumnNullabilityQuery, getUpdateColumnTypeQuery, removeSchemaCommentQuery, renameTable
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
$init$, initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, initLock, isTraceEnabled, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning, org$apache$spark$internal$Logging$$log__$eq, org$apache$spark$internal$Logging$$log_, uninitialize
public AggregatedDialect(scala.collection.immutable.List<JdbcDialect> dialects)
public boolean canHandle(String url)
JdbcDialect
canHandle
in class JdbcDialect
url
- the jdbc url.public scala.Option<DataType> getCatalystType(int sqlType, String typeName, int size, MetadataBuilder md)
JdbcDialect
getCatalystType
in class JdbcDialect
sqlType
- The sql type (see java.sql.Types)typeName
- The sql type name (e.g. "BIGINT UNSIGNED")size
- The size of the type.md
- Result metadata associated with this type.DataType
)
or null if the default type mapping should be used.public scala.Option<JdbcType> getJDBCType(DataType dt)
JdbcDialect
getJDBCType
in class JdbcDialect
dt
- The datatype (e.g. StringType
)public String getSchemaQuery(String table)
JdbcDialect
getSchemaQuery
in class JdbcDialect
table
- The name of the table.public String getTableExistsQuery(String table)
JdbcDialect
getTableExistsQuery
in class JdbcDialect
table
- The name of the table.public String getTruncateQuery(String table, scala.Option<Object> cascade)
getTruncateQuery
in class JdbcDialect
table
- The table to truncate.cascade
- Whether or not to cascade the truncation. Default value is the
value of isCascadingTruncateTable()public scala.Option<Object> isCascadingTruncateTable()
JdbcDialect
TRUNCATE TABLE
causes cascading default.
Some[true] : TRUNCATE TABLE causes cascading.
Some[false] : TRUNCATE TABLE does not cause cascading.
None: The behavior of TRUNCATE TABLE is unknown (default).isCascadingTruncateTable
in class JdbcDialect
public String quoteIdentifier(String colName)
JdbcDialect
quoteIdentifier
in class JdbcDialect
colName
- (undocumented)