public abstract class DefaultDriverAdapter extends Object implements DriverAdapter
DriverAdapter.SQL_BUILD_IN_VALUE| 限定符和类型 | 字段和说明 |
|---|---|
protected DatabaseType |
db |
protected DDListener |
ddListener |
String |
delimiterFr |
String |
delimiterTo |
protected DMListener |
dmListener |
protected static org.slf4j.Logger |
log |
protected PrimaryGenerator |
primaryGenerator |
protected Map<Object,DataReader> |
readers |
protected Map<String,ColumnType> |
types |
protected Map<String,String> |
versions |
protected Map<Object,DataWriter> |
writers |
BR, BR_TAB, TAB| 构造器和说明 |
|---|
DefaultDriverAdapter() |
| 限定符和类型 | 方法和说明 |
|---|---|
StringBuilder |
addColumnGuide(DataRuntime runtime,
StringBuilder builder,
Column column)
添加列引导
|
void |
addRunValue(DataRuntime runtime,
Run run,
Compare compare,
Column column,
Object value)
设置参数值,主要根据数据类型格执行式化,如对象,list,map等插入json列
|
String |
alterColumnKeyword(DataRuntime runtime)
修改表的关键字
|
String |
batchInsertSeparator()
批量插入数据时,多行数据之间分隔符
|
protected Boolean |
bool(Map<String,Integer> keys,
String key,
ResultSet set,
Boolean def) |
protected Boolean |
bool(Map<String,Integer> keys,
String key,
ResultSet set,
int def) |
List<Run> |
buildAddRun(DataRuntime runtime,
Column column) |
List<Run> |
buildAddRun(DataRuntime runtime,
Column column,
boolean slice)
添加列
ALTER TABLE HR_USER ADD COLUMN UPT_TIME datetime CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP comment '修改时间' AFTER ID;
|
List<Run> |
buildAddRun(DataRuntime runtime,
Constraint constraint)
添加约束
|
List<Run> |
buildAddRun(DataRuntime runtime,
ForeignKey foreign)
添加外键
|
List<Run> |
buildAddRun(DataRuntime runtime,
Index index)
添加索引
ADD UNIQUE INDEX `A`(`ID`, `REG_TIME`) USING BTREE COMMENT '索引'
|
List<Run> |
buildAddRun(DataRuntime runtime,
PrimaryKey primary)
添加主键
|
List<Run> |
buildAddRun(DataRuntime runtime,
Tag tag)
添加标签
ALTER TABLE HR_USER ADD TAG UPT_TIME datetime CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP comment '修改时间' AFTER ID;
|
List<Run> |
buildAlterRun(DataRuntime runtime,
Column column) |
List<Run> |
buildAlterRun(DataRuntime runtime,
Column column,
boolean slice)
修改列 ALTER TABLE HR_USER CHANGE UPT_TIME UPT_TIME datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP comment '修改时间' AFTER ID;
|
List<Run> |
buildAlterRun(DataRuntime runtime,
Constraint constraint)
修改约束
有可能生成多条SQL
|
List<Run> |
buildAlterRun(DataRuntime runtime,
ForeignKey foreign)
添加外键
|
List<Run> |
buildAlterRun(DataRuntime runtime,
Function function)
修改函数
有可能生成多条SQL
|
List<Run> |
buildAlterRun(DataRuntime runtime,
Index index)
修改索引
有可能生成多条SQL
|
List<Run> |
buildAlterRun(DataRuntime runtime,
MasterTable table)
修改主表
|
List<Run> |
buildAlterRun(DataRuntime runtime,
PartitionTable table)
修改分区表
|
List<Run> |
buildAlterRun(DataRuntime runtime,
PrimaryKey primary)
修改主键
有可能生成多条SQL
|
List<Run> |
buildAlterRun(DataRuntime runtime,
Procedure procedure)
修改存储过程
有可能生成多条SQL
|
List<Run> |
buildAlterRun(DataRuntime runtime,
Table table)
修改表
|
List<Run> |
buildAlterRun(DataRuntime runtime,
Table table,
Collection<Column> columns)
修改列
有可能生成多条SQL,根据数据库类型优先合并成一条执行
|
List<Run> |
buildAlterRun(DataRuntime runtime,
Tag tag)
修改标签 ALTER TABLE HR_USER CHANGE UPT_TIME UPT_TIME datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP comment '修改时间' AFTER ID;
|
List<Run> |
buildAlterRun(DataRuntime runtime,
Trigger trigger)
修改触发器
有可能生成多条SQL
|
List<Run> |
buildAlterRun(DataRuntime runtime,
View view)
修改视图
|
List<Run> |
buildAppendCommentRun(DataRuntime runtime,
Column column)
添加表备注(表创建完成后调用,创建过程能添加备注的不需要实现)
|
List<Run> |
buildAppendCommentRun(DataRuntime runtime,
MasterTable table)
添加表备注(表创建完成后调用,创建过程能添加备注的不需要实现)
|
List<Run> |
buildAppendCommentRun(DataRuntime runtime,
PartitionTable table)
添加表备注(表创建完成后调用,创建过程能添加备注的不需要实现)
|
List<Run> |
buildAppendCommentRun(DataRuntime runtime,
Table table)
添加表备注(表创建完成后调用,创建过程能添加备注的不需要实现)
|
List<Run> |
buildAppendCommentRun(DataRuntime runtime,
View view)
添加视图备注(视图创建完成后调用,创建过程能添加备注的不需要实现)
|
List<Run> |
buildChangeCommentRun(DataRuntime runtime,
Column column)
修改备注
子类实现
一般不直接调用,如果需要由buildAlterRun内部统一调用
|
List<Run> |
buildChangeCommentRun(DataRuntime runtime,
MasterTable table)
修改主表备注
|
List<Run> |
buildChangeCommentRun(DataRuntime runtime,
PartitionTable table)
修改分区表备注
|
List<Run> |
buildChangeCommentRun(DataRuntime runtime,
Table table)
修改备注
|
List<Run> |
buildChangeCommentRun(DataRuntime runtime,
Tag tag)
修改备注
子类实现
一般不直接调用,如果需要由buildAlterRun内部统一调用
|
List<Run> |
buildChangeCommentRun(DataRuntime runtime,
View view)
修改备注
|
List<Run> |
buildChangeDefaultRun(DataRuntime runtime,
Column column)
修改默认值
子类实现
一般不直接调用,如果需要由buildAlterRun内部统一调用
|
List<Run> |
buildChangeDefaultRun(DataRuntime runtime,
Tag tag)
修改默认值
子类实现
一般不直接调用,如果需要由buildAlterRun内部统一调用
|
List<Run> |
buildChangeNullableRun(DataRuntime runtime,
Column column)
修改非空限制
子类实现
一般不直接调用,如果需要由buildAlterRun内部统一调用
|
List<Run> |
buildChangeNullableRun(DataRuntime runtime,
Tag tag)
修改非空限制
子类实现
一般不直接调用,如果需要由buildAlterRun内部统一调用
|
List<Run> |
buildChangeTypeRun(DataRuntime runtime,
Column column)
修改数据类型
子类实现
一般不直接调用,如果需要由buildAlterRun内部统一调用
|
List<Run> |
buildChangeTypeRun(DataRuntime runtime,
Tag tag)
修改数据类型
子类实现
一般不直接调用,如果需要由buildAlterRun内部统一调用
|
List<Run> |
buildCreateRun(DataRuntime runtime,
Function function)
添加函数
|
List<Run> |
buildCreateRun(DataRuntime runtime,
MasterTable table)
创建主表
|
List<Run> |
buildCreateRun(DataRuntime runtime,
PartitionTable table)
创建分区表
|
List<Run> |
buildCreateRun(DataRuntime runtime,
Procedure procedure)
添加存储过程
|
List<Run> |
buildCreateRun(DataRuntime runtime,
Table table)
创建表
|
List<Run> |
buildCreateRun(DataRuntime runtime,
Trigger trigger)
添加触发器
|
List<Run> |
buildCreateRun(DataRuntime runtime,
View view)
创建视图
|
Run |
buildDeleteRun(DataRuntime runtime,
int batch,
String table,
String key,
Object values)
构造 delete 命令
合成 where column in (values) |
Run |
buildDeleteRun(DataRuntime runtime,
String dest,
Object obj,
String... columns)
构造 delete 命令
合成 where k1 = v1 and k2 = v2 |
List<Run> |
buildDropAutoIncrement(DataRuntime runtime,
Column column)
取消自增
|
List<Run> |
buildDropRun(DataRuntime runtime,
Column column) |
List<Run> |
buildDropRun(DataRuntime runtime,
Column column,
boolean slice)
删除列
ALTER TABLE HR_USER DROP COLUMN NAME;
|
List<Run> |
buildDropRun(DataRuntime runtime,
Constraint constraint)
删除约束
|
List<Run> |
buildDropRun(DataRuntime runtime,
ForeignKey foreign)
删除外键
|
List<Run> |
buildDropRun(DataRuntime runtime,
Function function)
删除函数
|
List<Run> |
buildDropRun(DataRuntime runtime,
Index index)
删除索引
|
List<Run> |
buildDropRun(DataRuntime runtime,
MasterTable table)
删除主表
|
List<Run> |
buildDropRun(DataRuntime runtime,
PartitionTable table)
删除分区表
|
List<Run> |
buildDropRun(DataRuntime runtime,
PrimaryKey primary)
删除主键
|
List<Run> |
buildDropRun(DataRuntime runtime,
Procedure procedure)
删除存储过程
|
List<Run> |
buildDropRun(DataRuntime runtime,
Table table)
删除表
|
List<Run> |
buildDropRun(DataRuntime runtime,
Tag tag)
删除标签
ALTER TABLE HR_USER DROP TAG NAME;
|
List<Run> |
buildDropRun(DataRuntime runtime,
Trigger trigger)
删除触发器
|
List<Run> |
buildDropRun(DataRuntime runtime,
View view)
删除视图
|
Run |
buildExecuteRun(DataRuntime runtime,
RunPrepare prepare,
ConfigStore configs,
String... conditions)
创建执行SQL
|
Run |
buildInsertRun(DataRuntime runtime,
int batch,
String dest,
Object obj,
boolean checkPrimary,
List<String> columns)
创建 insert Run
|
List<Run> |
buildQueryColumnRun(DataRuntime runtime,
Table table,
boolean metadata)
查询表上的列
|
List<Run> |
buildQueryConstraintRun(DataRuntime runtime,
Table table,
boolean metadata)
查询表上的约束
|
List<Run> |
buildQueryDatabaseRun(DataRuntime runtime)
查询所有数据库
|
List<Run> |
buildQueryDatabaseRun(DataRuntime runtime,
String name) |
List<Run> |
buildQueryDDLRun(DataRuntime runtime,
Function function)
查询 Function DDL
|
List<Run> |
buildQueryDDLRun(DataRuntime runtime,
MasterTable table)
查询 MasterTable DDL
|
List<Run> |
buildQueryDDLRun(DataRuntime runtime,
PartitionTable table)
查询 PartitionTable DDL
|
List<Run> |
buildQueryDDLRun(DataRuntime runtime,
Procedure procedure)
查询 procedure DDL
|
List<Run> |
buildQueryDDLRun(DataRuntime runtime,
Table table)
查询表DDL
|
List<Run> |
buildQueryDDLRun(DataRuntime runtime,
View view)
查询 view DDL
|
List<Run> |
buildQueryForeignsRun(DataRuntime runtime,
Table table)
查询表上的外键
|
List<Run> |
buildQueryFunctionRun(DataRuntime runtime,
String catalog,
String schema,
String name) |
List<Run> |
buildQueryIndexRun(DataRuntime runtime,
Table table,
String name)
查询表上的索引
|
List<Run> |
buildQueryMasterTableRun(DataRuntime runtime,
String catalog,
String schema,
String pattern,
String types)
查询主表
|
List<Run> |
buildQueryPartitionTableRun(DataRuntime runtime,
MasterTable master,
Map<String,Object> tags) |
List<Run> |
buildQueryPartitionTableRun(DataRuntime runtime,
MasterTable master,
Map<String,Object> tags,
String name)
根据主表查询分区表
|
List<Run> |
buildQueryPartitionTableRun(DataRuntime runtime,
String catalog,
String schema,
String pattern,
String types)
查询分区表
|
List<Run> |
buildQueryPrimaryRun(DataRuntime runtime,
Table table)
查询表上的主键
|
List<Run> |
buildQueryProcedureRun(DataRuntime runtime,
String catalog,
String schema,
String name) |
Run |
buildQueryRun(DataRuntime runtime,
RunPrepare prepare,
ConfigStore configs,
String... conditions)
创建查询SQL
|
List<Run> |
buildQuerySequence(DataRuntime runtime,
boolean next,
String... names)
查询序列cur 或 next value
|
List<Run> |
buildQueryTableCommentRun(DataRuntime runtime,
String catalog,
String schema,
String pattern,
String types)
查询表备注
|
List<Run> |
buildQueryTableRun(DataRuntime runtime,
boolean greedy,
String catalog,
String schema,
String pattern,
String types)
查询表
|
List<Run> |
buildQueryTagRun(DataRuntime runtime,
Table table,
boolean metadata)
查询表上的列
|
List<Run> |
buildQueryTriggerRun(DataRuntime runtime,
Table table,
List<Trigger.EVENT> events)
查询表上的trigger
|
List<Run> |
buildQueryViewRun(DataRuntime runtime,
boolean greedy,
String catalog,
String schema,
String pattern,
String types)
查询表
|
List<Run> |
buildRenameRun(DataRuntime runtime,
Column column)
修改列名
子类实现
一般不直接调用,如果需要由buildAlterRun内部统一调用
|
List<Run> |
buildRenameRun(DataRuntime runtime,
Constraint constraint)
修改约束名
一般不直接调用,如果需要由buildAlterRun内部统一调用
|
List<Run> |
buildRenameRun(DataRuntime runtime,
ForeignKey foreign)
修改外键名
一般不直接调用,如果需要由buildAlterRun内部统一调用
|
List<Run> |
buildRenameRun(DataRuntime runtime,
Function function)
修改函数名
一般不直接调用,如果需要由buildAlterRun内部统一调用
|
List<Run> |
buildRenameRun(DataRuntime runtime,
Index index)
修改索引名
一般不直接调用,如果需要由buildAlterRun内部统一调用
|
List<Run> |
buildRenameRun(DataRuntime runtime,
MasterTable table)
主表重命名
|
List<Run> |
buildRenameRun(DataRuntime runtime,
PartitionTable table)
分区表重命名
|
List<Run> |
buildRenameRun(DataRuntime runtime,
PrimaryKey primary)
修改主键名
一般不直接调用,如果需要由buildAlterRun内部统一调用
|
List<Run> |
buildRenameRun(DataRuntime runtime,
Procedure procedure)
修改存储过程名
一般不直接调用,如果需要由buildAlterRun内部统一调用
|
List<Run> |
buildRenameRun(DataRuntime runtime,
Table table)
修改表名
子类实现
一般不直接调用,如果需要由buildAlterRun内部统一调用
|
List<Run> |
buildRenameRun(DataRuntime runtime,
Tag tag)
修改标签名
子类实现
一般不直接调用,如果需要由buildAlterRun内部统一调用
|
List<Run> |
buildRenameRun(DataRuntime runtime,
Trigger trigger)
修改触发器名
一般不直接调用,如果需要由buildAlterRun内部统一调用
|
List<Run> |
buildRenameRun(DataRuntime runtime,
View view)
修改视图名
子类实现
一般不直接调用,如果需要由buildAlterRun内部统一调用
|
List<Run> |
buildTruncateRun(DataRuntime runtime,
String table)
构造 truncate 命令<
|
Run |
buildUpdateRun(DataRuntime runtime,
int batch,
String dest,
Object obj,
ConfigStore configs,
boolean checkPrimary,
List<String> columns)
update [build]
|
protected Run |
buildUpdateRunFromCollection(DataRuntime runtime,
int batch,
String dest,
Collection list,
ConfigStore configs,
boolean checkPrimary,
List<String> columns) |
protected Run |
buildUpdateRunFromDataRow(DataRuntime runtime,
String dest,
DataRow row,
ConfigStore configs,
boolean checkPrimary,
List<String> columns) |
protected Run |
buildUpdateRunFromEntity(DataRuntime runtime,
String dest,
Object obj,
ConfigStore configs,
boolean checkPrimary,
List<String> columns) |
StringBuilder |
charset(DataRuntime runtime,
StringBuilder builder,
Column column)
编码
|
StringBuilder |
checkColumnExists(DataRuntime runtime,
StringBuilder builder,
boolean exists)
创建或删除列时检测是否存在
|
Boolean |
checkIgnorePrecision(DataRuntime runtime,
String type) |
Boolean |
checkIgnoreScale(DataRuntime runtime,
String type) |
LinkedHashMap<String,Column> |
checkMetadata(DataRuntime runtime,
String table,
LinkedHashMap<String,Column> columns)
过滤掉表结构中不存在的列
|
protected PrimaryGenerator |
checkPrimaryGenerator(DatabaseType type,
String table) |
StringBuilder |
checkTableExists(DataRuntime runtime,
StringBuilder builder,
boolean exists)
创建或删除表时检测表是否存在
|
StringBuilder |
checkTagExists(DataRuntime runtime,
StringBuilder builder,
boolean exists)
创建或删除标签之前 检测表是否存在
IF NOT EXISTS
|
StringBuilder |
checkViewExists(DataRuntime runtime,
StringBuilder builder,
boolean exists)
创建或删除视图时检测视图是否存在
|
Column |
column(DataRuntime runtime,
Column column,
ResultSet rs)
构建Column
|
StringBuilder |
comment(DataRuntime runtime,
StringBuilder builder,
Column column)
备注
子类实现
|
void |
comment(DataRuntime runtime,
StringBuilder builder,
Index index)
索引备注
|
StringBuilder |
comment(DataRuntime runtime,
StringBuilder builder,
Table table)
备注 不支持创建表时带备注的 在子表中忽略
|
StringBuilder |
comment(DataRuntime runtime,
StringBuilder builder,
View view)
备注 不支持创建视图时带备注的 在子视图中忽略
|
<T extends Table> |
comments(DataRuntime runtime,
int index,
boolean create,
String catalog,
String schema,
LinkedHashMap<String,T> tables,
DataSet set)
表备注
|
<T extends Table> |
comments(DataRuntime runtime,
int index,
boolean create,
String catalog,
String schema,
List<T> tables,
DataSet set) |
DatabaseType |
compatible()
对应的兼容模式,有些数据库会兼容oracle或pg,需要分别提供两个JDBCAdapter或者直接依赖oracle/pg的adapter
参考SQLAdapterUtil定位adapter的方法
|
LinkedHashMap<String,Column> |
confirmInsertColumns(DataRuntime runtime,
String dest,
Object obj,
List<String> columns,
boolean batch)
确认需要插入的列
|
protected LinkedHashMap<String,Column> |
confirmUpdateColumns(DataRuntime runtime,
String dest,
DataRow row,
ConfigStore configs,
List<String> columns)
确认需要更新的列
|
<T extends Constraint> |
constraints(DataRuntime runtime,
boolean create,
Table table,
LinkedHashMap<String,T> constraints,
ResultSet set) |
<T extends Constraint> |
constraints(DataRuntime runtime,
int constraint,
boolean create,
Table table,
LinkedHashMap<String,T> constraints,
DataSet set)
根据查询结果集构造Constraint
|
Object |
convert(DataRuntime runtime,
Column metadata,
Object value) |
boolean |
convert(DataRuntime runtime,
Column metadata,
RunValue run)
根据数据库列属性 类型转换(一般是在更新数据库时调用)
子类先解析(有些同名的类型以子类为准)、失败后再到这里解析
|
Object |
convert(DataRuntime runtime,
ColumnType columnType,
Object value) |
boolean |
convert(DataRuntime runtime,
Map<String,Column> columns,
RunValue value)
数据类型转换
|
boolean |
convert(DataRuntime runtime,
String catalog,
String schema,
String table,
RunValue value)
数据类型转换
子类先解析(有些同名的类型以子类为准)、失败后再调用默认转换
|
boolean |
convert(DataRuntime runtime,
Table table,
Run run) |
protected Run |
createInsertRun(DataRuntime runtime,
String dest,
Object obj,
boolean checkPrimary,
List<String> columns)
根据entity创建 INSERT RunPrepare
|
protected Run |
createInsertRunFromCollection(DataRuntime runtime,
int batch,
String dest,
Collection list,
boolean checkPrimary,
List<String> columns)
根据collection创建 INSERT RunPrepare
|
Database |
database(DataRuntime runtime,
int index,
boolean create,
DataSet set) |
LinkedHashMap<String,Database> |
databases(DataRuntime runtime,
int index,
boolean create,
LinkedHashMap<String,Database> databases,
DataSet set)
根据查询结果集构造 Database
|
List<String> |
ddl(DataRuntime runtime,
int index,
Function function,
List<String> ddls,
DataSet set)
查询 function DDL
|
List<String> |
ddl(DataRuntime runtime,
int index,
MasterTable table,
List<String> ddls,
DataSet set)
查询 MasterTable DDL
|
List<String> |
ddl(DataRuntime runtime,
int index,
PartitionTable table,
List<String> ddls,
DataSet set)
查询 PartitionTable DDL
|
List<String> |
ddl(DataRuntime runtime,
int index,
Procedure procedure,
List<String> ddls,
DataSet set)
查询 function DDL
|
List<String> |
ddl(DataRuntime runtime,
int index,
Table table,
List<String> ddls,
DataSet set)
查询表DDL
|
List<String> |
ddl(DataRuntime runtime,
int index,
View view,
List<String> ddls,
DataSet set)
查询 view DDL
|
List<String> |
ddl(DataRuntime runtime,
String random,
Function function) |
List<String> |
ddl(DataRuntime runtime,
String random,
Procedure procedure) |
StringBuilder |
defaultValue(DataRuntime runtime,
StringBuilder builder,
Column column)
默认值
|
StringBuilder |
define(DataRuntime runtime,
StringBuilder builder,
Column column)
定义列
|
StringBuilder |
dropColumnGuide(DataRuntime runtime,
StringBuilder builder,
Column column)
删除列引导
|
void |
each(DataRuntime runtime,
StringBuilder builder,
Trigger trigger) |
void |
fillExecuteContent(DataRuntime runtime,
Run run)
构造查询主体
|
protected void |
fillExecuteContent(DataRuntime runtime,
TableRun run) |
protected void |
fillExecuteContent(DataRuntime runtime,
TextRun run) |
protected void |
fillExecuteContent(DataRuntime runtime,
XMLRun run) |
void |
fillInsertContent(DataRuntime runtime,
Run run,
String dest,
Collection list,
LinkedHashMap<String,Column> columns)
根据Collection创建批量INSERT RunPrepare
|
void |
fillInsertContent(DataRuntime runtime,
Run run,
String dest,
DataSet set,
LinkedHashMap<String,Column> columns)
根据DataSet创建批量INSERT RunPrepare
|
void |
fillQueryContent(DataRuntime runtime,
Run run)
构造查询主体
|
protected void |
fillQueryContent(DataRuntime runtime,
TableRun run) |
protected void |
fillQueryContent(DataRuntime runtime,
TextRun run) |
protected void |
fillQueryContent(DataRuntime runtime,
XMLRun run) |
<T extends ForeignKey> |
foreigns(DataRuntime runtime,
int index,
Table table,
LinkedHashMap<String,T> foreigns,
DataSet set)
根据查询结果集构造PrimaryKey
|
<T extends Function> |
functions(DataRuntime runtime,
int index,
boolean create,
LinkedHashMap<String,T> functions,
DataSet set) |
String |
generatedKey()
自增主键返回标识
|
String |
getDelimiterFr()
界定符(分隔符)
|
String |
getDelimiterTo() |
DMListener |
getListener() |
PrimaryGenerator |
getPrimaryGenerator() |
String |
getPrimaryKey(DataRuntime runtime,
Object obj)
获取单主键列名
|
Object |
getPrimaryValue(DataRuntime runtime,
Object obj)
获取单主键值
|
StringBuilder |
increment(DataRuntime runtime,
StringBuilder builder,
Column column)
递增列
子类实现
|
<T extends Index> |
indexs(DataRuntime runtime,
boolean create,
LinkedHashMap<String,T> indexs,
Table table,
boolean unique,
boolean approximate)
解析JDBC getIndex结果
|
<T extends Index> |
indexs(DataRuntime runtime,
int index,
boolean create,
Table table,
LinkedHashMap<String,T> indexs,
DataSet set)
根据查询结果集构造Index
|
protected Integer |
integer(Map<String,Integer> keys,
String key,
ResultSet set,
Integer def) |
boolean |
isBooleanColumn(DataRuntime runtime,
Column column)
是否是boolean列
|
boolean |
isCharColumn(DataRuntime runtime,
Column column)
是否是字符类型
决定值是否需要加单引号
number boolean 返回false
其他返回true
|
boolean |
isIgnorePrecision(DataRuntime runtime,
Column column) |
boolean |
isIgnoreScale(DataRuntime runtime,
Column column) |
boolean |
isNumberColumn(DataRuntime runtime,
Column column)
是否同数字
|
protected Map<String,Integer> |
keys(ResultSet set)
获取ResultSet中的列
|
String |
mergeFinalExists(DataRuntime runtime,
Run run)
合成最终 exists 命令
|
String |
mergeFinalTotal(DataRuntime runtime,
Run run)
求总数SQL
Run 反转调用
|
<T extends MasterTable> |
mtables(DataRuntime runtime,
boolean create,
LinkedHashMap<String,T> tables,
String catalog,
String schema,
String pattern,
String... types)
根据JDBC
|
<T extends MasterTable> |
mtables(DataRuntime runtime,
int index,
boolean create,
String catalog,
String schema,
LinkedHashMap<String,T> tables,
DataSet set)
从上一步生成的SQL查询结果中 提取表结构
|
StringBuilder |
name(DataRuntime runtime,
StringBuilder builder,
Function function) |
StringBuilder |
name(DataRuntime runtime,
StringBuilder builder,
Procedure procedure) |
StringBuilder |
name(DataRuntime runtime,
StringBuilder builder,
Table table)
构造完整表名
|
StringBuilder |
nullable(DataRuntime runtime,
StringBuilder builder,
Column column)
编码
|
String |
objectName(DataRuntime runtime,
String name)
对象名称格式化(大小写转换),在查询系统表时需要
|
StringBuilder |
onupdate(DataRuntime runtime,
StringBuilder builder,
Column column)
更新行事件
子类实现
|
void |
parameter(DataRuntime runtime,
StringBuilder builder,
Parameter parameter)
生在输入输出参数
|
String |
parseTable(String table) |
StringBuilder |
position(DataRuntime runtime,
StringBuilder builder,
Column column)
位置
子类实现
|
PrimaryKey |
primary(DataRuntime runtime,
int index,
Table table,
DataSet set)
根据查询结果集构造PrimaryKey
|
StringBuilder |
primary(DataRuntime runtime,
StringBuilder builder,
Column column)
主键(注意不要跟表定义中的主键重复)
子类实现
|
StringBuilder |
primary(DataRuntime runtime,
StringBuilder builder,
Table table)
主键
|
<T extends Procedure> |
procedures(DataRuntime runtime,
int index,
boolean create,
LinkedHashMap<String,T> procedures,
DataSet set) |
List<Map<String,Object>> |
process(DataRuntime runtime,
List<Map<String,Object>> list)
JDBC执行完成后的结果处理
|
<T extends PartitionTable> |
ptables(DataRuntime runtime,
boolean create,
LinkedHashMap<String,T> tables,
String catalog,
String schema,
MasterTable master)
根据JDBC
|
<T extends PartitionTable> |
ptables(DataRuntime runtime,
int total,
int index,
boolean create,
MasterTable master,
String catalog,
String schema,
LinkedHashMap<String,T> tables,
DataSet set)
根据查询结果集构造Table
|
protected String |
random(DataRuntime runtime) |
Object |
read(DataRuntime runtime,
Column metadata,
Object value,
Class clazz)
从数据库中读取数据
先由子类根据metadata.typeName(CHAR,INT)定位到具体的数据库类型ColumnType 如果定准成功由CoumnType根据class转换(class可不提供) 如果没有定位到ColumnType再根据className(String,BigDecimal)定位到JavaType 如果定准失败或转换失败(返回null)再由父类转换 如果没有提供metadata和class则根据value.class 常用类型jdbc可以自动转换直接返回就可以(一般子类DataType返回null父类原样返回) 不常用的如json/point/polygon/blob等转换成anyline对应的类型 |
DataReader |
reader(Class clazz) |
DataReader |
reader(ColumnType type) |
void |
setDelimiter(String delimiter) |
void |
setListener(DMListener listener) |
void |
setPrimaryGenerator(PrimaryGenerator primaryGenerator) |
protected void |
setPrimaryValue(Object obj,
Object value)
设置主键值
|
protected String |
string(Map<String,Integer> keys,
String key,
ResultSet set) |
protected String |
string(Map<String,Integer> keys,
String key,
ResultSet set,
String def)
先检测rs中是否包含当前key 如果包含再取值, 取值时按keys中的大小写为准
|
boolean |
supportInsertPlaceholder()
插入数据时是否支持占位符
|
<T extends Table> |
table(List<T> tables,
String catalog,
String schema,
String name) |
<T extends Table> |
tables(DataRuntime runtime,
boolean create,
LinkedHashMap<String,T> tables,
String catalog,
String schema,
String pattern,
String... types)
根据驱动内置方法补充
|
<T extends Table> |
tables(DataRuntime runtime,
boolean create,
List<T> tables,
String catalog,
String schema,
String pattern,
String... types) |
<T extends Table> |
tables(DataRuntime runtime,
int index,
boolean create,
String catalog,
String schema,
LinkedHashMap<String,T> tables,
DataSet set)
根据查询结果集构造Table
|
<T extends Table> |
tables(DataRuntime runtime,
int index,
boolean create,
String catalog,
String schema,
List<T> tables,
DataSet set) |
<T extends Tag> |
tags(DataRuntime runtime,
boolean create,
LinkedHashMap<String,T> tags,
Table table,
String pattern)
解析JDBC get columns结果
|
<T extends Tag> |
tags(DataRuntime runtime,
int index,
boolean create,
Table table,
LinkedHashMap<String,T> tags,
DataSet set)
根据查询结果集构造Tag
|
<T extends Trigger> |
triggers(DataRuntime runtime,
int index,
boolean create,
Table table,
LinkedHashMap<String,T> triggers,
DataSet set)
根据查询结果集构造Constraint
|
StringBuilder |
type(DataRuntime runtime,
StringBuilder builder,
Column column)
数据类型
|
StringBuilder |
type(DataRuntime runtime,
StringBuilder builder,
Column column,
String type,
boolean isIgnorePrecision,
boolean isIgnoreScale)
列数据类型定义
|
ColumnType |
type(String type)
转换成相应数据库类型
|
long |
update(DataRuntime runtime,
String random,
int batch,
String dest,
Object data,
ConfigStore configs,
List<String> columns)
UPDATE [入口]
|
String |
value(DataRuntime runtime,
Column column,
DriverAdapter.SQL_BUILD_IN_VALUE value)
内置函数
|
void |
value(DataRuntime runtime,
StringBuilder builder,
Object obj,
String key)
在不检测数据库结构时才生效,否则会被convert代替
生成value格式 主要确定是否需要单引号 或 类型转换
有些数据库不提供默认的 隐式转换 需要显示的把String转换成相应的数据类型
如 TO_DATE('')
|
protected Object |
value(Map<String,Integer> keys,
String key,
ResultSet set) |
protected Object |
value(Map<String,Integer> keys,
String key,
ResultSet set,
Object def) |
String |
version() |
<T extends View> |
views(DataRuntime runtime,
boolean create,
LinkedHashMap<String,T> views,
String catalog,
String schema,
String pattern,
String... types)
根据JDBC补充
|
<T extends View> |
views(DataRuntime runtime,
int index,
boolean create,
String catalog,
String schema,
LinkedHashMap<String,T> views,
DataSet set)
根据查询结果集构造View
|
Object |
write(DataRuntime runtime,
Column metadata,
Object value,
boolean placeholder)
写入数据库前类型转换
|
DataWriter |
writer(Object support)
根据java数据类型定位数据库数据类型
在不开启自动检测数据类型时会调用
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuildAddRun, buildAddRun, buildAddRun, buildAddRun, buildAddRun, buildAddRun, buildAddRun, buildAlterRun, buildAlterRun, buildAlterRun, buildAlterRun, buildAlterRun, buildAlterRun, buildAlterRun, buildAlterRun, buildAlterRun, buildAlterRun, buildAlterRun, buildAlterRun, buildAlterRun, buildAlterRun, buildAlterRun, buildAppendCommentRun, buildAppendCommentRun, buildAppendCommentRun, buildAppendCommentRun, buildAppendCommentRun, buildChangeCommentRun, buildChangeCommentRun, buildChangeCommentRun, buildChangeCommentRun, buildChangeCommentRun, buildChangeCommentRun, buildChangeDefaultRun, buildChangeDefaultRun, buildChangeNullableRun, buildChangeNullableRun, buildChangeTypeRun, buildChangeTypeRun, buildCreateRun, buildCreateRun, buildCreateRun, buildCreateRun, buildCreateRun, buildCreateRun, buildCreateRun, buildDeleteRunFromEntity, buildDeleteRunFromTable, buildDropAutoIncrement, buildDropRun, buildDropRun, buildDropRun, buildDropRun, buildDropRun, buildDropRun, buildDropRun, buildDropRun, buildDropRun, buildDropRun, buildDropRun, buildDropRun, buildDropRun, buildDropRun, buildInsertRun, buildInsertRun, buildInsertRun, buildInsertRun, buildInsertRun, buildInsertRun, buildInsertRun, buildInsertRun, buildInsertRun, buildInsertRun, buildInsertRun, buildQueryConstraintRun, buildQueryDatabaseRun, buildQueryDDLRun, buildQueryDDLRun, buildQueryDDLRun, buildQueryDDLRun, buildQueryDDLRun, buildQueryDDLRun, buildQueryForeignsRun, buildQueryFunctionRun, buildQueryIndexRun, buildQueryMasterTableRun, buildQueryPartitionTableRun, buildQueryPartitionTableRun, buildQueryPartitionTableRun, buildQueryPrimaryRun, buildQueryProcedureRun, buildQueryTableCommentRun, buildQueryTableRun, buildQueryTagRun, buildQueryTriggerRun, buildQueryViewRun, buildRenameRun, buildRenameRun, buildRenameRun, buildRenameRun, buildRenameRun, buildRenameRun, buildRenameRun, buildRenameRun, buildRenameRun, buildRenameRun, buildRenameRun, buildRenameRun, buildRenameRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRun, buildUpdateRunFromCollection, buildUpdateRunFromDataRow, buildUpdateRunFromEntity, checkSchema, checkSchema, checkSchema, column, columns, columns, columns, columns, concat, count, count, createConditionFindInSet, createConditionIn, createConditionLike, database, databases, ddl, ddl, ddl, ddl, delete, delete, delete, deletes, deletes, deletes, deletes, execute, execute, execute, execute, exists, fillDeleteRunContent, foreigns, functions, indexs, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, map, maps, maps, mergeFinalQuery, mtables, primary, procedures, ptables, querys, querys, save, save, save, save, save, save, save, save, save, save, save, save, save, save, save, save, select, selects, sequence, tables, tables, tags, triggers, truncate, type, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, update, viewsprotected static final org.slf4j.Logger log
@Autowired(required=false) protected DMListener dmListener
@Autowired(required=false) protected DDListener ddListener
protected DatabaseType db
public String delimiterFr
public String delimiterTo
protected Map<String,ColumnType> types
protected Map<Object,DataReader> readers
protected Map<Object,DataWriter> writers
@Autowired(required=false) protected PrimaryGenerator primaryGenerator
public DMListener getListener()
@Autowired(required=false) public void setListener(DMListener listener)
public String version()
version 在接口中 DriverAdapterpublic DatabaseType compatible()
DriverAdaptercompatible 在接口中 DriverAdapterpublic String getDelimiterFr()
DriverAdaptergetDelimiterFr 在接口中 DriverAdapterpublic String getDelimiterTo()
getDelimiterTo 在接口中 DriverAdapterprotected PrimaryGenerator checkPrimaryGenerator(DatabaseType type, String table)
public void setDelimiter(String delimiter)
public ColumnType type(String type)
type 在接口中 DriverAdaptertype - typepublic DataReader reader(Class clazz)
reader 在接口中 DriverAdapterpublic DataReader reader(ColumnType type)
reader 在接口中 DriverAdapterpublic DataWriter writer(Object support)
DriverAdapterwriter 在接口中 DriverAdaptersupport - class或ColumnTypepublic Run buildInsertRun(DataRuntime runtime, int batch, String dest, Object obj, boolean checkPrimary, List<String> columns)
buildInsertRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端dest - 表obj - 实体checkPrimary - 是否需要检查重复主键,默认不检查columns - 需要抛入的列 如果不指定 则根据实体属性解析public void fillInsertContent(DataRuntime runtime, Run run, String dest, DataSet set, LinkedHashMap<String,Column> columns)
fillInsertContent 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端run - 最终待执行的命令和参数(如果是JDBC环境就是SQL)dest - 表 如果不指定则根据set解析set - 集合columns - 需插入的列public void fillInsertContent(DataRuntime runtime, Run run, String dest, Collection list, LinkedHashMap<String,Column> columns)
fillInsertContent 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端run - 最终待执行的命令和参数(如果是JDBC环境就是SQL)dest - 表 如果不指定则根据set解析list - 集合columns - 需插入的列public LinkedHashMap<String,Column> confirmInsertColumns(DataRuntime runtime, String dest, Object obj, List<String> columns, boolean batch)
confirmInsertColumns 在接口中 DriverAdapterobj - Entity或DataRowbatch - 是否批量,批量时不检测值是否为空columns - 提供额外的判断依据runtime - 运行环境主要包含驱动适配器 数据源或客户端public String batchInsertSeparator()
batchInsertSeparator 在接口中 DriverAdapterpublic boolean supportInsertPlaceholder()
supportInsertPlaceholder 在接口中 DriverAdapterprotected void setPrimaryValue(Object obj, Object value)
obj - objvalue - valueprotected Run createInsertRun(DataRuntime runtime, String dest, Object obj, boolean checkPrimary, List<String> columns)
runtime - 运行环境主要包含驱动适配器 数据源或客户端dest - 表obj - 数据checkPrimary - 是否需要检查重复主键,默认不检查columns - 列protected Run createInsertRunFromCollection(DataRuntime runtime, int batch, String dest, Collection list, boolean checkPrimary, List<String> columns)
runtime - 运行环境主要包含驱动适配器 数据源或客户端dest - 表list - 对象集合checkPrimary - 是否需要检查重复主键,默认不检查columns - 需要插入的列,如果不指定则全部插入public String generatedKey()
DriverAdaptergeneratedKey 在接口中 DriverAdapterpublic Run buildUpdateRun(DataRuntime runtime, int batch, String dest, Object obj, ConfigStore configs, boolean checkPrimary, List<String> columns)
DriverAdapterbuildUpdateRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端dest - 表obj - Entity或DtaRowconfigs - 更新条件checkPrimary - 是否需要检查重复主键,默认不检查columns - 需要更新的列protected Run buildUpdateRunFromEntity(DataRuntime runtime, String dest, Object obj, ConfigStore configs, boolean checkPrimary, List<String> columns)
protected Run buildUpdateRunFromDataRow(DataRuntime runtime, String dest, DataRow row, ConfigStore configs, boolean checkPrimary, List<String> columns)
protected Run buildUpdateRunFromCollection(DataRuntime runtime, int batch, String dest, Collection list, ConfigStore configs, boolean checkPrimary, List<String> columns)
public LinkedHashMap<String,Column> checkMetadata(DataRuntime runtime, String table, LinkedHashMap<String,Column> columns)
table - 表columns - columnsprotected LinkedHashMap<String,Column> confirmUpdateColumns(DataRuntime runtime, String dest, DataRow row, ConfigStore configs, List<String> columns)
row - DataRowconfigs - 更新条件columns - 提供额外的判断依据
列可以加前缀
+:表示必须插入
-:表示必须不插入
?:根据是否有值
先DataRow解析出必须更新的列与colums中必须更新的列合并
再从DataRow中解析出必须忽略的列与columns中必须忽略更新的列合并
DataRow.put时可以设置 必须更新(插入)或必须忽略更新(插入) put("+KEY", "VALUE") put("-KEY", "VALUE")
如果提供了columns并且长度>0则不遍历row.keys
如果没有提供columns 但row.keys中有必须更新的列 也不再遍历row.keys
其他情况需要遍历row.keys
以上执行完后,如果开启了ConfigTable.IS_AUTO_CHECK_METADATA=true
则把执行结果与表结构对比,删除表中没有的列public long update(DataRuntime runtime, String random, int batch, String dest, Object data, ConfigStore configs, List<String> columns)
update 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端random - 用来标记同一组命令dest - 表data - 数据configs - 条件columns - 列public Run buildQueryRun(DataRuntime runtime, RunPrepare prepare, ConfigStore configs, String... conditions)
buildQueryRun 在接口中 DriverAdapterprepare - 构建最终执行命令的全部参数,包含表(或视图|函数|自定义SQL)查询条件 排序 分页等configs - 过滤条件及相关配置conditions - 简单过滤条件runtime - 运行环境主要包含驱动适配器 数据源或客户端public void fillQueryContent(DataRuntime runtime, Run run)
fillQueryContent 在接口中 DriverAdapterrun - 最终待执行的命令和参数(如果是JDBC环境就是SQL)protected void fillQueryContent(DataRuntime runtime, XMLRun run)
protected void fillQueryContent(DataRuntime runtime, TextRun run)
protected void fillQueryContent(DataRuntime runtime, TableRun run)
public List<Run> buildQuerySequence(DataRuntime runtime, boolean next, String... names)
buildQuerySequence 在接口中 DriverAdapternext - 是否生成返回下一个序列 false:cur true:nextnames - 序列名runtime - 运行环境主要包含驱动适配器 数据源或客户端public void fillExecuteContent(DataRuntime runtime, Run run)
fillExecuteContent 在接口中 DriverAdapterrun - 最终待执行的命令和参数(如果是JDBC环境就是SQL)runtime - 运行环境主要包含驱动适配器 数据源或客户端protected void fillExecuteContent(DataRuntime runtime, XMLRun run)
protected void fillExecuteContent(DataRuntime runtime, TextRun run)
protected void fillExecuteContent(DataRuntime runtime, TableRun run)
public List<Map<String,Object>> process(DataRuntime runtime, List<Map<String,Object>> list)
process 在接口中 DriverAdapterlist - JDBC执行返回的结果集runtime - 运行环境主要包含驱动适配器 数据源或客户端public Run buildExecuteRun(DataRuntime runtime, RunPrepare prepare, ConfigStore configs, String... conditions)
DriverAdapterbuildExecuteRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端prepare - 构建最终执行命令的全部参数,包含表(或视图|函数|自定义SQL)查询条件 排序 分页等configs - 查询条件及相关设置conditions - 简单过滤条件public String mergeFinalExists(DataRuntime runtime, Run run)
DriverAdaptermergeFinalExists 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端run - 最终待执行的命令和参数(如果是JDBC环境就是SQL)public String mergeFinalTotal(DataRuntime runtime, Run run)
mergeFinalTotal 在接口中 DriverAdapterrun - runruntime - 运行环境主要包含驱动适配器 数据源或客户端public Run buildDeleteRun(DataRuntime runtime, int batch, String table, String key, Object values)
DriverAdapterbuildDeleteRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端table - 表key - 列values - valuespublic Run buildDeleteRun(DataRuntime runtime, String dest, Object obj, String... columns)
DriverAdapterbuildDeleteRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端dest - 表 如果为空 可以根据obj解析obj - entity或DataRowcolumns - 删除条件的列或属性,根据columns取obj值并合成删除条件public List<Run> buildTruncateRun(DataRuntime runtime, String table)
DriverAdapterbuildTruncateRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端table - 表public List<Run> buildQueryDatabaseRun(DataRuntime runtime) throws Exception
DriverAdapterbuildQueryDatabaseRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端Exception - 异常public List<Run> buildQueryDatabaseRun(DataRuntime runtime, String name) throws Exception
buildQueryDatabaseRun 在接口中 DriverAdapterExceptionpublic LinkedHashMap<String,Database> databases(DataRuntime runtime, int index, boolean create, LinkedHashMap<String,Database> databases, DataSet set) throws Exception
DriverAdapterdatabases 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端index - 第几条SQL 对照 buildQueryDatabaseRun 返回顺序create - 上一步没有查到的,这一步是否需要新创建databases - 上一步查询结果set - setException - 异常public Database database(DataRuntime runtime, int index, boolean create, DataSet set) throws Exception
database 在接口中 DriverAdapterExceptionpublic List<Run> buildQueryTableRun(DataRuntime runtime, boolean greedy, String catalog, String schema, String pattern, String types) throws Exception
buildQueryTableRun 在接口中 DriverAdaptercatalog - catalogschema - schemapattern - patterntypes - typesruntime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildQueryTableCommentRun(DataRuntime runtime, String catalog, String schema, String pattern, String types) throws Exception
buildQueryTableCommentRun 在接口中 DriverAdaptercatalog - catalogschema - schemapattern - patterntypes - types "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic <T extends Table> LinkedHashMap<String,T> tables(DataRuntime runtime, int index, boolean create, String catalog, String schema, LinkedHashMap<String,T> tables, DataSet set) throws Exception
DriverAdaptertables 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端index - 第几条SQL 对照buildQueryTableRun返回顺序create - 上一步没有查到的,这一步是否需要新创建catalog - catalogschema - schematables - 上一步查询结果set - setException - 异常public <T extends Table> List<T> tables(DataRuntime runtime, int index, boolean create, String catalog, String schema, List<T> tables, DataSet set) throws Exception
tables 在接口中 DriverAdapterExceptionpublic <T extends Table> LinkedHashMap<String,T> tables(DataRuntime runtime, boolean create, LinkedHashMap<String,T> tables, String catalog, String schema, String pattern, String... types) throws Exception
tables 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端create - 上一步没有查到的,这一步是否需要新创建tables - 上一步查询结果catalog - catalogschema - schemapattern - patterntypes - types "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".Exception - 异常public <T extends Table> List<T> tables(DataRuntime runtime, boolean create, List<T> tables, String catalog, String schema, String pattern, String... types) throws Exception
tables 在接口中 DriverAdapterExceptionpublic <T extends Table> LinkedHashMap<String,T> comments(DataRuntime runtime, int index, boolean create, String catalog, String schema, LinkedHashMap<String,T> tables, DataSet set) throws Exception
comments 在接口中 DriverAdapterindex - 第几条SQL 对照buildQueryTableRun返回顺序create - 上一步没有查到的,这一步是否需要新创建catalog - catalogschema - schematables - 上一步查询结果set - setruntime - 运行环境主要包含驱动适配器 数据源或客户端Exception - 异常public <T extends Table> List<T> comments(DataRuntime runtime, int index, boolean create, String catalog, String schema, List<T> tables, DataSet set) throws Exception
Exceptionpublic List<Run> buildQueryDDLRun(DataRuntime runtime, Table table) throws Exception
buildQueryDDLRun 在接口中 DriverAdaptertable - 表runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<String> ddl(DataRuntime runtime, int index, Table table, List<String> ddls, DataSet set)
ddl 在接口中 DriverAdapterindex - 第几条SQL 对照 buildQueryDDLRun 返回顺序table - 表ddls - 上一步查询结果set - sql执行的结果集runtime - 运行环境主要包含驱动适配器 数据源或客户端public List<Run> buildQueryViewRun(DataRuntime runtime, boolean greedy, String catalog, String schema, String pattern, String types) throws Exception
buildQueryViewRun 在接口中 DriverAdaptercatalog - catalogschema - schemapattern - patterntypes - typesruntime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic <T extends View> LinkedHashMap<String,T> views(DataRuntime runtime, int index, boolean create, String catalog, String schema, LinkedHashMap<String,T> views, DataSet set) throws Exception
DriverAdapterviews 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端index - 第几条SQL 对照buildQueryViewRun返回顺序create - 上一步没有查到的,这一步是否需要新创建catalog - catalogschema - schemaviews - 上一步查询结果set - setException - 异常public <T extends View> LinkedHashMap<String,T> views(DataRuntime runtime, boolean create, LinkedHashMap<String,T> views, String catalog, String schema, String pattern, String... types) throws Exception
DriverAdapterviews 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端create - 上一步没有查到的,这一步是否需要新创建views - 上一步查询结果catalog - catalogschema - schemapattern - patterntypes - types "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".Exception - 异常public List<Run> buildQueryDDLRun(DataRuntime runtime, View view) throws Exception
buildQueryDDLRun 在接口中 DriverAdapterview - viewruntime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<String> ddl(DataRuntime runtime, int index, View view, List<String> ddls, DataSet set)
ddl 在接口中 DriverAdapterindex - 第几条SQL 对照 buildQueryDDLRun 返回顺序view - viewddls - 上一步查询结果set - sql执行的结果集runtime - 运行环境主要包含驱动适配器 数据源或客户端public List<Run> buildQueryMasterTableRun(DataRuntime runtime, String catalog, String schema, String pattern, String types) throws Exception
buildQueryMasterTableRun 在接口中 DriverAdaptercatalog - catalogschema - schemapattern - patterntypes - typesruntime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic <T extends MasterTable> LinkedHashMap<String,T> mtables(DataRuntime runtime, boolean create, LinkedHashMap<String,T> tables, String catalog, String schema, String pattern, String... types) throws Exception
DriverAdaptermtables 在接口中 DriverAdaptercreate - 上一步没有查到的,这一步是否需要新创建tables - 上一步查询结果runtime - 运行环境主要包含驱动适配器 数据源或客户端catalog - catalogschema - schemapattern - patterntypes - typesExceptionpublic <T extends MasterTable> LinkedHashMap<String,T> mtables(DataRuntime runtime, int index, boolean create, String catalog, String schema, LinkedHashMap<String,T> tables, DataSet set) throws Exception
mtables 在接口中 DriverAdapterindex - 第几条SQLcreate - 上一步没有查到的,这一步是否需要新创建catalog - catalogschema - schematables - 上一步查询结果set - setruntime - 运行环境主要包含驱动适配器 数据源或客户端Exception - 异常public List<Run> buildQueryDDLRun(DataRuntime runtime, MasterTable table) throws Exception
buildQueryDDLRun 在接口中 DriverAdaptertable - MasterTableruntime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<String> ddl(DataRuntime runtime, int index, MasterTable table, List<String> ddls, DataSet set)
ddl 在接口中 DriverAdapterindex - 第几条SQL 对照 buildQueryDDLRun 返回顺序table - MasterTableddls - 上一步查询结果set - sql执行的结果集runtime - 运行环境主要包含驱动适配器 数据源或客户端public List<Run> buildQueryPartitionTableRun(DataRuntime runtime, String catalog, String schema, String pattern, String types) throws Exception
buildQueryPartitionTableRun 在接口中 DriverAdaptercatalog - catalogschema - schemapattern - patterntypes - typesruntime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildQueryPartitionTableRun(DataRuntime runtime, MasterTable master, Map<String,Object> tags) throws Exception
buildQueryPartitionTableRun 在接口中 DriverAdapterExceptionpublic List<Run> buildQueryPartitionTableRun(DataRuntime runtime, MasterTable master, Map<String,Object> tags, String name) throws Exception
DriverAdapterbuildQueryPartitionTableRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端master - 主表tags - 标签名+标签值name - 分区表名Exception - 异常public <T extends PartitionTable> LinkedHashMap<String,T> ptables(DataRuntime runtime, int total, int index, boolean create, MasterTable master, String catalog, String schema, LinkedHashMap<String,T> tables, DataSet set) throws Exception
ptables 在接口中 DriverAdaptertotal - 合计SQL数量index - 第几条SQL 对照 buildQueryMasterTableRun返回顺序create - 上一步没有查到的,这一步是否需要新创建master - 主表catalog - catalogschema - schematables - 上一步查询结果set - setruntime - 运行环境主要包含驱动适配器 数据源或客户端Exception - 异常public <T extends PartitionTable> LinkedHashMap<String,T> ptables(DataRuntime runtime, boolean create, LinkedHashMap<String,T> tables, String catalog, String schema, MasterTable master) throws Exception
DriverAdapterptables 在接口中 DriverAdaptercreate - 上一步没有查到的,这一步是否需要新创建tables - 上一步查询结果runtime - 运行环境主要包含驱动适配器 数据源或客户端catalog - catalogschema - schemamaster - 主表Exceptionpublic List<Run> buildQueryDDLRun(DataRuntime runtime, PartitionTable table) throws Exception
buildQueryDDLRun 在接口中 DriverAdaptertable - PartitionTableruntime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<String> ddl(DataRuntime runtime, int index, PartitionTable table, List<String> ddls, DataSet set)
ddl 在接口中 DriverAdapterindex - 第几条SQL 对照 buildQueryDDLRun 返回顺序table - PartitionTableddls - 上一步查询结果set - sql执行的结果集runtime - 运行环境主要包含驱动适配器 数据源或客户端public List<Run> buildQueryColumnRun(DataRuntime runtime, Table table, boolean metadata) throws Exception
buildQueryColumnRun 在接口中 DriverAdaptertable - 表metadata - 是否根据metadata(true:1=0,false:查询系统表)runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic Column column(DataRuntime runtime, Column column, ResultSet rs)
column 在接口中 DriverAdaptercolumn - 列rs - ResultSetprotected Map<String,Integer> keys(ResultSet set) throws Exception
set - ResultSetException - 异常 Exceptionpublic List<Run> buildQueryTagRun(DataRuntime runtime, Table table, boolean metadata) throws Exception
DriverAdapterbuildQueryTagRun 在接口中 DriverAdaptertable - 表metadata - 是否根据metadata | 查询系统表runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic <T extends Tag> LinkedHashMap<String,T> tags(DataRuntime runtime, int index, boolean create, Table table, LinkedHashMap<String,T> tags, DataSet set) throws Exception
tags 在接口中 DriverAdapterindex - 第几条查询SQL 对照 buildQueryTagRun返回顺序create - 上一步没有查到的,这一步是否需要新创建table - 表tags - 上一步查询结果set - setruntime - 运行环境主要包含驱动适配器 数据源或客户端Exception - 异常public <T extends Tag> LinkedHashMap<String,T> tags(DataRuntime runtime, boolean create, LinkedHashMap<String,T> tags, Table table, String pattern) throws Exception
DriverAdaptertags 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端create - 上一步没有查到的,这一步是否需要新创建tags - 上一步查询结果table - 表pattern - patternException - 异常public List<Run> buildQueryPrimaryRun(DataRuntime runtime, Table table) throws Exception
buildQueryPrimaryRun 在接口中 DriverAdaptertable - 表runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic PrimaryKey primary(DataRuntime runtime, int index, Table table, DataSet set) throws Exception
primary 在接口中 DriverAdapterindex - 第几条查询SQL 对照 buildQueryIndexRun 返回顺序table - 表set - sql查询结果runtime - 运行环境主要包含驱动适配器 数据源或客户端Exception - 异常public List<Run> buildQueryForeignsRun(DataRuntime runtime, Table table) throws Exception
buildQueryForeignsRun 在接口中 DriverAdaptertable - 表runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic <T extends ForeignKey> LinkedHashMap<String,T> foreigns(DataRuntime runtime, int index, Table table, LinkedHashMap<String,T> foreigns, DataSet set) throws Exception
foreigns 在接口中 DriverAdapterindex - 第几条查询SQL 对照 buildQueryForeignsRun 返回顺序table - 表foreigns - 上一步查询结果set - sql查询结果runtime - 运行环境主要包含驱动适配器 数据源或客户端Exception - 异常public List<Run> buildQueryIndexRun(DataRuntime runtime, Table table, String name)
buildQueryIndexRun 在接口中 DriverAdaptertable - 表name - 名称runtime - 运行环境主要包含驱动适配器 数据源或客户端public <T extends Index> LinkedHashMap<String,T> indexs(DataRuntime runtime, int index, boolean create, Table table, LinkedHashMap<String,T> indexs, DataSet set) throws Exception
DriverAdapterindexs 在接口中 DriverAdapterindex - 第几条查询SQL 对照 buildQueryIndexRun 返回顺序create - 上一步没有查到的,这一步是否需要新创建table - 表indexs - 上一步查询结果set - setruntime - 运行环境主要包含驱动适配器 数据源或客户端Exception - 异常public <T extends Index> LinkedHashMap<String,T> indexs(DataRuntime runtime, boolean create, LinkedHashMap<String,T> indexs, Table table, boolean unique, boolean approximate) throws Exception
DriverAdapterindexs 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端create - 上一步没有查到的,这一步是否需要新创建table - 表Exception - 异常public List<Run> buildQueryConstraintRun(DataRuntime runtime, Table table, boolean metadata) throws Exception
buildQueryConstraintRun 在接口中 DriverAdaptertable - 表metadata - 是否需要根据metadataruntime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic <T extends Constraint> LinkedHashMap<String,T> constraints(DataRuntime runtime, int constraint, boolean create, Table table, LinkedHashMap<String,T> constraints, DataSet set) throws Exception
constraints 在接口中 DriverAdapterconstraint - 第几条查询SQL 对照 buildQueryConstraintRun 返回顺序create - 上一步没有查到的,这一步是否需要新创建table - 表constraints - 上一步查询结果set - setruntime - 运行环境主要包含驱动适配器 数据源或客户端Exception - 异常public <T extends Constraint> LinkedHashMap<String,T> constraints(DataRuntime runtime, boolean create, Table table, LinkedHashMap<String,T> constraints, ResultSet set) throws Exception
constraints 在接口中 DriverAdapterExceptionpublic List<Run> buildQueryTriggerRun(DataRuntime runtime, Table table, List<Trigger.EVENT> events)
buildQueryTriggerRun 在接口中 DriverAdaptertable - 表events - INSERT|UPATE|DELETEruntime - 运行环境主要包含驱动适配器 数据源或客户端public <T extends Trigger> LinkedHashMap<String,T> triggers(DataRuntime runtime, int index, boolean create, Table table, LinkedHashMap<String,T> triggers, DataSet set) throws Exception
triggers 在接口中 DriverAdapterindex - 第几条查询SQL 对照 buildQueryConstraintRun 返回顺序create - 上一步没有查到的,这一步是否需要新创建table - 表triggers - 上一步查询结果set - DataSetruntime - 运行环境主要包含驱动适配器 数据源或客户端Exception - 异常public List<Run> buildQueryProcedureRun(DataRuntime runtime, String catalog, String schema, String name)
buildQueryProcedureRun 在接口中 DriverAdapterpublic <T extends Procedure> LinkedHashMap<String,T> procedures(DataRuntime runtime, int index, boolean create, LinkedHashMap<String,T> procedures, DataSet set) throws Exception
procedures 在接口中 DriverAdapterExceptionpublic List<String> ddl(DataRuntime runtime, String random, Procedure procedure)
ddl 在接口中 DriverAdapterpublic List<Run> buildQueryDDLRun(DataRuntime runtime, Procedure procedure) throws Exception
buildQueryDDLRun 在接口中 DriverAdapterprocedure - procedureruntime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<String> ddl(DataRuntime runtime, int index, Procedure procedure, List<String> ddls, DataSet set)
ddl 在接口中 DriverAdapterindex - 第几条SQL 对照 buildQueryDDLRun 返回顺序procedure - procedureddls - 上一步查询结果set - sql执行的结果集runtime - 运行环境主要包含驱动适配器 数据源或客户端public List<Run> buildQueryFunctionRun(DataRuntime runtime, String catalog, String schema, String name)
buildQueryFunctionRun 在接口中 DriverAdapterpublic <T extends Function> LinkedHashMap<String,T> functions(DataRuntime runtime, int index, boolean create, LinkedHashMap<String,T> functions, DataSet set) throws Exception
functions 在接口中 DriverAdapterExceptionpublic List<String> ddl(DataRuntime runtime, String random, Function function)
ddl 在接口中 DriverAdapterpublic List<Run> buildQueryDDLRun(DataRuntime runtime, Function function) throws Exception
buildQueryDDLRun 在接口中 DriverAdapterfunction - Functionruntime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<String> ddl(DataRuntime runtime, int index, Function function, List<String> ddls, DataSet set)
ddl 在接口中 DriverAdapterindex - 第几条SQL 对照 buildQueryDDLRun 返回顺序runtime - 运行环境主要包含驱动适配器 数据源或客户端ddls - 上一步查询结果set - sql执行的结果集function - Functionpublic List<Run> buildCreateRun(DataRuntime runtime, Table table) throws Exception
DriverAdapterbuildCreateRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端table - 表Exception - 异常public List<Run> buildAppendCommentRun(DataRuntime runtime, Table table) throws Exception
DriverAdapterbuildAppendCommentRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端table - 表Exception - 异常public List<Run> buildAlterRun(DataRuntime runtime, Table table) throws Exception
DriverAdapterbuildAlterRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端table - 表Exception - 异常public List<Run> buildAlterRun(DataRuntime runtime, Table table, Collection<Column> columns) throws Exception
buildAlterRun 在接口中 DriverAdaptertable - 表columns - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildRenameRun(DataRuntime runtime, Table table) throws Exception
buildRenameRun 在接口中 DriverAdaptertable - 表runtime - 运行环境主要包含驱动适配器 数据源或客户端Exception - 异常public List<Run> buildChangeCommentRun(DataRuntime runtime, Table table) throws Exception
DriverAdapterbuildChangeCommentRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端table - 表Exception - 异常public List<Run> buildDropRun(DataRuntime runtime, Table table) throws Exception
buildDropRun 在接口中 DriverAdaptertable - 表runtime - 运行环境主要包含驱动适配器 数据源或客户端Exception - 异常public StringBuilder checkTableExists(DataRuntime runtime, StringBuilder builder, boolean exists)
checkTableExists 在接口中 DriverAdapterbuilder - builderexists - existsruntime - 运行环境主要包含驱动适配器 数据源或客户端public StringBuilder primary(DataRuntime runtime, StringBuilder builder, Table table)
primary 在接口中 DriverAdapterbuilder - buildertable - 表runtime - 运行环境主要包含驱动适配器 数据源或客户端public StringBuilder comment(DataRuntime runtime, StringBuilder builder, Table table)
comment 在接口中 DriverAdapterbuilder - buildertable - 表runtime - 运行环境主要包含驱动适配器 数据源或客户端public StringBuilder name(DataRuntime runtime, StringBuilder builder, Table table)
name 在接口中 DriverAdapterbuilder - buildertable - 表runtime - 运行环境主要包含驱动适配器 数据源或客户端public StringBuilder name(DataRuntime runtime, StringBuilder builder, Procedure procedure)
name 在接口中 DriverAdapterpublic StringBuilder name(DataRuntime runtime, StringBuilder builder, Function function)
name 在接口中 DriverAdapterpublic List<Run> buildCreateRun(DataRuntime runtime, View view) throws Exception
DriverAdapterbuildCreateRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端view - 视图Exception - 异常public List<Run> buildAppendCommentRun(DataRuntime runtime, View view) throws Exception
DriverAdapterbuildAppendCommentRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端view - 视图Exception - 异常public List<Run> buildAlterRun(DataRuntime runtime, View view) throws Exception
DriverAdapterbuildAlterRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端view - 视图Exception - 异常public List<Run> buildRenameRun(DataRuntime runtime, View view) throws Exception
buildRenameRun 在接口中 DriverAdapterview - 视图runtime - 运行环境主要包含驱动适配器 数据源或客户端Exception - 异常public List<Run> buildChangeCommentRun(DataRuntime runtime, View view) throws Exception
DriverAdapterbuildChangeCommentRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端view - 视图Exception - 异常public List<Run> buildDropRun(DataRuntime runtime, View view) throws Exception
buildDropRun 在接口中 DriverAdapterview - 视图runtime - 运行环境主要包含驱动适配器 数据源或客户端Exception - 异常public StringBuilder checkViewExists(DataRuntime runtime, StringBuilder builder, boolean exists)
checkViewExists 在接口中 DriverAdapterbuilder - builderexists - existsruntime - 运行环境主要包含驱动适配器 数据源或客户端public StringBuilder comment(DataRuntime runtime, StringBuilder builder, View view)
comment 在接口中 DriverAdapterbuilder - builderview - 视图runtime - 运行环境主要包含驱动适配器 数据源或客户端public List<Run> buildCreateRun(DataRuntime runtime, MasterTable table) throws Exception
buildCreateRun 在接口中 DriverAdaptertable - 表runtime - 运行环境主要包含驱动适配器 数据源或客户端Exception - 异常public List<Run> buildAppendCommentRun(DataRuntime runtime, MasterTable table) throws Exception
DriverAdapterbuildAppendCommentRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端table - 表Exception - 异常public List<Run> buildAlterRun(DataRuntime runtime, MasterTable table) throws Exception
DriverAdapterbuildAlterRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端table - 表Exception - 异常public List<Run> buildDropRun(DataRuntime runtime, MasterTable table) throws Exception
DriverAdapterbuildDropRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端table - 表Exception - 异常public List<Run> buildRenameRun(DataRuntime runtime, MasterTable table) throws Exception
DriverAdapterbuildRenameRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端table - 表Exception - 异常public List<Run> buildChangeCommentRun(DataRuntime runtime, MasterTable table) throws Exception
DriverAdapterbuildChangeCommentRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端table - 表Exception - 异常public List<Run> buildCreateRun(DataRuntime runtime, PartitionTable table) throws Exception
buildCreateRun 在接口中 DriverAdaptertable - 表runtime - 运行环境主要包含驱动适配器 数据源或客户端Exception - 异常public List<Run> buildAppendCommentRun(DataRuntime runtime, PartitionTable table) throws Exception
DriverAdapterbuildAppendCommentRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端table - 表Exception - 异常public List<Run> buildAlterRun(DataRuntime runtime, PartitionTable table) throws Exception
DriverAdapterbuildAlterRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端table - 表Exception - 异常public List<Run> buildDropRun(DataRuntime runtime, PartitionTable table) throws Exception
DriverAdapterbuildDropRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端table - 表Exception - 异常public List<Run> buildRenameRun(DataRuntime runtime, PartitionTable table) throws Exception
DriverAdapterbuildRenameRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端Exception - 异常public List<Run> buildChangeCommentRun(DataRuntime runtime, PartitionTable table) throws Exception
DriverAdapterbuildChangeCommentRun 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端table - 表Exception - 异常public String alterColumnKeyword(DataRuntime runtime)
DriverAdapteralterColumnKeyword 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端public List<Run> buildAddRun(DataRuntime runtime, Column column, boolean slice) throws Exception
buildAddRun 在接口中 DriverAdaptercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端slice - 是否只生成片段(不含alter table部分,用于DDL合并)Exceptionpublic List<Run> buildAddRun(DataRuntime runtime, Column column) throws Exception
buildAddRun 在接口中 DriverAdapterExceptionpublic StringBuilder addColumnGuide(DataRuntime runtime, StringBuilder builder, Column column)
addColumnGuide 在接口中 DriverAdapterbuilder - StringBuildercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端public List<Run> buildAlterRun(DataRuntime runtime, Column column, boolean slice) throws Exception
buildAlterRun 在接口中 DriverAdaptercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端slice - 是否只生成片段(不含alter table部分,用于DDL合并)Exceptionpublic List<Run> buildAlterRun(DataRuntime runtime, Column column) throws Exception
buildAlterRun 在接口中 DriverAdapterExceptionpublic List<Run> buildDropRun(DataRuntime runtime, Column column, boolean slice) throws Exception
buildDropRun 在接口中 DriverAdaptercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端slice - 是否只生成片段(不含alter table部分,用于DDL合并)Exceptionpublic List<Run> buildDropRun(DataRuntime runtime, Column column) throws Exception
buildDropRun 在接口中 DriverAdapterExceptionpublic StringBuilder dropColumnGuide(DataRuntime runtime, StringBuilder builder, Column column)
dropColumnGuide 在接口中 DriverAdapterbuilder - StringBuildercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端public List<Run> buildRenameRun(DataRuntime runtime, Column column) throws Exception
buildRenameRun 在接口中 DriverAdaptercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildChangeTypeRun(DataRuntime runtime, Column column) throws Exception
buildChangeTypeRun 在接口中 DriverAdaptercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildChangeDefaultRun(DataRuntime runtime, Column column) throws Exception
buildChangeDefaultRun 在接口中 DriverAdaptercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildChangeNullableRun(DataRuntime runtime, Column column) throws Exception
buildChangeNullableRun 在接口中 DriverAdaptercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildChangeCommentRun(DataRuntime runtime, Column column) throws Exception
buildChangeCommentRun 在接口中 DriverAdaptercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildAppendCommentRun(DataRuntime runtime, Column column) throws Exception
buildAppendCommentRun 在接口中 DriverAdaptercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端Exception - 异常public List<Run> buildDropAutoIncrement(DataRuntime runtime, Column column) throws Exception
buildDropAutoIncrement 在接口中 DriverAdaptercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端Exception - 异常public StringBuilder define(DataRuntime runtime, StringBuilder builder, Column column)
define 在接口中 DriverAdapterbuilder - buildercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端public StringBuilder type(DataRuntime runtime, StringBuilder builder, Column column)
type 在接口中 DriverAdapterbuilder - buildercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端public StringBuilder type(DataRuntime runtime, StringBuilder builder, Column column, String type, boolean isIgnorePrecision, boolean isIgnoreScale)
type 在接口中 DriverAdapterbuilder - buildercolumn - 列type - 数据类型(已经过转换)isIgnorePrecision - 是否忽略长度isIgnoreScale - 是否忽略小数runtime - 运行环境主要包含驱动适配器 数据源或客户端public Boolean checkIgnorePrecision(DataRuntime runtime, String type)
checkIgnorePrecision 在接口中 DriverAdapterpublic Boolean checkIgnoreScale(DataRuntime runtime, String type)
checkIgnoreScale 在接口中 DriverAdaptertype - 数据类型 如varchar intpublic boolean isIgnorePrecision(DataRuntime runtime, Column column)
isIgnorePrecision 在接口中 DriverAdapterpublic boolean isIgnoreScale(DataRuntime runtime, Column column)
isIgnoreScale 在接口中 DriverAdapterpublic StringBuilder nullable(DataRuntime runtime, StringBuilder builder, Column column)
nullable 在接口中 DriverAdapterbuilder - buildercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端public StringBuilder charset(DataRuntime runtime, StringBuilder builder, Column column)
charset 在接口中 DriverAdapterbuilder - buildercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端public StringBuilder defaultValue(DataRuntime runtime, StringBuilder builder, Column column)
defaultValue 在接口中 DriverAdapterbuilder - buildercolumn - 列public StringBuilder primary(DataRuntime runtime, StringBuilder builder, Column column)
primary 在接口中 DriverAdapterbuilder - buildercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端public StringBuilder increment(DataRuntime runtime, StringBuilder builder, Column column)
increment 在接口中 DriverAdapterbuilder - buildercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端public StringBuilder onupdate(DataRuntime runtime, StringBuilder builder, Column column)
onupdate 在接口中 DriverAdapterbuilder - buildercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端public StringBuilder position(DataRuntime runtime, StringBuilder builder, Column column)
position 在接口中 DriverAdapterbuilder - buildercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端public StringBuilder comment(DataRuntime runtime, StringBuilder builder, Column column)
comment 在接口中 DriverAdapterbuilder - buildercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端public StringBuilder checkColumnExists(DataRuntime runtime, StringBuilder builder, boolean exists)
checkColumnExists 在接口中 DriverAdapterbuilder - builderexists - existsruntime - 运行环境主要包含驱动适配器 数据源或客户端public List<Run> buildAddRun(DataRuntime runtime, Tag tag) throws Exception
buildAddRun 在接口中 DriverAdaptertag - 标签runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildAlterRun(DataRuntime runtime, Tag tag) throws Exception
buildAlterRun 在接口中 DriverAdaptertag - 标签runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildDropRun(DataRuntime runtime, Tag tag) throws Exception
buildDropRun 在接口中 DriverAdaptertag - 标签runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildRenameRun(DataRuntime runtime, Tag tag) throws Exception
buildRenameRun 在接口中 DriverAdaptertag - 标签runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildChangeDefaultRun(DataRuntime runtime, Tag tag) throws Exception
buildChangeDefaultRun 在接口中 DriverAdaptertag - 标签runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildChangeNullableRun(DataRuntime runtime, Tag tag) throws Exception
buildChangeNullableRun 在接口中 DriverAdaptertag - 标签runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildChangeCommentRun(DataRuntime runtime, Tag tag) throws Exception
buildChangeCommentRun 在接口中 DriverAdaptertag - 标签runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildChangeTypeRun(DataRuntime runtime, Tag tag) throws Exception
buildChangeTypeRun 在接口中 DriverAdaptertag - 标签runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic StringBuilder checkTagExists(DataRuntime runtime, StringBuilder builder, boolean exists)
checkTagExists 在接口中 DriverAdapterbuilder - builderexists - existsruntime - 运行环境主要包含驱动适配器 数据源或客户端public List<Run> buildAddRun(DataRuntime runtime, PrimaryKey primary) throws Exception
buildAddRun 在接口中 DriverAdapterprimary - 主键runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildAlterRun(DataRuntime runtime, PrimaryKey primary) throws Exception
buildAlterRun 在接口中 DriverAdapterprimary - 主键runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildDropRun(DataRuntime runtime, PrimaryKey primary) throws Exception
buildDropRun 在接口中 DriverAdapterprimary - 主键runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildRenameRun(DataRuntime runtime, PrimaryKey primary) throws Exception
buildRenameRun 在接口中 DriverAdapterprimary - 主键runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildAddRun(DataRuntime runtime, ForeignKey foreign) throws Exception
buildAddRun 在接口中 DriverAdapterforeign - 外键runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildAlterRun(DataRuntime runtime, ForeignKey foreign) throws Exception
buildAlterRun 在接口中 DriverAdapterforeign - 外键Exceptionpublic List<Run> buildDropRun(DataRuntime runtime, ForeignKey foreign) throws Exception
buildDropRun 在接口中 DriverAdapterforeign - 外键runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildRenameRun(DataRuntime runtime, ForeignKey foreign) throws Exception
buildRenameRun 在接口中 DriverAdapterforeign - 外键runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildAddRun(DataRuntime runtime, Index index) throws Exception
buildAddRun 在接口中 DriverAdapterindex - 索引runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildAlterRun(DataRuntime runtime, Index index) throws Exception
buildAlterRun 在接口中 DriverAdapterindex - 索引runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildDropRun(DataRuntime runtime, Index index) throws Exception
buildDropRun 在接口中 DriverAdapterindex - 索引runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildRenameRun(DataRuntime runtime, Index index) throws Exception
buildRenameRun 在接口中 DriverAdapterindex - 索引runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic void comment(DataRuntime runtime, StringBuilder builder, Index index)
comment 在接口中 DriverAdapterbuilder - index - runtime - 运行环境主要包含驱动适配器 数据源或客户端public List<Run> buildAddRun(DataRuntime runtime, Constraint constraint) throws Exception
buildAddRun 在接口中 DriverAdapterconstraint - 约束runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildAlterRun(DataRuntime runtime, Constraint constraint) throws Exception
buildAlterRun 在接口中 DriverAdapterconstraint - 约束runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildDropRun(DataRuntime runtime, Constraint constraint) throws Exception
buildDropRun 在接口中 DriverAdapterconstraint - 约束runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildRenameRun(DataRuntime runtime, Constraint constraint) throws Exception
buildRenameRun 在接口中 DriverAdapterconstraint - 约束runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildCreateRun(DataRuntime runtime, Trigger trigger) throws Exception
buildCreateRun 在接口中 DriverAdaptertrigger - 触发器runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic void each(DataRuntime runtime, StringBuilder builder, Trigger trigger)
each 在接口中 DriverAdapterpublic List<Run> buildAlterRun(DataRuntime runtime, Trigger trigger) throws Exception
buildAlterRun 在接口中 DriverAdaptertrigger - 触发器runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildDropRun(DataRuntime runtime, Trigger trigger) throws Exception
buildDropRun 在接口中 DriverAdaptertrigger - 触发器runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildRenameRun(DataRuntime runtime, Trigger trigger) throws Exception
buildRenameRun 在接口中 DriverAdaptertrigger - 触发器runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildCreateRun(DataRuntime runtime, Procedure procedure) throws Exception
buildCreateRun 在接口中 DriverAdapterprocedure - 存储过程runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic void parameter(DataRuntime runtime, StringBuilder builder, Parameter parameter)
parameter 在接口中 DriverAdapterbuilder - builderparameter - parameterruntime - 运行环境主要包含驱动适配器 数据源或客户端public List<Run> buildAlterRun(DataRuntime runtime, Procedure procedure) throws Exception
buildAlterRun 在接口中 DriverAdapterprocedure - 存储过程runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildDropRun(DataRuntime runtime, Procedure procedure) throws Exception
buildDropRun 在接口中 DriverAdapterprocedure - 存储过程runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildRenameRun(DataRuntime runtime, Procedure procedure) throws Exception
buildRenameRun 在接口中 DriverAdapterprocedure - 存储过程runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildCreateRun(DataRuntime runtime, Function function) throws Exception
buildCreateRun 在接口中 DriverAdapterfunction - 函数runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildAlterRun(DataRuntime runtime, Function function) throws Exception
buildAlterRun 在接口中 DriverAdapterfunction - 函数runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic List<Run> buildDropRun(DataRuntime runtime, Function function) throws Exception
buildDropRun 在接口中 DriverAdapterfunction - 函数Exceptionpublic List<Run> buildRenameRun(DataRuntime runtime, Function function) throws Exception
buildRenameRun 在接口中 DriverAdapterfunction - 函数runtime - 运行环境主要包含驱动适配器 数据源或客户端Exceptionpublic boolean isBooleanColumn(DataRuntime runtime, Column column)
DriverAdapterisBooleanColumn 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端column - 列public boolean isNumberColumn(DataRuntime runtime, Column column)
isNumberColumn 在接口中 DriverAdaptercolumn - 列runtime - 运行环境主要包含驱动适配器 数据源或客户端public boolean isCharColumn(DataRuntime runtime, Column column)
DriverAdapterisCharColumn 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端column - 列public String value(DataRuntime runtime, Column column, DriverAdapter.SQL_BUILD_IN_VALUE value)
value 在接口中 DriverAdaptercolumn - 列属性value - SQL_BUILD_IN_VALUEruntime - 运行环境主要包含驱动适配器 数据源或客户端protected String string(Map<String,Integer> keys, String key, ResultSet set, String def) throws Exception
keys - keyskey - keyset - ResultSetException - 异常protected String string(Map<String,Integer> keys, String key, ResultSet set) throws Exception
Exceptionprotected Integer integer(Map<String,Integer> keys, String key, ResultSet set, Integer def) throws Exception
Exceptionprotected Boolean bool(Map<String,Integer> keys, String key, ResultSet set, Boolean def) throws Exception
Exceptionprotected Boolean bool(Map<String,Integer> keys, String key, ResultSet set, int def) throws Exception
Exceptionprotected Object value(Map<String,Integer> keys, String key, ResultSet set, Object def) throws Exception
Exceptionprotected Object value(Map<String,Integer> keys, String key, ResultSet set) throws Exception
Exceptionpublic String getPrimaryKey(DataRuntime runtime, Object obj)
DriverAdaptergetPrimaryKey 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端obj - objpublic Object getPrimaryValue(DataRuntime runtime, Object obj)
DriverAdaptergetPrimaryValue 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端obj - objpublic Object write(DataRuntime runtime, Column metadata, Object value, boolean placeholder)
write 在接口中 DriverAdaptermetadata - Column 用来定位数据类型placeholder - 是否占位符value - valueruntime - 运行环境主要包含驱动适配器 数据源或客户端public Object read(DataRuntime runtime, Column metadata, Object value, Class clazz)
read 在接口中 DriverAdaptermetadata - Column 用来定位数据类型value - valueclazz - 目标数据类型(给entity赋值时应该指定属性class, DataRow赋值时可以通过JDBChandler指定class)runtime - 运行环境主要包含驱动适配器 数据源或客户端public void value(DataRuntime runtime, StringBuilder builder, Object obj, String key)
DriverAdaptervalue 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端builder - builderobj - DataRow 或 Entitykey - 列名public boolean convert(DataRuntime runtime, String catalog, String schema, String table, RunValue value)
DriverAdapterconvert 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端catalog - catalogschema - schematable - 表value - 值public void addRunValue(DataRuntime runtime, Run run, Compare compare, Column column, Object value)
addRunValue 在接口中 DriverAdapterrun - 最终待执行的命令和参数(如果是JDBC环境就是SQL)compare - 比较方式 默认 equal 多个值默认 incolumn - 列value - valuepublic boolean convert(DataRuntime runtime, Table table, Run run)
convert 在接口中 DriverAdapterpublic boolean convert(DataRuntime runtime, Map<String,Column> columns, RunValue value)
DriverAdapterconvert 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端columns - 列value - 值public boolean convert(DataRuntime runtime, Column metadata, RunValue run)
convert 在接口中 DriverAdaptermetadata - 列run - 最终待执行的命令和参数(如果是JDBC环境就是SQL)Valueruntime - 运行环境主要包含驱动适配器 数据源或客户端public Object convert(DataRuntime runtime, Column metadata, Object value)
convert 在接口中 DriverAdapterpublic Object convert(DataRuntime runtime, ColumnType columnType, Object value)
convert 在接口中 DriverAdapterpublic PrimaryGenerator getPrimaryGenerator()
public void setPrimaryGenerator(PrimaryGenerator primaryGenerator)
public String objectName(DataRuntime runtime, String name)
DriverAdapterobjectName 在接口中 DriverAdapterruntime - 运行环境主要包含驱动适配器 数据源或客户端name - nameprotected String random(DataRuntime runtime)
Copyright © 2023. All rights reserved.