public class DialectFactory
extends java.lang.Object
构造器和说明 |
---|
DialectFactory() |
限定符和类型 | 方法和说明 |
---|---|
static Dialect |
generateDialect(java.lang.Class<? extends Dialect> dialectClass)
增加接口方法
//这里为什么不用模板实现 因为有可能找不到class 返回默认类型
|
static Dialect |
generateDialect(java.sql.Connection connection)
james:根据数据库连接生成对应的Dialect
|
static Dialect |
generateDialect(java.sql.Connection conn,
java.lang.String driver)
从驱动+数据连接中获取数据库方言, 顺序为:
1, 从插件提供的驱动方法里找;
2, 没找到就从内置的驱动里找;
3, 没找到就从插件提供的数据连接里找;
4, 没找到就从metadata里找.
|
static Dialect |
getDefaultDialect() |
static Dialect |
getDialectByClass(java.lang.Class<? extends Dialect> dialectClass) |
static Dialect |
getDialectByClassName(java.lang.String name) |
static Dialect |
getDialectByName(java.lang.String getconnectionbyname) |
static void |
registerDialectProvider(DialectProvider provider) |
static Dialect |
try2GenerateDialectByDriver(java.lang.String driver)
根据驱动生成数据库方言
|
public static Dialect getDialectByClass(java.lang.Class<? extends Dialect> dialectClass)
public static Dialect generateDialect(java.lang.Class<? extends Dialect> dialectClass)
dialectClass
- public static Dialect getDialectByClassName(java.lang.String name)
public static void registerDialectProvider(DialectProvider provider)
public static Dialect getDefaultDialect()
public static Dialect generateDialect(java.sql.Connection connection)
connection
- 数据连接public static Dialect getDialectByName(java.lang.String getconnectionbyname)
public static Dialect try2GenerateDialectByDriver(java.lang.String driver)
driver
- 驱动public static Dialect generateDialect(java.sql.Connection conn, java.lang.String driver)
conn
- 数据连接driver
- 驱动