自动同步模式

This commit is contained in:
inrgihc
2023-12-07 21:40:45 +08:00
parent 076ef5138b
commit d2e8b85cd3
74 changed files with 471 additions and 237 deletions

View File

@@ -319,7 +319,7 @@ jdbc驱动名称org.apache.hive.jdbc.HiveDriver
**OpenGauss数据库**
```
jdbc连接地址dbc:opengauss://172.17.2.10:5866/test
jdbc连接地址jdbc:opengauss://172.17.2.10:5866/test
jdbc驱动名称org.opengauss.Driver
```

View File

@@ -2,7 +2,7 @@
set -e
DBSWITCH_VERSION=1.9.1
DBSWITCH_VERSION=1.9.2
BUILD_DOCKER_DIR="$( cd "$( dirname "$0" )" && pwd )"
PROJECT_ROOT_DIR=$( dirname "$BUILD_DOCKER_DIR")
DOCKER_DBSWITCH_DIR=$BUILD_DOCKER_DIR/dbswitch

View File

@@ -18,7 +18,7 @@ services:
start_period: 30s
dbswitch:
container_name: dbswitch_webui
image: inrgihc/dbswitch:1.9.1
image: inrgihc/dbswitch:1.9.2
environment:
MYSQLDB_HOST: dbswitch_mysqldb
MYSQLDB_PORT: 3306

View File

@@ -22,8 +22,9 @@
style="margin:10px 5px;"
width="95%">
<el-button type="primary"
size="mini"
icon="el-icon-document-add"
@click="dialogVisible=true">添加驱动</el-button>
@click="dialogVisible=true">添加</el-button>
</div>
<el-table :header-cell-style="{background:'#eef1f6',color:'#606266'}"
:data="versionDrivers"
@@ -88,7 +89,7 @@ export default {
}).then(res => {
if (0 === res.data.code) {
this.connectionTypes = res.data.data;
this.handleChooseClick('MYSQL',0);
this.handleChooseClick('MYSQL', 0);
} else {
if (res.data.message) {
alert("初始化数据库类型信息失败:" + res.data.message);
@@ -173,7 +174,7 @@ export default {
}
.container .el-card {
width: 50%;
width: 30%;
height: 100%;
overflow: auto;
}
@@ -209,5 +210,4 @@ export default {
padding: 10px;
width: calc(100% - 250px);
}
</style>

View File

@@ -7,15 +7,16 @@
<el-input placeholder="请输入连接名称关键字搜索"
v-model="keyword"
@change="searchByKeyword"
clearable=true
:clearable=true
style="width:300px">
</el-input>
</div>
</div>
<div class="right-add-button-group">
<el-button type="primary"
size="mini"
icon="el-icon-document-add"
@click="createFormVisible=true">添加</el-button>
@click="addConnection">添加</el-button>
</div>
</div>
@@ -28,62 +29,52 @@
min-width="5%"></el-table-column>
<el-table-column prop="name"
label="连接名称"
show-overflow-tooltip
min-width="20%"></el-table-column>
<el-table-column prop="createTime"
label="创建时间"
min-width="20%"></el-table-column>
min-width="18%"></el-table-column>
<el-table-column prop="type"
label="数据库类型"
show-overflow-tooltip
min-width="10%"></el-table-column>
<el-table-column prop="version"
label="驱动版本"
min-width="15%"></el-table-column>
show-overflow-tooltip
min-width="12%"></el-table-column>
<el-table-column prop="url"
label="JDBC连接串"
show-overflow-tooltip
min-width="30%"></el-table-column>
min-width="15%"></el-table-column>
<el-table-column prop="username"
label="账号"
show-overflow-tooltip
min-width="10%"></el-table-column>
<el-table-column label="操作"
min-width="30%">
min-width="35%">
<template slot-scope="scope">
<el-tooltip content="测试"
placement="top"
effect="dark">
<el-button-group>
<el-button size="small"
type="danger"
icon="el-icon-document-checked"
icon="el-icon-video-play"
@click="handleTest(scope.$index, scope.row)"
circle></el-button>
</el-tooltip>
<el-tooltip content="详情"
placement="top"
effect="dark">
round>测试</el-button>
<el-button size="small"
type="primary"
icon="el-icon-document"
@click="handleMore(scope.$index, scope.row)"
circle></el-button>
</el-tooltip>
<el-tooltip content="编辑"
placement="top"
effect="dark">
round>详情</el-button>
<el-button size="small"
type="warning"
icon="el-icon-edit"
@click="handleUpdate(scope.$index, scope.row)"
circle></el-button>
</el-tooltip>
<el-tooltip content="删除"
placement="top"
effect="dark">
round>编辑</el-button>
<el-button size="small"
type="success"
icon="el-icon-delete"
@click="handleDelete(scope.$index, scope.row)"
circle></el-button>
</el-tooltip>
round>删除</el-button>
</el-button-group>
</template>
</el-table-column>
</el-table>
@@ -137,6 +128,7 @@
style="width:85%">
<el-input type="textarea"
:rows="6"
:spellcheck="false"
v-model="queryForm.url"
auto-complete="off"
:readonly=true></el-input>
@@ -210,12 +202,21 @@
<el-form-item label="JDBC连接串"
label-width="120px"
:required=true
prop=""
prop="url"
style="width:85%">
<el-tooltip placement="top">
<i class="el-icon-question">样例:</i>
<div slot="content">
{{createform.sample}}
</div>
</el-tooltip>
<el-input type="textarea"
:rows="6"
:spellcheck="false"
placeholder="请输入"
v-model="createform.url"
auto-complete="off"></el-input>
auto-complete="off">
</el-input>
</el-form-item>
<el-form-item label="账号名称"
label-width="120px"
@@ -292,6 +293,7 @@
style="width:85%">
<el-input type="textarea"
:rows="6"
:spellcheck="false"
v-model="updateform.url"
auto-complete="off"></el-input>
</el-form-item>
@@ -350,6 +352,8 @@ export default {
title: "",
type: "",
diver: "",
sample: "",
url: "",
version: "",
username: "",
password: ""
@@ -378,6 +382,13 @@ export default {
trigger: "change"
}
],
version: [
{
required: true,
message: "驱动版本必须选择",
trigger: "change"
}
],
url: [
{
required: true,
@@ -434,6 +445,7 @@ export default {
);
},
searchByKeyword: function () {
this.currentPage = 1;
this.loadData();
},
loadDatabaseTypes: function () {
@@ -494,6 +506,10 @@ export default {
}
});
},
addConnection: function () {
this.createFormVisible = true;
this.createform = {};
},
handleCreate: function () {
let driverClass = "";
if (this.databaseType.length > 0) {
@@ -545,6 +561,13 @@ export default {
).then(res => {
if (0 === res.data.code) {
this.connectionDriver = res.data.data;
let varDatabaseType = this.databaseType.find(
(item) => {
return item.type === value;
});
if (varDatabaseType) {
this.createform.sample = varDatabaseType.sample;
}
} else {
this.$message.error("查询数据库可用的驱动版本失败," + res.data.message);
this.connectionDriver = [];

View File

@@ -66,7 +66,7 @@
</el-table-column>
<el-table-column prop="fieldType"
min-width="7%"
label="枚举值">
label="jdbcType">
</el-table-column>
<el-table-column prop="displaySize"
min-width="7%"
@@ -74,7 +74,7 @@
</el-table-column>
<el-table-column prop="precision"
min-width="5%"
label="精">
label="精">
</el-table-column>
<el-table-column prop="scale"
min-width="5%"
@@ -90,7 +90,7 @@
</el-table-column>
<el-table-column prop="isNullable"
min-width="5%"
label="空">
label="空">
</el-table-column>
<el-table-column prop="remarks"
min-width="20%"

View File

@@ -6,7 +6,7 @@
<div class="left-search-input">
<el-input placeholder="请输入任务名称关键字搜索"
v-model="keyword"
clearable=true
:clearable=true
@change="searchByKeyword"
style="width:300px">
</el-input>
@@ -14,6 +14,7 @@
</div>
<div class="right-add-button-group">
<el-button type="primary"
size="mini"
icon="el-icon-document-add"
@click="handleCreate">添加</el-button>
</div>
@@ -45,42 +46,44 @@
<el-table-column label="操作"
min-width="30%">
<template slot-scope="scope">
<el-button-group>
<el-button size="small"
type="primary"
icon="el-icon-timer"
v-if="scope.row.isPublished===false"
@click="handlePublish(scope.$index, scope.row)"
circle>发布</el-button>
round>发布</el-button>
<el-button size="small"
type="info"
icon="el-icon-delete-location"
v-if="scope.row.isPublished===true"
@click="handleRetireTask(scope.$index, scope.row)"
circle>下线</el-button>
round>下线</el-button>
<el-button size="small"
type="danger"
icon="el-icon-video-play"
v-if="scope.row.isPublished===true"
@click="handleRunTask(scope.$index, scope.row)"
circle>执行</el-button>
round>执行</el-button>
<el-button size="small"
type="success"
icon="el-icon-document"
v-if="scope.row.isPublished===true"
@click="handleDetail(scope.$index, scope.row)"
circle>详情</el-button>
round>详情</el-button>
<el-button size="small"
type="warning"
icon="el-icon-edit"
v-if="scope.row.isPublished===false"
@click="handleUpdate(scope.$index, scope.row)"
circle>修改</el-button>
round>修改</el-button>
<el-button size="small"
type="danger"
icon="el-icon-delete"
v-if="scope.row.isPublished===false"
@click="handleDelete(scope.$index, scope.row)"
circle>删除</el-button>
round>删除</el-button>
</el-button-group>
</template>
</el-table-column>
</el-table>
@@ -140,6 +143,7 @@ export default {
);
},
searchByKeyword: function () {
this.currentPage = 1;
this.loadData();
},
boolFormatPublish (row, column) {

View File

@@ -182,27 +182,52 @@
:value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="只创建表"
<el-form-item label="自动同步模式"
label-width="240px"
:required=true
prop="targetOnlyCreate"
prop="autoSyncMode"
style="width:65%">
<span slot="label">
<span style="color: red"><strong>自动同步模式</strong> </span>
</span>
<el-tooltip placement="top">
<div slot="content">
只再目标端创建表同步数据内容如果配置为则下面的数据处理批次大小"将无效。
<p>如果只同步数据内容则需要目标端需要存在符合映射规则的物理表可在执行任务前手动建好</p>
</div>
<i class="el-icon-question"></i>
</el-tooltip>
<el-select v-model="createform.targetOnlyCreate">
<el-select v-model="createform.autoSyncMode">
<el-option label='目标端建表并同步数据'
:value=2></el-option>
<el-option label='目标端只创建物理表'
:value=1></el-option>
<el-option label='目标端只同步表里数据'
:value=0></el-option>
</el-select>
</el-form-item>
<el-form-item label="建表字段自增"
label-width="240px"
:required=true
v-if=" createform.autoSyncMode!==0 "
prop="targetAutoIncrement"
style="width:65%">
<el-tooltip placement="top">
<div slot="content">
创建表时是否自动支持字段的自增只有使用自动建表才会生效不过前提需要两端的数据库表支持自增字段默认为false
</div>
<i class="el-icon-question"></i>
</el-tooltip>
<el-select v-model="createform.targetAutoIncrement">
<el-option label='是'
:value=true></el-option>
<el-option label='否'
:value=false></el-option>
</el-select>
</el-form-item>
<el-form-item label="数据处理批次大小"
<el-form-item label="数据批次大小"
label-width="240px"
:required=true
v-if=" createform.autoSyncMode!==1 "
prop="batchSize"
style="width:65%">
<el-tooltip placement="top">
@@ -225,6 +250,7 @@
<el-form-item label="表名大小写转换"
label-width="240px"
:required=true
v-if=" createform.autoSyncMode!==0 "
prop="tableNameCase"
style="width:45%">
<el-tooltip placement="top">
@@ -245,6 +271,7 @@
<el-form-item label="列名大小写转换"
label-width="240px"
:required=true
v-if=" createform.autoSyncMode!==0 "
prop="columnNameCase"
style="width:45%">
<el-tooltip placement="top">
@@ -381,9 +408,23 @@
</el-descriptions-item>
<el-descriptions-item label="目地端数据源">[{{createform.targetConnectionId}}]{{targetConnection.name}}</el-descriptions-item>
<el-descriptions-item label="目地端schema">{{createform.targetSchema}}</el-descriptions-item>
<el-descriptions-item label="只创建表">{{createform.targetOnlyCreate}}</el-descriptions-item>
<el-descriptions-item label="数据处理批次量">{{createform.batchSize}}</el-descriptions-item>
<el-descriptions-item label="表名大小写转换">
<el-descriptions-item label="自动同步模式">
<span v-if="createform.autoSyncMode == 2">
目标端建表并同步数据
</span>
<span v-if="createform.autoSyncMode == 1">
目标端只创建物理表
</span>
<span v-if="createform.autoSyncMode == 0">
目标端只同步表里数据
</span>
</el-descriptions-item>
<el-descriptions-item label="建表字段自增"
v-if=" createform.autoSyncMode!==0 ">{{createform.targetAutoIncrement}}</el-descriptions-item>
<el-descriptions-item label="数据批次大小"
v-if=" createform.autoSyncMode!==1 ">{{createform.batchSize}}</el-descriptions-item>
<el-descriptions-item label="表名大小写转换"
v-if=" createform.autoSyncMode!==0 ">
<span v-if="createform.tableNameCase == 'NONE'">
无转换
</span>
@@ -394,7 +435,8 @@
转小写
</span>
</el-descriptions-item>
<el-descriptions-item label="列名大小写转换">
<el-descriptions-item label="列名大小写转换"
v-if=" createform.autoSyncMode!==0 ">
<span v-if="createform.columnNameCase == 'NONE'">
无转换
</span>
@@ -535,6 +577,8 @@ export default {
targetConnectionId: '请选择',
targetDropTable: true,
targetOnlyCreate: false,
targetAutoIncrement: false,
autoSyncMode: 2,
targetSchema: "",
batchSize: 5000
},
@@ -879,6 +923,16 @@ export default {
},
handleSave: function () {
if (0 === this.createform.autoSyncMode) {
this.createform.targetDropTable = false;
this.createform.targetOnlyCreate = false;
} else if (1 === this.createform.autoSyncMode) {
this.createform.targetDropTable = true;
this.createform.targetOnlyCreate = true;
} else {
this.createform.targetDropTable = true;
this.createform.targetOnlyCreate = false;
}
this.$refs['createform'].validate(valid => {
if (valid) {
this.$http({
@@ -904,8 +958,9 @@ export default {
columnNameMapper: this.createform.columnNameMapper,
tableNameCase: this.createform.tableNameCase,
columnNameCase: this.createform.columnNameCase,
targetDropTable: true,
targetDropTable: this.createform.targetDropTable,
targetOnlyCreate: this.createform.targetOnlyCreate,
targetAutoIncrement: this.createform.targetAutoIncrement,
batchSize: this.createform.batchSize
}
})

View File

@@ -2,7 +2,6 @@
<el-card>
<el-form :model="updateform"
status-icon
:rules="rules"
ref="updateform">
<el-descriptions size="small"
:column="1"
@@ -20,7 +19,7 @@
</el-descriptions-item>
<el-descriptions-item v-if="updateform.scheduleMode == 'SYSTEM_SCHEDULED'"
label="CRON表达式">{{updateform.cronExpression}}</el-descriptions-item>
<el-descriptions-item label="源端数据源">[{{updateform.sourceConnectionId}}]{{sourceConnection.name}}</el-descriptions-item>
<el-descriptions-item label="源端数据源">[{{updateform.sourceConnectionId}}]{{updateform.sourceConnectionName}}</el-descriptions-item>
<el-descriptions-item label="源端schema">{{updateform.sourceSchema}}</el-descriptions-item>
<el-descriptions-item label="源端表类型">{{updateform.tableType}}</el-descriptions-item>
<el-descriptions-item label="源端表选择方式">
@@ -36,12 +35,25 @@
<p v-for="item in updateform.sourceTables"
v-bind:key="item">{{item}}</p>
</el-descriptions-item>
<el-descriptions-item label="目地端数据源">[{{updateform.targetConnectionId}}]{{targetConnection.name}}</el-descriptions-item>
<el-descriptions-item label="目地端数据源">[{{updateform.targetConnectionId}}]{{updateform.targetConnectionName}}</el-descriptions-item>
<el-descriptions-item label="目地端schema">{{updateform.targetSchema}}</el-descriptions-item>
<el-descriptions-item label="只创建表">{{updateform.targetOnlyCreate}}</el-descriptions-item>
<el-descriptions-item label="删除同名表">{{updateform.targetDropTable}}</el-descriptions-item>
<el-descriptions-item label="数据处理批次量">{{updateform.batchSize}}</el-descriptions-item>
<el-descriptions-item label="表名大小写转换">
<el-descriptions-item label="自动同步模式">
<span v-if="updateform.autoSyncMode == 2">
目标端建表并同步数据
</span>
<span v-if="updateform.autoSyncMode == 1">
目标端只创建物理表
</span>
<span v-if="updateform.autoSyncMode == 0">
目标端只同步表里数据
</span>
</el-descriptions-item>
<el-descriptions-item label="建表字段自增"
v-if=" updateform.autoSyncMode!==0 ">{{updateform.targetAutoIncrement}}</el-descriptions-item>
<el-descriptions-item label="数据批次大小"
v-if=" updateform.autoSyncMode!==1 ">{{updateform.batchSize}}</el-descriptions-item>
<el-descriptions-item label="表名大小写转换"
v-if=" updateform.autoSyncMode!==0 ">
<span v-if="updateform.tableNameCase == 'NONE'">
无转换
</span>
@@ -52,7 +64,8 @@
转小写
</span>
</el-descriptions-item>
<el-descriptions-item label="列名大小写转换">
<el-descriptions-item label="列名大小写转换"
v-if=" updateform.autoSyncMode!==0 ">
<span v-if="updateform.columnNameCase == 'NONE'">
无转换
</span>
@@ -97,6 +110,7 @@
</el-form>
<el-button type="primary"
size="mini"
icon="el-icon-arrow-left"
@click="handleGoBack">
返回
@@ -127,6 +141,7 @@ export default {
targetConnectionId: '请选择',
targetDropTable: true,
targetOnlyCreate: false,
autoSyncMode: 2,
targetSchema: "",
batchSize: 5000
},
@@ -144,6 +159,14 @@ export default {
).then(res => {
if (0 === res.data.code) {
let detail = res.data.data;
let varAutoSyncMode = 2;
if (detail.configuration.targetDropTable && detail.configuration.targetOnlyCreate) {
varAutoSyncMode = 1;
} else if (!detail.configuration.targetDropTable && !detail.configuration.targetOnlyCreate) {
varAutoSyncMode = 0;
} else {
varAutoSyncMode = 2;
}
this.updateform = {
id: detail.id,
name: detail.name,
@@ -151,6 +174,7 @@ export default {
scheduleMode: detail.scheduleMode,
cronExpression: detail.cronExpression,
sourceConnectionId: detail.configuration.sourceConnectionId,
sourceConnectionName: detail.configuration.sourceConnectionName,
sourceSchema: detail.configuration.sourceSchema,
tableType: detail.configuration.tableType,
includeOrExclude: detail.configuration.includeOrExclude,
@@ -160,8 +184,11 @@ export default {
tableNameCase: detail.configuration.tableNameCase,
columnNameCase: detail.configuration.columnNameCase,
targetConnectionId: detail.configuration.targetConnectionId,
targetConnectionName: detail.configuration.targetConnectionName,
targetDropTable: detail.configuration.targetDropTable,
targetOnlyCreate: detail.configuration.targetOnlyCreate,
targetAutoIncrement: detail.configuration.targetAutoIncrement,
autoSyncMode: varAutoSyncMode,
targetSchema: detail.configuration.targetSchema,
batchSize: detail.configuration.batchSize
}

View File

@@ -8,7 +8,7 @@
<span>任务安排列表</span>
<el-input placeholder="请输入关键字搜索"
v-model="keyword"
clearable=true
:clearable=true
@change="changeSearchKeyword"
style="width:200px">
</el-input>
@@ -33,6 +33,14 @@
</el-card>
<div class="contentBox">
<div class="right-refresh-button">
<el-button type="primary"
plain
size="mini"
icon="el-icon-refresh"
@click="handleClickRefresh"
round>刷新</el-button>
</div>
<el-table :header-cell-style="{background:'#eef1f6',color:'#606266'}"
:data="jobTableData"
size="small"
@@ -61,10 +69,11 @@
<el-table-column label="日志"
min-width="15%">
<template slot-scope="props">
<el-button size="small"
type="danger"
@click="handleShowJobLogs(props.row.jobId)">
查看
<el-button size="mini"
type="success"
@click="handleShowJobLogs(props.row.jobId)"
round>
<i class="el-icon-view el-icon--right">查看</i>
</el-button>
</template>
</el-table-column>
@@ -155,7 +164,7 @@ export default {
keyword: null,
pageTaskAssignments: [],
pageTaskAssignmentsTotalCount: 0,
taskId: '请选择一个任务安排',
taskId: 0,
jobTableData: [],
jobScheduleTime: '',
isActive: -1,
@@ -194,6 +203,7 @@ export default {
);
},
changeSearchKeyword: function () {
this.currentTaskAssignmentPage = 1;
this.loadPageTaskAssignments();
},
handleLoadPageTaskAssignments: function (currentPage) {
@@ -236,6 +246,13 @@ export default {
this.taskId = taskId;
this.loadJobsData();
},
handleClickRefresh () {
if (!this.taskId || this.taskId < 0) {
alert("请先在左侧选择一个任务来");
return;
}
this.loadJobsData();
},
handleCancelJob: function (jobId) {
this.$http.get(
"/dbswitch/admin/api/v1/ops/job/cancel?id=" + jobId
@@ -401,4 +418,10 @@ export default {
padding: 10px;
width: calc(100% - 250px);
}
.right-refresh-button {
float: right;
margin-right: 2px;
margin: 10px 2px;
}
</style>

View File

@@ -181,47 +181,52 @@
:value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="只创建表"
<el-form-item label="自动同步模式"
label-width="240px"
:required=true
prop="targetOnlyCreate"
style="width:65%">
<el-tooltip placement="top">
<div slot="content">
只再目标端创建表不同步数据内容如果配置为则下面的数据处理批次大小"将无效。
</div>
<i class="el-icon-question"></i>
</el-tooltip>
<el-select v-model="updateform.targetOnlyCreate">
<el-option label='是'
:value=true></el-option>
<el-option label='否'
:value=false></el-option>
</el-select>
</el-form-item>
<el-form-item label-width="240px"
:required=true
prop="targetDropTable"
prop="autoSyncMode"
style="width:65%">
<span slot="label">
<span style="color: red"><strong>删除同名表</strong> </span>
<span style="color: red"><strong>自动同步模式</strong> </span>
</span>
<el-tooltip placement="top">
<div slot="content">
当目标端存在同名表时,如果配置为“是”,则会删除同步表后再进行创建。如果修改了表或字段的映射关系,请将配置为“是”,否则任务执行时会因映射关系不匹配而报错。
<p>如果只同步数据内容则需要目标端需要存在符合映射规则的物理表可在执行任务前手动建好</p>
</div>
<i class="el-icon-question"></i>
</el-tooltip>
<el-select v-model="updateform.targetDropTable">
<el-select v-model="updateform.autoSyncMode">
<el-option label='目标端建表并同步数据'
:value=2></el-option>
<el-option label='目标端只创建物理表'
:value=1></el-option>
<el-option label='目标端只同步表里数据'
:value=0></el-option>
</el-select>
</el-form-item>
<el-form-item label="建表字段自增"
label-width="240px"
:required=true
v-if=" updateform.autoSyncMode!==0 "
prop="targetAutoIncrement"
style="width:65%">
<el-tooltip placement="top">
<div slot="content">
创建表时是否自动支持字段的自增只有使用自动建表才会生效不过前提需要两端的数据库表支持自增字段默认为false
</div>
<i class="el-icon-question"></i>
</el-tooltip>
<el-select v-model="updateform.targetAutoIncrement">
<el-option label='是'
:value=true></el-option>
<el-option label='否'
:value=false></el-option>
</el-select>
</el-form-item>
<el-form-item label="数据处理批次大小"
<el-form-item label="数据批次大小"
label-width="240px"
:required=true
v-if=" updateform.autoSyncMode!==1 "
prop="batchSize"
style="width:65%">
<el-tooltip placement="top">
@@ -244,6 +249,7 @@
<el-form-item label="表名大小写转换"
label-width="240px"
:required=true
v-if=" updateform.autoSyncMode!==0 "
prop="tableNameCase"
style="width:45%">
<el-tooltip placement="top">
@@ -264,6 +270,7 @@
<el-form-item label="列名大小写转换"
label-width="240px"
:required=true
v-if=" updateform.autoSyncMode!==0 "
prop="columnNameCase"
style="width:45%">
<el-tooltip placement="top">
@@ -382,7 +389,7 @@
</el-descriptions-item>
<el-descriptions-item v-if="updateform.scheduleMode == 'SYSTEM_SCHEDULED'"
label="CRON表达式">{{updateform.cronExpression}}</el-descriptions-item>
<el-descriptions-item label="源端数据源">[{{updateform.sourceConnectionId}}]{{sourceConnection.name}}</el-descriptions-item>
<el-descriptions-item label="源端数据源">[{{updateform.sourceConnectionId}}]{{updateform.sourceConnectionName}}</el-descriptions-item>
<el-descriptions-item label="源端schema">{{updateform.sourceSchema}}</el-descriptions-item>
<el-descriptions-item label="源端表类型">{{updateform.tableType}}</el-descriptions-item>
<el-descriptions-item label="源端表选择方式">
@@ -398,12 +405,22 @@
<p v-for="item in updateform.sourceTables"
v-bind:key="item">{{item}}</p>
</el-descriptions-item>
<el-descriptions-item label="目地端数据源">[{{updateform.targetConnectionId}}]{{targetConnection.name}}</el-descriptions-item>
<el-descriptions-item label="目地端数据源">[{{updateform.targetConnectionId}}]{{updateform.targetConnectionName}}</el-descriptions-item>
<el-descriptions-item label="目地端schema">{{updateform.targetSchema}}</el-descriptions-item>
<el-descriptions-item label="只创建表">{{updateform.targetOnlyCreate}}</el-descriptions-item>
<el-descriptions-item label="删除同名表">{{updateform.targetDropTable}}</el-descriptions-item>
<el-descriptions-item label="数据处理批次量">{{updateform.batchSize}}</el-descriptions-item>
<el-descriptions-item label="表名大小写转换">
<el-descriptions-item label="自动同步模式">
<span v-if="updateform.autoSyncMode == 2">
目标端建表并同步数据
</span>
<span v-if="updateform.autoSyncMode == 1">
目标端只创建物理表
</span>
<span v-if="updateform.autoSyncMode == 0">
目标端只同步表里数据
</span>
</el-descriptions-item>
<el-descriptions-item label="建表字段自增" v-if=" updateform.autoSyncMode!==0 ">{{updateform.targetAutoIncrement}}</el-descriptions-item>
<el-descriptions-item label="数据批次大小" v-if=" updateform.autoSyncMode!==1 ">{{updateform.batchSize}}</el-descriptions-item>
<el-descriptions-item label="表名大小写转换" v-if=" updateform.autoSyncMode!==0 ">
<span v-if="updateform.tableNameCase == 'NONE'">
无转换
</span>
@@ -414,7 +431,7 @@
转小写
</span>
</el-descriptions-item>
<el-descriptions-item label="列名大小写转换">
<el-descriptions-item label="列名大小写转换" v-if=" updateform.autoSyncMode!==0 ">
<span v-if="updateform.columnNameCase == 'NONE'">
无转换
</span>
@@ -561,6 +578,8 @@ export default {
targetConnectionId: '请选择',
targetDropTable: true,
targetOnlyCreate: false,
targetAutoIncrement: false,
autoSyncMode: 2,
targetSchema: "",
batchSize: 5000
},
@@ -703,6 +722,14 @@ export default {
).then(res => {
if (0 === res.data.code) {
let detail = res.data.data;
let varAutoSyncMode = 2;
if (detail.configuration.targetDropTable && detail.configuration.targetOnlyCreate) {
varAutoSyncMode = 1;
} else if (!detail.configuration.targetDropTable && !detail.configuration.targetOnlyCreate) {
varAutoSyncMode = 0;
} else {
varAutoSyncMode = 2;
}
this.updateform = {
id: detail.id,
name: detail.name,
@@ -710,6 +737,7 @@ export default {
scheduleMode: detail.scheduleMode,
cronExpression: detail.cronExpression,
sourceConnectionId: detail.configuration.sourceConnectionId,
sourceConnectionName: detail.configuration.sourceConnectionName,
sourceSchema: detail.configuration.sourceSchema,
tableType: detail.configuration.tableType,
includeOrExclude: detail.configuration.includeOrExclude,
@@ -719,8 +747,11 @@ export default {
tableNameCase: detail.configuration.tableNameCase,
columnNameCase: detail.configuration.columnNameCase,
targetConnectionId: detail.configuration.targetConnectionId,
targetConnectionName: detail.configuration.targetConnectionName,
targetDropTable: detail.configuration.targetDropTable,
targetOnlyCreate: detail.configuration.targetOnlyCreate,
targetAutoIncrement: detail.configuration.targetAutoIncrement,
autoSyncMode: varAutoSyncMode,
targetSchema: detail.configuration.targetSchema,
batchSize: detail.configuration.batchSize
}
@@ -958,6 +989,17 @@ export default {
},
handleSave: function () {
if (0 === this.updateform.autoSyncMode) {
this.updateform.targetDropTable = false;
this.updateform.targetOnlyCreate = false;
} else if (1 === this.updateform.autoSyncMode) {
this.updateform.targetDropTable = true;
this.updateform.targetOnlyCreate = true;
} else {
this.updateform.targetDropTable = true;
this.updateform.targetOnlyCreate = false;
}
this.$refs['updateform'].validate(valid => {
if (valid) {
this.$http({

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<artifactId>dbswitch-admin</artifactId>

View File

@@ -47,6 +47,7 @@ public class AssignmentDetailConverter extends
config.setTargetSchema(taskConfig.getTargetSchema());
config.setTargetOnlyCreate(taskConfig.getTargetOnlyCreate());
config.setTargetDropTable(taskConfig.getTargetDropTable());
config.setTargetAutoIncrement(taskConfig.getTargetAutoIncrement());
config.setTableNameCase(taskConfig.getTableNameCase());
config.setColumnNameCase(taskConfig.getColumnNameCase());
config.setTableNameMapper(taskConfig.getTableNameMap());

View File

@@ -79,6 +79,9 @@ public class AssignmentConfigEntity {
@TableField("target_only_create")
private Boolean targetOnlyCreate;
@TableField("target_auto_increment")
private Boolean targetAutoIncrement;
@TableField("batch_size")
private Integer batchSize;

View File

@@ -118,15 +118,38 @@ public class ExecuteJobTaskRunnable implements Runnable {
try {
DbswichPropertiesConfiguration properties = JsonUtils.toBeanObject(
task.getContent(), DbswichPropertiesConfiguration.class);
if (!assignmentConfigEntity.getFirstFlag()) {
if (!assignmentConfigEntity.getTargetOnlyCreate()) {
/**
* 下面通过一个三元组来控制同步的方式
* <targetDrop,onlyCreate,changeDataSync>
* <ul>
* <li>目标端建表并同步数据false,false,true</li>
* <li>目标端只创建物理表true,true,false</li>
* <li>目标端只同步表里数据false,false,true</li>
* </ul>
*/
if (!assignmentConfigEntity.getTargetDropTable() && !assignmentConfigEntity.getTargetOnlyCreate()) {
properties.getTarget().setTargetDrop(false);
properties.getTarget().setOnlyCreate(false);
properties.getTarget().setChangeDataSync(true);
} else {
if (assignmentConfigEntity.getTargetDropTable() && assignmentConfigEntity.getTargetOnlyCreate()) {
properties.getTarget().setTargetDrop(true);
properties.getTarget().setOnlyCreate(true);
properties.getTarget().setChangeDataSync(false);
} else {
if (assignmentConfigEntity.getFirstFlag()) {
// 首次同步,需要自动建表,然后全量加载数据同步
properties.getTarget().setTargetDrop(true);
properties.getTarget().setOnlyCreate(false);
properties.getTarget().setChangeDataSync(false);
} else {
// 非首次,可能无需建表了,后续执行变化数据同步
properties.getTarget().setTargetDrop(false);
properties.getTarget().setOnlyCreate(false);
properties.getTarget().setChangeDataSync(true);
}
}
if (assignmentConfigEntity.getTargetOnlyCreate()) {
properties.getTarget().setTargetDrop(true);
}
migrationService = new MigrationService(properties, readerTaskExecutor, writerTaskExecutor);
@@ -142,7 +165,6 @@ public class ExecuteJobTaskRunnable implements Runnable {
if (assignmentConfigEntity.getFirstFlag()) {
AssignmentConfigEntity config = new AssignmentConfigEntity();
config.setId(assignmentConfigEntity.getId());
config.setTargetDropTable(assignmentConfigEntity.getTargetOnlyCreate());
config.setFirstFlag(Boolean.FALSE);
assignmentConfigDAO.updateSelective(config);
}

View File

@@ -62,11 +62,11 @@ public final class LogbackAppenderRegister {
Logger jobLogger = loggerContext.getLogger(name);
jobLogger.addAppender(sa);
jobLogger.setLevel(Level.INFO);
log.info("Success add and initialize appender of logback for class{}", name);
log.info("Success add and initialize appender of logback for class: {}", name);
}
);
} catch (Exception e) {
log.error("Failed add and initialize appender of logback ,message:", e);
log.error("Failed add and initialize appender of logback, message: ", e);
}
}
}

View File

@@ -54,6 +54,7 @@ public class AssigmentCreateRequest {
private List<PatternMapper> columnNameMapper;
private Boolean targetDropTable;
private Boolean targetOnlyCreate;
private Boolean targetAutoIncrement;
private Integer batchSize;
}
@@ -93,6 +94,7 @@ public class AssigmentCreateRequest {
assignmentConfigEntity.setColumnNameMap(this.getConfig().getColumnNameMapper());
assignmentConfigEntity.setTargetDropTable(this.getConfig().getTargetDropTable());
assignmentConfigEntity.setTargetOnlyCreate(this.getConfig().getTargetOnlyCreate());
assignmentConfigEntity.setTargetAutoIncrement(this.getConfig().getTargetAutoIncrement());
assignmentConfigEntity.setBatchSize(
Objects.isNull(this.config.getBatchSize())
? 10000

View File

@@ -94,6 +94,9 @@ public class AssignmentDetailResponse {
@ApiModelProperty("是否删除同名表")
private Boolean targetDropTable;
@ApiModelProperty("是否建表允许自增字段")
private Boolean targetAutoIncrement;
@ApiModelProperty("表名大小写配置")
private CaseConvertEnum tableNameCase;

View File

@@ -28,6 +28,6 @@ public class DatabaseTypeDetailResponse {
@ApiModelProperty("驱动类")
private String driver;
@ApiModelProperty("连接串模板")
private String template;
@ApiModelProperty("连接串样例")
private String sample;
}

View File

@@ -261,7 +261,8 @@ public class AssignmentService {
TargetDataSourceProperties targetDataSourceProperties = new TargetDataSourceProperties();
DatabaseConnectionEntity targetDatabaseConnectionEntity = databaseConnectionDAO
.getById(assignmentConfigEntity.getTargetConnectionId());
File driverVersionFile = driverLoadService.getVersionDriverFile(targetDatabaseConnectionEntity.getType(),
File driverVersionFile = driverLoadService.getVersionDriverFile(
targetDatabaseConnectionEntity.getType(),
targetDatabaseConnectionEntity.getVersion());
targetDataSourceProperties.setUrl(targetDatabaseConnectionEntity.getUrl());
targetDataSourceProperties.setDriverClassName(targetDatabaseConnectionEntity.getDriver());
@@ -279,6 +280,9 @@ public class AssignmentService {
if (assignmentConfigEntity.getTargetOnlyCreate()) {
targetDataSourceProperties.setOnlyCreate(Boolean.TRUE);
}
if (assignmentConfigEntity.getTargetAutoIncrement()) {
targetDataSourceProperties.setCreateTableAutoIncrement(Boolean.TRUE);
}
targetDataSourceProperties.setTableNameCase(assignmentConfigEntity.getTableNameCase());
targetDataSourceProperties.setColumnNameCase(assignmentConfigEntity.getColumnNameCase());

View File

@@ -92,7 +92,7 @@ public class ConnectionService {
detail.setId(type.getId());
detail.setType(type.getName().toUpperCase());
detail.setDriver(type.getDriver());
detail.setTemplate(StringUtils.join(type.getUrl(), ","));
detail.setSample(type.getSample());
lists.add(detail);
}

View File

@@ -0,0 +1,2 @@
ALTER TABLE `DBSWITCH_ASSIGNMENT_CONFIG`
ADD COLUMN `target_auto_increment` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否支持自增' AFTER `target_only_create`;

View File

@@ -122,6 +122,7 @@ CREATE TABLE IF NOT EXISTS DBSWITCH_ASSIGNMENT_CONFIG (
"column_name_map" text ,
"target_drop_table" boolean not null default false,
"target_only_create" boolean not null default false,
"target_auto_increment" boolean not null default false,
"batch_size" int8 not null default 10000,
"first_flag" boolean not null default false,
"create_time" timestamp(6) not null default (CURRENT_TIMESTAMP(0))::timestamp(0) without time zone,

View File

@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>异构数据迁移工具</title><link href=/static/css/app.906a6c3f5657315caa07ea95fc5998e6.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.a3cb30a16b0734a62101.js></script><script type=text/javascript src=/static/js/vendor.12f5219d5efab3af9f2f.js></script><script type=text/javascript src=/static/js/app.c172b72687995d9daf6b.js></script></body></html>
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>异构数据迁移工具</title><link href=/static/css/app.ce2a0ebb9b7cb076901c8d6eb485cb1e.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.06f1bd4d8056b1bf28b5.js></script><script type=text/javascript src=/static/js/vendor.12f5219d5efab3af9f2f.js></script><script type=text/javascript src=/static/js/app.fc618160399ef65c30dd.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +1,2 @@
webpackJsonp([13],{"0eSS":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l={data:function(){return{loading:!0,lists:[],currentPage:1,pageSize:10,totalCount:0}},methods:{loadData:function(){var e=this;this.$http.get("/dbswitch/admin/api/v1/syslog/list/2/"+this.currentPage+"/"+this.pageSize).then(function(t){e.loading=!1,0===t.data.code?(e.currentPage=t.data.pagination.page,e.pageSize=t.data.pagination.size,e.totalCount=t.data.pagination.total,e.lists=t.data.data):alert("加载数据失败:"+t.data.message)},function(t){e.$message({showClose:!0,message:"数据加载错误",type:"error"})})},boolFormat:function(e,t){return!0===e.failed?"是":"否"},handleSizeChange:function(e){this.loading=!0,this.pageSize=e,this.loadData()},handleCurrentChange:function(e){this.loading=!0,this.currentPage=e,this.loadData()},handleDetail:function(e,t){this.$message({showClose:!0,message:"查看日志详情"+e+" "+t,type:"info"})}},created:function(){this.loadData()}},o={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{"margin-top":"15px"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.8)",data:e.lists,stripe:"",size:"small",border:""}},[a("el-table-column",{attrs:{type:"expand"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"left",inline:""}},[a("el-form-item",{attrs:{label:"日志编号:"}},[a("span",[e._v(e._s(t.row.id))])]),e._v(" "),a("el-form-item",{attrs:{label:"日志时间:"}},[a("span",[e._v(e._s(t.row.createTime))])]),e._v(" "),a("el-form-item",{attrs:{label:"操作用户:"}},[a("span",[e._v(e._s(t.row.username))])]),e._v(" "),a("el-form-item",{attrs:{label:"请求IP地址:"}},[a("span",[e._v(e._s(t.row.ipAddress))])]),e._v(" "),a("el-form-item",{attrs:{label:"操作模块:"}},[a("span",[e._v(e._s(t.row.moduleName))])]),e._v(" "),a("el-form-item",{attrs:{label:"操作描述:"}},[a("span",[e._v(e._s(t.row.content))])]),e._v(" "),a("el-form-item",{attrs:{label:"处理耗时(ms):"}},[a("span",[e._v(e._s(t.row.elapseSeconds))])]),e._v(" "),a("el-form-item",{attrs:{label:"请求路径:"}},[a("span",[e._v(e._s(t.row.urlPath))])]),e._v(" "),a("el-form-item",{attrs:{label:"异常状态:"}},[a("span",[e._v(e._s(t.row.failed))])]),e._v(" "),a("el-form-item",{attrs:{label:""}},[a("span")]),e._v(" "),a("el-form-item",{attrs:{label:"异常日志:"}},[a("el-input",{staticStyle:{"font-size":"12px",width:"700px"},attrs:{type:"textarea",autosize:{minRows:2,maxRows:5}},model:{value:t.row.exception,callback:function(a){e.$set(t.row,"exception",a)},expression:"props.row.exception"}})],1)],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"createTime",label:"日志时间","min-width":"15%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"username",label:"操作用户","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"ipAddress",label:"请求IP","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"moduleName",label:"操作类型","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"elapseSeconds",label:"耗时(ms)","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"urlPath",label:"请求路径","min-width":"20%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"failed",label:"异常",formatter:e.boolFormat,"min-width":"10%","show-overflow-tooltip":!0}})],1),e._v(" "),a("div",{staticClass:"page",attrs:{align:"right"}},[a("el-pagination",{attrs:{"current-page":e.currentPage,"page-sizes":[5,10,20,40],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)},staticRenderFns:[]};var n=a("VU/8")(l,o,!1,function(e){a("3GnV")},"data-v-aee4e92e",null);t.default=n.exports},"3GnV":function(e,t){}});
//# sourceMappingURL=13.e54b813cfde8ca750bcd.js.map
webpackJsonp([11],{"0eSS":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l={data:function(){return{loading:!0,lists:[],currentPage:1,pageSize:10,totalCount:0}},methods:{loadData:function(){var e=this;this.$http.get("/dbswitch/admin/api/v1/syslog/list/2/"+this.currentPage+"/"+this.pageSize).then(function(t){e.loading=!1,0===t.data.code?(e.currentPage=t.data.pagination.page,e.pageSize=t.data.pagination.size,e.totalCount=t.data.pagination.total,e.lists=t.data.data):alert("加载数据失败:"+t.data.message)},function(t){e.$message({showClose:!0,message:"数据加载错误",type:"error"})})},boolFormat:function(e,t){return!0===e.failed?"是":"否"},handleSizeChange:function(e){this.loading=!0,this.pageSize=e,this.loadData()},handleCurrentChange:function(e){this.loading=!0,this.currentPage=e,this.loadData()},handleDetail:function(e,t){this.$message({showClose:!0,message:"查看日志详情"+e+" "+t,type:"info"})}},created:function(){this.loadData()}},o={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{"margin-top":"15px"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.8)",data:e.lists,stripe:"",size:"small",border:""}},[a("el-table-column",{attrs:{type:"expand"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"left",inline:""}},[a("el-form-item",{attrs:{label:"日志编号:"}},[a("span",[e._v(e._s(t.row.id))])]),e._v(" "),a("el-form-item",{attrs:{label:"日志时间:"}},[a("span",[e._v(e._s(t.row.createTime))])]),e._v(" "),a("el-form-item",{attrs:{label:"操作用户:"}},[a("span",[e._v(e._s(t.row.username))])]),e._v(" "),a("el-form-item",{attrs:{label:"请求IP地址:"}},[a("span",[e._v(e._s(t.row.ipAddress))])]),e._v(" "),a("el-form-item",{attrs:{label:"操作模块:"}},[a("span",[e._v(e._s(t.row.moduleName))])]),e._v(" "),a("el-form-item",{attrs:{label:"操作描述:"}},[a("span",[e._v(e._s(t.row.content))])]),e._v(" "),a("el-form-item",{attrs:{label:"处理耗时(ms):"}},[a("span",[e._v(e._s(t.row.elapseSeconds))])]),e._v(" "),a("el-form-item",{attrs:{label:"请求路径:"}},[a("span",[e._v(e._s(t.row.urlPath))])]),e._v(" "),a("el-form-item",{attrs:{label:"异常状态:"}},[a("span",[e._v(e._s(t.row.failed))])]),e._v(" "),a("el-form-item",{attrs:{label:""}},[a("span")]),e._v(" "),a("el-form-item",{attrs:{label:"异常日志:"}},[a("el-input",{staticStyle:{"font-size":"12px",width:"700px"},attrs:{type:"textarea",autosize:{minRows:2,maxRows:5}},model:{value:t.row.exception,callback:function(a){e.$set(t.row,"exception",a)},expression:"props.row.exception"}})],1)],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"createTime",label:"日志时间","min-width":"15%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"username",label:"操作用户","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"ipAddress",label:"请求IP","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"moduleName",label:"操作类型","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"elapseSeconds",label:"耗时(ms)","min-width":"10%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"urlPath",label:"请求路径","min-width":"20%","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{prop:"failed",label:"异常",formatter:e.boolFormat,"min-width":"10%","show-overflow-tooltip":!0}})],1),e._v(" "),a("div",{staticClass:"page",attrs:{align:"right"}},[a("el-pagination",{attrs:{"current-page":e.currentPage,"page-sizes":[5,10,20,40],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)},staticRenderFns:[]};var n=a("VU/8")(l,o,!1,function(e){a("3GnV")},"data-v-aee4e92e",null);t.default=n.exports},"3GnV":function(e,t){}});
//# sourceMappingURL=11.c61c0ebee350b7e0cba3.js.map

View File

@@ -1,2 +0,0 @@
webpackJsonp([11],{WfA7:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={data:function(){return{dialogVisible:!1,loading:!0,connectionTypes:[],versionDrivers:[],isActive:-1}},methods:{loadConnectionTypes:function(){var t=this;this.$http({method:"GET",url:"/dbswitch/admin/api/v1/connection/types"}).then(function(e){0===e.data.code?(t.connectionTypes=e.data.data,t.handleChooseClick("MYSQL",0)):e.data.message&&alert("初始化数据库类型信息失败:"+e.data.message)})},handleChooseClick:function(t,e){var i=this;this.isActive=e,this.$http.get("/dbswitch/admin/api/v1/connection/"+t+"/drivers").then(function(t){0===t.data.code?i.versionDrivers=t.data.data:t.data.message&&alert("查询驱动版本信息失败,"+t.data.message)})},handleClose:function(t){this.$confirm("确认关闭?").then(function(e){t()}).catch(function(t){})},formatJarFileList:function(t,e){return t[e.property].join(";\n")}},created:function(){this.loadConnectionTypes()},beforeDestroy:function(){}},n={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("el-card",[i("div",{staticClass:"container"},[i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[t._v("数据库类型列表")])]),t._v(" "),i("div",{staticClass:"navsBox"},[i("ul",t._l(t.connectionTypes,function(e,a){return i("li",{key:a,class:{active:a==t.isActive},on:{click:function(i){return t.handleChooseClick(e.type,a)}}},[t._v("["+t._s(e.id)+"]"+t._s(e.type))])}),0)])]),t._v(" "),i("div",{staticClass:"contentBox"},[i("div",{staticStyle:{margin:"10px 5px"},attrs:{align:"right",width:"95%"}},[i("el-button",{attrs:{type:"primary",icon:"el-icon-document-add"},on:{click:function(e){t.dialogVisible=!0}}},[t._v("添加驱动")])],1),t._v(" "),i("el-table",{attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},data:t.versionDrivers,size:"small",stripe:"",border:""}},[i("template",{slot:"empty"},[i("span",[t._v("单击左侧数据库类型来查看对应的驱动版本信息")])]),t._v(" "),i("el-table-column",{attrs:{property:"driverVersion",label:"驱动版本号","min-width":"15%"}}),t._v(" "),i("el-table-column",{attrs:{property:"driverClass",label:"驱动类名","min-width":"20%"}}),t._v(" "),i("el-table-column",{attrs:{property:"jarFiles",formatter:t.formatJarFileList,label:"驱动JAR名称","min-width":"30%"}}),t._v(" "),i("el-table-column",{attrs:{property:"driverPath",label:"驱动版本路径","min-width":"50%"}})],2)],1)],1)]),t._v(" "),i("el-dialog",{attrs:{title:"添加数据库驱动JAR说明",visible:t.dialogVisible,width:"40%","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[i("span",[t._v("请按照驱动路径所在的目录${DBSWITCH_HOME}/drivers下在数据库类型为名称的目录下以驱动版本号为名称创建目录并放置对应的驱动jar文件然后重启即可生效。具体可参考https://gitee.com/inrgihc/dbswitch/tree/master/drivers下的目录结构。")]),t._v(" "),i("span"),t._v(" "),i("span",[t._v("特殊说明驱动版本目录下的所有JAR必须无任何外部依赖否则也需将其依赖JAR一起放置到对应的目录下。")]),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("确 定")])],1)])],1)},staticRenderFns:[]};var s=i("VU/8")(a,n,!1,function(t){i("ZwLs")},"data-v-de622598",null);e.default=s.exports},ZwLs:function(t,e){}});
//# sourceMappingURL=11.d12994fe5d5d243fc487.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +1,2 @@
webpackJsonp([15],{oQRv:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={data:function(){return{loading:!0,lists:[],currentPage:1,pageSize:10,totalCount:0}},methods:{loadData:function(){var t=this;this.$http.get("/dbswitch/admin/api/v1/syslog/list/1/"+this.currentPage+"/"+this.pageSize).then(function(e){t.loading=!1,0===e.data.code?(t.currentPage=e.data.pagination.page,t.pageSize=e.data.pagination.size,t.totalCount=e.data.pagination.total,t.lists=e.data.data):alert("加载数据失败:"+e.data.message)},function(e){t.$message({showClose:!0,message:"数据加载错误",type:"error"})})},handleSizeChange:function(t){this.loading=!0,this.pageSize=t,this.loadData()},handleCurrentChange:function(t){this.loading=!0,this.currentPage=t,this.loadData()}},created:function(){this.loadData()}},i={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{"margin-top":"15px"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.8)",data:t.lists,stripe:"",size:"small",border:""}},[a("el-table-column",{attrs:{prop:"createTime",label:"日志时间","min-width":"15%","show-overflow-tooltip":!0}}),t._v(" "),a("el-table-column",{attrs:{prop:"ipAddress",label:"请求IP","min-width":"10%","show-overflow-tooltip":!0}}),t._v(" "),a("el-table-column",{attrs:{prop:"content",label:"操作内容","min-width":"20%","show-overflow-tooltip":!0}}),t._v(" "),a("el-table-column",{attrs:{prop:"userAgent",label:"请求代理","min-width":"50%","show-overflow-tooltip":!0}})],1),t._v(" "),a("div",{staticClass:"page",attrs:{align:"right"}},[a("el-pagination",{attrs:{"current-page":t.currentPage,"page-sizes":[5,10,20,40],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.totalCount},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},staticRenderFns:[]};var o=a("VU/8")(n,i,!1,function(t){a("rPsM")},"data-v-86686ab2",null);e.default=o.exports},rPsM:function(t,e){}});
//# sourceMappingURL=15.9bee4f6118f9bd906375.js.map
webpackJsonp([12],{oQRv:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={data:function(){return{loading:!0,lists:[],currentPage:1,pageSize:10,totalCount:0}},methods:{loadData:function(){var t=this;this.$http.get("/dbswitch/admin/api/v1/syslog/list/1/"+this.currentPage+"/"+this.pageSize).then(function(e){t.loading=!1,0===e.data.code?(t.currentPage=e.data.pagination.page,t.pageSize=e.data.pagination.size,t.totalCount=e.data.pagination.total,t.lists=e.data.data):alert("加载数据失败:"+e.data.message)},function(e){t.$message({showClose:!0,message:"数据加载错误",type:"error"})})},handleSizeChange:function(t){this.loading=!0,this.pageSize=t,this.loadData()},handleCurrentChange:function(t){this.loading=!0,this.currentPage=t,this.loadData()}},created:function(){this.loadData()}},i={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{"margin-top":"15px"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.8)",data:t.lists,stripe:"",size:"small",border:""}},[a("el-table-column",{attrs:{prop:"createTime",label:"日志时间","min-width":"15%","show-overflow-tooltip":!0}}),t._v(" "),a("el-table-column",{attrs:{prop:"ipAddress",label:"请求IP","min-width":"10%","show-overflow-tooltip":!0}}),t._v(" "),a("el-table-column",{attrs:{prop:"content",label:"操作内容","min-width":"20%","show-overflow-tooltip":!0}}),t._v(" "),a("el-table-column",{attrs:{prop:"userAgent",label:"请求代理","min-width":"50%","show-overflow-tooltip":!0}})],1),t._v(" "),a("div",{staticClass:"page",attrs:{align:"right"}},[a("el-pagination",{attrs:{"current-page":t.currentPage,"page-sizes":[5,10,20,40],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.totalCount},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},staticRenderFns:[]};var o=a("VU/8")(n,i,!1,function(t){a("rPsM")},"data-v-86686ab2",null);e.default=o.exports},rPsM:function(t,e){}});
//# sourceMappingURL=12.e59d78e330bd5e2703c1.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
webpackJsonp([17],{AbLW:function(t,e){},WfA7:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={data:function(){return{dialogVisible:!1,loading:!0,connectionTypes:[],versionDrivers:[],isActive:-1}},methods:{loadConnectionTypes:function(){var t=this;this.$http({method:"GET",url:"/dbswitch/admin/api/v1/connection/types"}).then(function(e){0===e.data.code?(t.connectionTypes=e.data.data,t.handleChooseClick("MYSQL",0)):e.data.message&&alert("初始化数据库类型信息失败:"+e.data.message)})},handleChooseClick:function(t,e){var i=this;this.isActive=e,this.$http.get("/dbswitch/admin/api/v1/connection/"+t+"/drivers").then(function(t){0===t.data.code?i.versionDrivers=t.data.data:t.data.message&&alert("查询驱动版本信息失败,"+t.data.message)})},handleClose:function(t){this.$confirm("确认关闭?").then(function(e){t()}).catch(function(t){})},formatJarFileList:function(t,e){return t[e.property].join(";\n")}},created:function(){this.loadConnectionTypes()},beforeDestroy:function(){}},n={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("el-card",[i("div",{staticClass:"container"},[i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[t._v("数据库类型列表")])]),t._v(" "),i("div",{staticClass:"navsBox"},[i("ul",t._l(t.connectionTypes,function(e,a){return i("li",{key:a,class:{active:a==t.isActive},on:{click:function(i){return t.handleChooseClick(e.type,a)}}},[t._v("["+t._s(e.id)+"]"+t._s(e.type))])}),0)])]),t._v(" "),i("div",{staticClass:"contentBox"},[i("div",{staticStyle:{margin:"10px 5px"},attrs:{align:"right",width:"95%"}},[i("el-button",{attrs:{type:"primary",size:"mini",icon:"el-icon-document-add"},on:{click:function(e){t.dialogVisible=!0}}},[t._v("添加")])],1),t._v(" "),i("el-table",{attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},data:t.versionDrivers,size:"small",stripe:"",border:""}},[i("template",{slot:"empty"},[i("span",[t._v("单击左侧数据库类型来查看对应的驱动版本信息")])]),t._v(" "),i("el-table-column",{attrs:{property:"driverVersion",label:"驱动版本号","min-width":"15%"}}),t._v(" "),i("el-table-column",{attrs:{property:"driverClass",label:"驱动类名","min-width":"20%"}}),t._v(" "),i("el-table-column",{attrs:{property:"jarFiles",formatter:t.formatJarFileList,label:"驱动JAR名称","min-width":"30%"}}),t._v(" "),i("el-table-column",{attrs:{property:"driverPath",label:"驱动版本路径","min-width":"50%"}})],2)],1)],1)]),t._v(" "),i("el-dialog",{attrs:{title:"添加数据库驱动JAR说明",visible:t.dialogVisible,width:"40%","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[i("span",[t._v("请按照驱动路径所在的目录${DBSWITCH_HOME}/drivers下在数据库类型为名称的目录下以驱动版本号为名称创建目录并放置对应的驱动jar文件然后重启即可生效。具体可参考https://gitee.com/inrgihc/dbswitch/tree/master/drivers下的目录结构。")]),t._v(" "),i("span"),t._v(" "),i("span",[t._v("特殊说明驱动版本目录下的所有JAR必须无任何外部依赖否则也需将其依赖JAR一起放置到对应的目录下。")]),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("确 定")])],1)])],1)},staticRenderFns:[]};var s=i("VU/8")(a,n,!1,function(t){i("AbLW")},"data-v-3bedb500",null);e.default=s.exports}});
//# sourceMappingURL=17.4c01d3a82006113dd8bb.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +1,2 @@
webpackJsonp([20],{NHnr:function(n,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=t("//Fk"),r=t.n(o),a=t("7+uW"),c={render:function(){var n=this.$createElement,e=this._self._c||n;return e("div",{staticClass:"body-wrapper"},[e("router-view")],1)},staticRenderFns:[]};var i=t("VU/8")({name:"App"},c,!1,function(n){t("Pibb")},"data-v-a97617c2",null).exports,u=t("/ocq");a.default.use(u.a);var l=new u.a({routes:[{path:"/",name:"首页",component:function(){return t.e(4).then(t.bind(null,"4er+"))},redirect:"/dashboard",children:[{path:"/dashboard",name:"概览",icon:"el-icon-menu",component:function(){return Promise.all([t.e(0),t.e(9)]).then(t.bind(null,"ARoL"))}},{path:"/connection",name:"连接配置",icon:"el-icon-s-order",component:function(){return t.e(8).then(t.bind(null,"Hoc+"))},children:[{path:"/connection/driver",name:"驱动配置",icon:"el-icon-help",component:function(){return t.e(11).then(t.bind(null,"WfA7"))}},{path:"/connection/list",name:"连接管理",icon:"el-icon-bank-card",component:function(){return Promise.all([t.e(0),t.e(16)]).then(t.bind(null,"qdtB"))}}]},{path:"/metadata",name:"数据目录",icon:"el-icon-coin",component:function(){return t.e(1).then(t.bind(null,"PJ2q"))}},{path:"/task",name:"任务管理",icon:"el-icon-s-tools",component:function(){return t.e(6).then(t.bind(null,"4KEO"))},children:[{path:"/task/assignment",name:"任务安排",icon:"el-icon-eleme",component:function(){return Promise.all([t.e(0),t.e(10)]).then(t.bind(null,"D0I9"))}},{path:"/task/schedule",name:"调度记录",icon:"el-icon-pie-chart",component:function(){return Promise.all([t.e(0),t.e(12)]).then(t.bind(null,"mKp/"))}}]},{path:"/log",name:"审计日志",icon:"el-icon-platform-eleme",component:function(){return t.e(7).then(t.bind(null,"QWih"))},children:[{path:"/log/access",name:"登录日志",icon:"el-icon-place",component:function(){return t.e(15).then(t.bind(null,"oQRv"))}},{path:"/log/action",name:"操作日志",icon:"el-icon-s-check",component:function(){return t.e(13).then(t.bind(null,"0eSS"))}}]},{path:"/about",name:"关于系统",icon:"el-icon-s-custom",component:function(){return t.e(2).then(t.bind(null,"m25N"))}},{path:"/user/personal",name:"个人中心",hidden:!0,component:function(){return t.e(3).then(t.bind(null,"uTKz"))}},{path:"/task/create",name:"创建任务",hidden:!0,component:function(){return Promise.all([t.e(0),t.e(18)]).then(t.bind(null,"/rCC"))}},{path:"/task/update",name:"修改任务",hidden:!0,component:function(){return Promise.all([t.e(0),t.e(17)]).then(t.bind(null,"txod"))}},{path:"/task/detail",name:"查看任务",hidden:!0,component:function(){return t.e(14).then(t.bind(null,"nrt7"))}}]},{path:"/login",name:"登录",component:function(){return t.e(5).then(t.bind(null,"T+/8"))}}]}),p=t("mtWM"),d=t.n(p).a.create();d.interceptors.request.use(function(n){return n.url=""+n.url,n});var s=d,h=t("zL8q"),m=t.n(h),f=(t("muQq"),t("tvR6"),t("7Vno")),b=t.n(f),v=t("XLwt"),k=t.n(v);a.default.use(s),a.default.use(m.a),a.default.use(b.a),a.default.prototype.$http=s,a.default.config.productionTip=!1,a.default.prototype.$echarts=k.a,s.interceptors.request.use(function(n){var e=sessionStorage.getItem("token");return e&&(n.headers.Authorization="Bearer "+e),n},function(n){return r.a.reject(n)}),s.interceptors.response.use(function(n){return!n.data||401!==n.data.code&&403!==n.data.code&&404!==n.data.code||l.push({path:"/login"}),n},function(n){return console.log(n),r.a.reject(n.response)}),new a.default({el:"#app",router:l,components:{App:i},template:"<App/>"})},Pibb:function(n,e){},muQq:function(n,e){},tvR6:function(n,e){}},["NHnr"]);
//# sourceMappingURL=app.c172b72687995d9daf6b.js.map
webpackJsonp([20],{NHnr:function(n,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=t("//Fk"),r=t.n(o),a=t("7+uW"),c={render:function(){var n=this.$createElement,e=this._self._c||n;return e("div",{staticClass:"body-wrapper"},[e("router-view")],1)},staticRenderFns:[]};var i=t("VU/8")({name:"App"},c,!1,function(n){t("Pibb")},"data-v-a97617c2",null).exports,u=t("/ocq");a.default.use(u.a);var l=new u.a({routes:[{path:"/",name:"首页",component:function(){return t.e(4).then(t.bind(null,"4er+"))},redirect:"/dashboard",children:[{path:"/dashboard",name:"概览",icon:"el-icon-menu",component:function(){return Promise.all([t.e(0),t.e(9)]).then(t.bind(null,"ARoL"))}},{path:"/connection",name:"连接配置",icon:"el-icon-s-order",component:function(){return t.e(8).then(t.bind(null,"Hoc+"))},children:[{path:"/connection/driver",name:"驱动配置",icon:"el-icon-help",component:function(){return t.e(17).then(t.bind(null,"WfA7"))}},{path:"/connection/list",name:"连接管理",icon:"el-icon-bank-card",component:function(){return Promise.all([t.e(0),t.e(15)]).then(t.bind(null,"qdtB"))}}]},{path:"/metadata",name:"数据目录",icon:"el-icon-coin",component:function(){return t.e(1).then(t.bind(null,"PJ2q"))}},{path:"/task",name:"任务管理",icon:"el-icon-s-tools",component:function(){return t.e(6).then(t.bind(null,"4KEO"))},children:[{path:"/task/assignment",name:"任务安排",icon:"el-icon-eleme",component:function(){return Promise.all([t.e(0),t.e(18)]).then(t.bind(null,"D0I9"))}},{path:"/task/schedule",name:"调度记录",icon:"el-icon-pie-chart",component:function(){return Promise.all([t.e(0),t.e(10)]).then(t.bind(null,"mKp/"))}}]},{path:"/log",name:"审计日志",icon:"el-icon-platform-eleme",component:function(){return t.e(7).then(t.bind(null,"QWih"))},children:[{path:"/log/access",name:"登录日志",icon:"el-icon-place",component:function(){return t.e(12).then(t.bind(null,"oQRv"))}},{path:"/log/action",name:"操作日志",icon:"el-icon-s-check",component:function(){return t.e(11).then(t.bind(null,"0eSS"))}}]},{path:"/about",name:"关于系统",icon:"el-icon-s-custom",component:function(){return t.e(2).then(t.bind(null,"m25N"))}},{path:"/user/personal",name:"个人中心",hidden:!0,component:function(){return t.e(3).then(t.bind(null,"uTKz"))}},{path:"/task/create",name:"创建任务",hidden:!0,component:function(){return Promise.all([t.e(0),t.e(13)]).then(t.bind(null,"/rCC"))}},{path:"/task/update",name:"修改任务",hidden:!0,component:function(){return Promise.all([t.e(0),t.e(14)]).then(t.bind(null,"txod"))}},{path:"/task/detail",name:"查看任务",hidden:!0,component:function(){return t.e(16).then(t.bind(null,"nrt7"))}}]},{path:"/login",name:"登录",component:function(){return t.e(5).then(t.bind(null,"T+/8"))}}]}),p=t("mtWM"),d=t.n(p).a.create();d.interceptors.request.use(function(n){return n.url=""+n.url,n});var s=d,h=t("zL8q"),m=t.n(h),f=(t("muQq"),t("tvR6"),t("7Vno")),b=t.n(f),v=t("XLwt"),k=t.n(v);a.default.use(s),a.default.use(m.a),a.default.use(b.a),a.default.prototype.$http=s,a.default.config.productionTip=!1,a.default.prototype.$echarts=k.a,s.interceptors.request.use(function(n){var e=sessionStorage.getItem("token");return e&&(n.headers.Authorization="Bearer "+e),n},function(n){return r.a.reject(n)}),s.interceptors.response.use(function(n){return!n.data||401!==n.data.code&&403!==n.data.code&&404!==n.data.code||l.push({path:"/login"}),n},function(n){return console.log(n),r.a.reject(n.response)}),new a.default({el:"#app",router:l,components:{App:i},template:"<App/>"})},Pibb:function(n,e){},muQq:function(n,e){},tvR6:function(n,e){}},["NHnr"]);
//# sourceMappingURL=app.fc618160399ef65c30dd.js.map

View File

@@ -0,0 +1,2 @@
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,a,o){for(var d,f,i,u=0,s=[];u<r.length;u++)f=r[u],t[f]&&s.push(t[f][0]),t[f]=0;for(d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d]);for(n&&n(r,a,o);s.length;)s.shift()();if(o)for(u=0;u<o.length;u++)i=c(c.s=o[u]);return i};var r={},t={21:0};function c(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,c),t.l=!0,t.exports}c.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,c){n=t[e]=[r,c]});n[2]=r;var a=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.timeout=12e4,c.nc&&o.setAttribute("nonce",c.nc),o.src=c.p+"static/js/"+e+"."+{0:"ca67e87d8c000a42e592",1:"8b052e0e6a9c6db6ca0f",2:"e6a396586260b6dc43a2",3:"3bad9aaf46ce9329fd19",4:"880c74c2473cd4493cad",5:"837a4a67f1fcf6ee6c6a",6:"7f56c2238fb7e4ee2ecd",7:"d5dc80a855f66a3208ff",8:"0b82703c6f3d2dd72354",9:"9b19245845e7fa49300a",10:"3ded61c33158be9eb6b4",11:"c61c0ebee350b7e0cba3",12:"e59d78e330bd5e2703c1",13:"22d831c1c0f31fd6552c",14:"65aae17758fd2d000d9a",15:"e3875ce9a863a129e085",16:"4679c2a57016dd90c37c",17:"4c01d3a82006113dd8bb",18:"3a72191a815e2121a587"}[e]+".js";var d=setTimeout(f,12e4);function f(){o.onerror=o.onload=null,clearTimeout(d);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return o.onerror=o.onload=f,a.appendChild(o),r},c.m=e,c.c=r,c.d=function(e,n,r){c.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},c.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(n,"a",n),n},c.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},c.p="/",c.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.06f1bd4d8056b1bf28b5.js.map

View File

@@ -1,2 +0,0 @@
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,o){for(var f,d,i,u=0,b=[];u<r.length;u++)d=r[u],t[d]&&b.push(t[d][0]),t[d]=0;for(f in c)Object.prototype.hasOwnProperty.call(c,f)&&(e[f]=c[f]);for(n&&n(r,c,o);b.length;)b.shift()();if(o)for(u=0;u<o.length;u++)i=a(a.s=o[u]);return i};var r={},t={21:0};function a(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,a){n=t[e]=[r,a]});n[2]=r;var c=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.timeout=12e4,a.nc&&o.setAttribute("nonce",a.nc),o.src=a.p+"static/js/"+e+"."+{0:"ca67e87d8c000a42e592",1:"d0db995e4146b5e72cf1",2:"e6a396586260b6dc43a2",3:"3bad9aaf46ce9329fd19",4:"880c74c2473cd4493cad",5:"837a4a67f1fcf6ee6c6a",6:"7f56c2238fb7e4ee2ecd",7:"d5dc80a855f66a3208ff",8:"0b82703c6f3d2dd72354",9:"9b19245845e7fa49300a",10:"3530c3f0bd3fdedb5492",11:"d12994fe5d5d243fc487",12:"046be1d02d3f1f4a1e07",13:"e54b813cfde8ca750bcd",14:"71a1ab6e90c782ca2323",15:"9bee4f6118f9bd906375",16:"1a91045b0cbe75b69b72",17:"aaacaa9b02255a86da33",18:"2b4be75078cee70fa6b9"}[e]+".js";var f=setTimeout(d,12e4);function d(){o.onerror=o.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return o.onerror=o.onload=d,c.appendChild(o),r},a.m=e,a.c=r,a.d=function(e,n,r){a.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},a.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(n,"a",n),n},a.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},a.p="/",a.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.a3cb30a16b0734a62101.js.map

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<artifactId>dbswitch-common</artifactId>

View File

@@ -29,7 +29,8 @@ public enum ProductTypeEnum {
MYSQL(1, "`", "mysql", "com.mysql.jdbc.Driver", 3306,
"/* ping */ SELECT 1",
"jdbc:mysql://",
new String[]{"jdbc:mysql://{host}[:{port}]/[{database}][\\?{params}]"}),
new String[]{"jdbc:mysql://{host}[:{port}]/[{database}][\\?{params}]"},
"jdbc:mysql://172.17.2.10:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai&tinyInt1isBit=false&rewriteBatchedStatements=true&useCompression=true"),
/**
* MariaDB数据库类型
@@ -37,7 +38,8 @@ public enum ProductTypeEnum {
MARIADB(2, "`", "mariadb", "org.mariadb.jdbc.Driver", 3306,
"SELECT 1",
"jdbc:mariadb://",
new String[]{"jdbc:mariadb://{host}[:{port}]/[{database}][\\?{params}]"}),
new String[]{"jdbc:mariadb://{host}[:{port}]/[{database}][\\?{params}]"},
"jdbc:mariadb://172.17.2.10:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai&tinyInt1isBit=false&rewriteBatchedStatements=true&useCompression=true"),
/**
* Oracle数据库类型
@@ -46,7 +48,8 @@ public enum ProductTypeEnum {
"SELECT 'Hello' from DUAL",
"jdbc:oracle:thin:@",
new String[]{"jdbc:oracle:thin:@{host}:{port}:{database}",
"jdbc:oracle:thin:@//{host}[:{port}]/{database}"}),
"jdbc:oracle:thin:@//{host}[:{port}]/{database}"},
"jdbc:oracle:thin:@172.17.2.10:1521:ORCL"),
/**
* Microsoft SQL Server数据库类型(>=2005)
@@ -54,7 +57,8 @@ public enum ProductTypeEnum {
SQLSERVER(4, "\"", "sqlserver", "com.microsoft.sqlserver.jdbc.SQLServerDriver", 1433,
"SELECT 1+2 as a",
"jdbc:sqlserver://",
new String[]{"jdbc:sqlserver://{host}[:{port}][;DatabaseName={database}][;{params}]"}),
new String[]{"jdbc:sqlserver://{host}[:{port}][;DatabaseName={database}][;{params}]"},
"jdbc:sqlserver://172.17.2.10:1433;DatabaseName=test"),
/**
* PostgreSQL数据库类型
@@ -62,7 +66,8 @@ public enum ProductTypeEnum {
POSTGRESQL(5, "\"", "postgresql", "org.postgresql.Driver", 5432,
"SELECT 1",
"jdbc:postgresql://",
new String[]{"jdbc:postgresql://{host}[:{port}]/[{database}][\\?{params}]"}),
new String[]{"jdbc:postgresql://{host}[:{port}]/[{database}][\\?{params}]"},
"jdbc:postgresql://172.17.2.10:5432/test"),
/**
* DB2数据库类型
@@ -70,7 +75,8 @@ public enum ProductTypeEnum {
DB2(6, "\"", "db2", "com.ibm.db2.jcc.DB2Driver", 50000,
"SELECT 1 FROM SYSIBM.SYSDUMMY1",
"jdbc:db2://",
new String[]{"jdbc:db2://{host}:{port}/{database}[:{params}]"}),
new String[]{"jdbc:db2://{host}:{port}/{database}[:{params}]"},
"jdbc:db2://172.17.2.10:50000/testdb:driverType=4;fullyMaterializeLobData=true;fullyMaterializeInputStreams=true;progressiveStreaming=2;progresssiveLocators=2;"),
/**
* [国产] 达梦(DM)数据库类型
@@ -78,7 +84,8 @@ public enum ProductTypeEnum {
DM(7, "\"", "dm", "dm.jdbc.driver.DmDriver", 5236,
"SELECT 'Hello' from DUAL",
"jdbc:dm://",
new String[]{"jdbc:dm://{host}:{port}[/{database}][\\?{params}]"}),
new String[]{"jdbc:dm://{host}:{port}[/{database}][\\?{params}]"},
"jdbc:dm://172.17.2.10:5236"),
/**
* [国产] 金仓(Kingbase)数据库类型
@@ -86,7 +93,8 @@ public enum ProductTypeEnum {
KINGBASE(8, "\"", "kingbase", "com.kingbase8.Driver", 54321,
"SELECT 1",
"jdbc:kingbase8://",
new String[]{"jdbc:kingbase8://{host}[:{port}]/[{database}][\\?{params}]"}),
new String[]{"jdbc:kingbase8://{host}[:{port}]/[{database}][\\?{params}]"},
"jdbc:kingbase8://172.17.2.10:54321/test"),
/**
* [国产] 神通(Oscar)数据库类型
@@ -94,7 +102,8 @@ public enum ProductTypeEnum {
OSCAR(9, "\"", "oscar", "com.oscar.Driver", 2003,
"SELECT 1",
"jdbc:oscar://",
new String[]{"jdbc:oscar://{host}[:{port}]/[{database}][\\?{params}]"}),
new String[]{"jdbc:oscar://{host}[:{port}]/[{database}][\\?{params}]"},
"jdbc:oscar://172.17.2.10:2003/OSCRDB"),
/**
* [国产] 南大通用(GBase8A)数据库类型
@@ -102,7 +111,8 @@ public enum ProductTypeEnum {
GBASE8A(10, "`", "gbase8a", "com.gbase.jdbc.Driver", 5258,
"/* ping */ SELECT 1",
"jdbc:gbase://",
new String[]{"jdbc:gbase://{host}[:{port}]/[{database}][\\?{params}]"}),
new String[]{"jdbc:gbase://{host}[:{port}]/[{database}][\\?{params}]"},
"jdbc:gbase://172.17.2.10:5258/test"),
/**
* Sybase 数据库类型
@@ -110,7 +120,8 @@ public enum ProductTypeEnum {
SYBASE(11, "\"", "sybase", "com.sybase.jdbc4.jdbc.SybDriver", 5000,
"SELECT 1+2 as a",
"jdbc:sybase:Tds:",
new String[]{"jdbc:sybase:Tds:{host}[:{port}][/{database}][\\?{params}]"}),
new String[]{"jdbc:sybase:Tds:{host}[:{port}][/{database}][\\?{params}]"},
"jdbc:sybase:Tds:172.17.2.10:5000/test?charset=cp936"),
/**
* Hive 数据库类型
@@ -118,7 +129,8 @@ public enum ProductTypeEnum {
HIVE(12, "`", "hive", "org.apache.hive.jdbc.HiveDriver", 10000,
"SELECT 1",
"jdbc:hive2://",
new String[]{"jdbc:hive2://{host}[:{port}]/[{database}][\\?{params}]"}),
new String[]{"jdbc:hive2://{host}[:{port}]/[{database}][\\?{params}]"},
"jdbc:hive2://172.17.2.12:10000/default"),
/**
* Sqlite v3数据库类型
@@ -127,7 +139,8 @@ public enum ProductTypeEnum {
SQLITE3(13, "\"", "sqlite3", "org.sqlite.JDBC", 0,
"SELECT 1",
"jdbc:sqlite:",
new String[]{"jdbc:sqlite:{file}", "jdbc:sqlite::resource:{file}"}),
new String[]{"jdbc:sqlite:{file}", "jdbc:sqlite::resource:{file}"},
"jdbc:sqlite:/tmp/test.db"),
/**
* OpenGauss数据库类型
@@ -135,7 +148,8 @@ public enum ProductTypeEnum {
OPENGAUSS(14, "\"", "opengauss", "org.opengauss.Driver", 15432,
"SELECT 1",
"jdbc:opengauss://",
new String[]{"jdbc:opengauss://{host}[:{port}]/[{database}][\\?{params}]"}),
new String[]{"jdbc:opengauss://{host}[:{port}]/[{database}][\\?{params}]"},
"jdbc:opengauss://172.17.2.10:5866/test"),
/**
* ClickHouse数据库类型
@@ -143,7 +157,8 @@ public enum ProductTypeEnum {
CLICKHOUSE(15, "`", "clickhouse", "com.clickhouse.jdbc.ClickHouseDriver", 8123,
"SELECT 1",
"jdbc:clickhouse://",
new String[]{"jdbc:clickhouse://{host}[:{port}]/[{database}][\\?{params}]"}),
new String[]{"jdbc:clickhouse://{host}[:{port}]/[{database}][\\?{params}]"},
"jdbc:clickhouse://172.17.2.10:8123/default"),
/**
* MongoDB数据库类型
@@ -151,7 +166,8 @@ public enum ProductTypeEnum {
MONGODB(16, "\"", "mongoDB", "com.gitee.jdbc.mongodb.JdbcDriver", 27017,
"use admin;",
"jdbc:mongodb://",
new String[]{"jdbc:mongodb://{host}[:{port}]/[{database}][\\?{params}]"}),
new String[]{"jdbc:mongodb://{host}[:{port}]/[{database}][\\?{params}]"},
"jdbc:mongodb://172.17.2.12:27017/admin?authSource=admin&authMechanism=SCRAM-SHA-1"),
;
private int id;
@@ -162,6 +178,7 @@ public enum ProductTypeEnum {
private String sql;
private String urlPrefix;
private String[] url;
private String sample;
public boolean hasDatabaseName() {
return !Arrays.asList(DM, SQLITE3, MYSQL, MARIADB, GBASE8A).contains(this);

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<artifactId>dbswitch-core</artifactId>

View File

@@ -26,6 +26,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
@@ -220,21 +221,18 @@ public final class DefaultChangeCalculatorService implements RecordRowChangeCalc
if (log.isDebugEnabled()) {
log.debug("###### Query data from two table now");
}
if (null != checkInterrupt) {
checkInterrupt.run();
}
Optional.ofNullable(checkInterrupt).ifPresent(Runnable::run);
rsold = oldQuery
.queryTableData(task.getOldSchemaName(), task.getOldTableName(),
mappedQueryFieldColumn, fieldsMappedPrimaryKeyNew);
if (null != checkInterrupt) {
checkInterrupt.run();
}
Optional.ofNullable(checkInterrupt).ifPresent(Runnable::run);
rsnew = newQuery
.queryTableData(task.getNewSchemaName(), task.getNewTableName(),
queryFieldColumn, fieldsPrimaryKeyNew);
if (null != checkInterrupt) {
checkInterrupt.run();
}
Optional.ofNullable(checkInterrupt).ifPresent(Runnable::run);
ResultSetMetaData metaData = rsnew.getResultSet().getMetaData();
if (log.isDebugEnabled()) {
@@ -301,9 +299,7 @@ public final class DefaultChangeCalculatorService implements RecordRowChangeCalc
log.debug("###### Enter CDC calculate now");
}
if (null != checkInterrupt) {
checkInterrupt.run();
}
Optional.ofNullable(checkInterrupt).ifPresent(Runnable::run);
RecordTransformProvider transformer = task.getTransformer();
@@ -314,9 +310,7 @@ public final class DefaultChangeCalculatorService implements RecordRowChangeCalc
Object[] two = transformer.doTransform(task.getNewSchemaName(), task.getNewTableName(),
queryFieldColumn, getRowData(rsnew.getResultSet()));
while (true) {
if (null != checkInterrupt) {
checkInterrupt.run();
}
Optional.ofNullable(checkInterrupt).ifPresent(Runnable::run);
if (one == null && two == null) {
break;
} else if (one == null && two != null) {

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<artifactId>dbswitch-data</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<artifactId>dbswitch-dist</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>dbswitch-product</artifactId>
<groupId>com.gitee.dbswitch</groupId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>dbswitch-product</artifactId>
<groupId>com.gitee.dbswitch</groupId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>dbswitch-product</artifactId>
<groupId>com.gitee.dbswitch</groupId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dbswitch-product-dm</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>dbswitch-product</artifactId>
<groupId>com.gitee.dbswitch</groupId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>dbswitch-product</artifactId>
<groupId>com.gitee.dbswitch</groupId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>dbswitch-product</artifactId>
<groupId>com.gitee.dbswitch</groupId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>dbswitch-product</artifactId>
<groupId>com.gitee.dbswitch</groupId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>dbswitch-product</artifactId>
<groupId>com.gitee.dbswitch</groupId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dbswitch-product-mongodb</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>dbswitch-product</artifactId>
<groupId>com.gitee.dbswitch</groupId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dbswitch-product-mysql</artifactId>

View File

@@ -19,7 +19,6 @@ import com.gitee.dbswitch.schema.TableDescription;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
@@ -37,9 +36,10 @@ public class MysqlMetadataQueryProvider extends AbstractMetadataProvider {
private static final String SHOW_CREATE_VIEW_SQL = "SHOW CREATE VIEW `%s`.`%s` ";
private static final String QUERY_TABLE_LIST_SQL =
"SELECT `TABLE_SCHEMA`,`TABLE_NAME`,`TABLE_TYPE`,`TABLE_COMMENT` "
+ "FROM `information_schema`.`TABLES` where `TABLE_SCHEMA`= ? ";
private static final String QUERY_TABLE_COMMENT_SQL =
"SELECT TABLE_COMMENT from information_schema.`TABLES` where TABLE_SCHEMA = ? and TABLE_NAME = ?";
+ "FROM `information_schema`.`TABLES` WHERE `TABLE_SCHEMA`= ? ";
private static final String QUERY_TABLE_METADATA_SQL =
"SELECT `TABLE_COMMENT`,`TABLE_TYPE` FROM `information_schema`.`TABLES` "
+ "WHERE `TABLE_SCHEMA` = ? AND `TABLE_NAME` = ?";
public MysqlMetadataQueryProvider(ProductFactoryProvider factoryProvider) {
super(factoryProvider);
@@ -88,7 +88,7 @@ public class MysqlMetadataQueryProvider extends AbstractMetadataProvider {
@Override
public TableDescription queryTableMeta(Connection connection, String schemaName, String tableName) {
try (PreparedStatement ps = connection.prepareStatement(QUERY_TABLE_COMMENT_SQL)) {
try (PreparedStatement ps = connection.prepareStatement(QUERY_TABLE_METADATA_SQL)) {
ps.setString(1, schemaName);
ps.setString(2, tableName);
try (ResultSet rs = ps.executeQuery();) {
@@ -97,7 +97,14 @@ public class MysqlMetadataQueryProvider extends AbstractMetadataProvider {
td.setSchemaName(schemaName);
td.setTableName(tableName);
td.setRemarks(rs.getString(1));
String tableType = rs.getString(2);
if (tableType.equalsIgnoreCase("VIEW")) {
td.setTableType("VIEW");
} else {
td.setTableType("TABLE");
}
return td;
}
return null;
@@ -326,7 +333,7 @@ public class MysqlMetadataQueryProvider extends AbstractMetadataProvider {
retval += "LONGBLOB";
break;
default:
retval += " LONGTEXT";
retval += "LONGTEXT";
break;
}

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>dbswitch-product</artifactId>
<groupId>com.gitee.dbswitch</groupId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>dbswitch-product</artifactId>
<groupId>com.gitee.dbswitch</groupId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>dbswitch-product</artifactId>
<groupId>com.gitee.dbswitch</groupId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>dbswitch-product</artifactId>
<groupId>com.gitee.dbswitch</groupId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>dbswitch-product</artifactId>
<groupId>com.gitee.dbswitch</groupId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -138,10 +138,14 @@ public class SqliteMetadataQueryProvider extends AbstractMetadataProvider {
break;
case ColumnMetaData.TYPE_STRING:
if (length < 1 || length >= Constants.CLOB_LENGTH) {
retval += "BLOB";
retval += "TEXT";
} else {
if (length <= 2000) {
retval += "VARCHAR(" + length + ")";
} else {
retval += "TEXT";
}
}
break;
case ColumnMetaData.TYPE_BINARY:
retval += "BLOB";

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>dbswitch-product</artifactId>
<groupId>com.gitee.dbswitch</groupId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>dbswitch-product</artifactId>
<groupId>com.gitee.dbswitch</groupId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>dbswitch-product</artifactId>
<groupId>com.gitee.dbswitch</groupId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>dbswitch-parent</artifactId>
<groupId>com.gitee.dbswitch</groupId>
<version>1.9.1</version>
<version>1.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dbswitch-product</artifactId>

View File

@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.9.1</version>
<version>1.9.2</version>
<packaging>pom</packaging>
<name>dbswitch</name>
<description>database switch project</description>

View File

@@ -1,6 +1,6 @@
@echo off
set APP_VERSION=1.9.1
set APP_VERSION=1.9.2
echo "Clean Project ..."
call mvn clean -f pom.xml