public abstract class DriverQuirks
extends Object
Currently, the only thing DriverQuirks does is handle type mapping.
getCatalystType
is used when reading from a JDBC table and getJDBCType
is used when writing to a JDBC table. If getCatalystType
returns null
,
the default type handling is used for the given JDBC type. Similarly,
if getJDBCType
returns (null, None)
, the default type handling is used
for the given Catalyst type.
Constructor and Description |
---|
DriverQuirks() |
Modifier and Type | Method and Description |
---|---|
static DriverQuirks |
get(String url)
Fetch the DriverQuirks class corresponding to a given database url.
|
abstract DataType |
getCatalystType(int sqlType,
String typeName,
int size,
MetadataBuilder md) |
abstract scala.Tuple2<String,scala.Option<Object>> |
getJDBCType(DataType dt) |
public static DriverQuirks get(String url)
public abstract DataType getCatalystType(int sqlType, String typeName, int size, MetadataBuilder md)
public abstract scala.Tuple2<String,scala.Option<Object>> getJDBCType(DataType dt)