| 构造器和说明 |
|---|
TableClientProxy(ITable table) |
| 限定符和类型 | 方法和说明 |
|---|---|
Boolean |
alterTableParams(ISourceDTO source,
String tableName,
Map<String,String> params)
修改表参数
|
Boolean |
dropTable(ISourceDTO source,
String tableName)
删除表,成功返回true,失败返回false
|
List<Map<String,Object>> |
executeQuery(ISourceDTO source,
String sql)
执行sql查询
|
Boolean |
executeSqlWithoutResultSet(ISourceDTO source,
String sql)
执行sql,不需要结果
|
Connection |
getCon(ISourceDTO source)
rdbms数据库获取连接唯一入口,对抛出异常进行统一处理
|
Long |
getTableSize(ISourceDTO source,
String schema,
String tableName)
获取表占用存储
|
Boolean |
isView(ISourceDTO source,
String schema,
String tableName)
判断表是否是分区表
|
Boolean |
renameTable(ISourceDTO source,
String oldTableName,
String newTableName)
重命名表,成功返回true,失败返回false
|
List<String> |
showPartitions(ISourceDTO source,
String tableName)
获取所有分区,格式同sql返回值,不错额外处理,如:pt1=name1/pt2=name2/pt3=name3
非分区表返回null
|
Boolean |
upsertTableColumn(ISourceDTO source,
UpsertColumnMetaDTO columnMetaDTO)
新增或者修改表的列
|
public TableClientProxy(ITable table)
public Connection getCon(ISourceDTO source)
ITablepublic List<Map<String,Object>> executeQuery(ISourceDTO source, String sql)
ITableexecuteQuery 在接口中 ITablesource - 数据源信息sql - 查询sqlpublic Boolean executeSqlWithoutResultSet(ISourceDTO source, String sql)
ITableexecuteSqlWithoutResultSet 在接口中 ITablesource - 数据源信息sql - 查询sqlpublic List<String> showPartitions(ISourceDTO source, String tableName)
ITableshowPartitions 在接口中 ITablepublic Boolean dropTable(ISourceDTO source, String tableName)
ITablepublic Boolean renameTable(ISourceDTO source, String oldTableName, String newTableName)
ITablerenameTable 在接口中 ITablesource - 数据源信息oldTableName - 旧表名newTableName - 新表名public Boolean alterTableParams(ISourceDTO source, String tableName, Map<String,String> params)
ITablealterTableParams 在接口中 ITablesource - 数据源信息tableName - 表名params - 修改的参数,map集合public Long getTableSize(ISourceDTO source, String schema, String tableName)
ITablegetTableSize 在接口中 ITablesource - 数据源信息schema - schema信息tableName - 表名public Boolean isView(ISourceDTO source, String schema, String tableName)
ITablepublic Boolean upsertTableColumn(ISourceDTO source, UpsertColumnMetaDTO columnMetaDTO)
ITableupsertTableColumn 在接口中 ITablesource - 数据源信息columnMetaDTO - 列信息Copyright © 2022. All rights reserved.