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)
The SQL query that should be 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.
|
beforeFetch, compileValue
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 quoteIdentifier(String colName)
JdbcDialect
quoteIdentifier
in class JdbcDialect
colName
- (undocumented)public String getTableExistsQuery(String table)
JdbcDialect
getTableExistsQuery
in class JdbcDialect
table
- The name of the table.public String getSchemaQuery(String table)
JdbcDialect
getSchemaQuery
in class JdbcDialect
table
- The name of the table.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 getTruncateQuery(String table)
JdbcDialect
getTruncateQuery
in class JdbcDialect
table
- The name of the table.