version for 1.6.14 : support sybase

This commit is contained in:
inrgihc
2022-08-06 00:04:16 +08:00
parent b5c3f3f958
commit 31dd8e38d1
62 changed files with 462 additions and 75 deletions

View File

@@ -24,23 +24,23 @@
### 3、详细功能
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为Greenplum/PostgreSQL/HighGo的迁移(**支持绝大多数常规类型字段**)
- 源端oracle/SqlServer/Sybase/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为Greenplum/PostgreSQL/HighGo的迁移(**支持绝大多数常规类型字段**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为Oracle的迁移(**支持绝大多数常规类型字段**)
- 源端oracle/SqlServer/Sybase/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为Oracle的迁移(**支持绝大多数常规类型字段**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为SQLServer的迁移(**字段类型兼容测试中...**)
- 源端oracle/SqlServer/Sybase/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为SQLServer/Sybase的迁移(**字段类型兼容测试中...**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为MySQL/MariaDB/GBase8a的迁移(**字段类型兼容测试中...**)
- 源端oracle/SqlServer/Sybase/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为MySQL/MariaDB/GBase8a的迁移(**字段类型兼容测试中...**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为DB2的迁移(**字段类型兼容测试中...**)
- 源端oracle/SqlServer/Sybase/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为DB2的迁移(**字段类型兼容测试中...**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为Kingbase8的迁移(**支持绝大多数常规类型字段...**)
- 源端oracle/SqlServer/Sybase/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为Kingbase8的迁移(**支持绝大多数常规类型字段...**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为DM的迁移(**支持绝大多数常规类型字段**)
- 源端oracle/SqlServer/Sybase/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为DM的迁移(**支持绝大多数常规类型字段**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为OSCAR的迁移(**支持绝大多数常规类型字段**)
- 源端oracle/SqlServer/Sybase/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为OSCAR的迁移(**支持绝大多数常规类型字段**)
- 源端oracle/SqlServer/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为SQLite的迁移(**支持部分常规类型字段...**)
- 源端oracle/SqlServer/Sybase/MySQL/MariaDB/PostgreSQL/DB2/DM/OSCAR/Kingbase8/GBase8a/HighGo/Hive/SQLite向目的端为SQLite的迁移(**支持部分常规类型字段...**)
** 注:** 目前Hive只支持Hive version 3.x的账号密码方式认证。
@@ -217,14 +217,14 @@ dbswitch:
**MySQL/MariaDB数据库**
```
jdbc连接地址jdbc:mysql://172.17.2.10:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&tinyInt1isBit=false&rewriteBatchedStatements=true
jdbc连接地址jdbc:mysql://172.17.2.10:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&tinyInt1isBit=false&rewriteBatchedStatements=true&useCompression=true
jdbc驱动名称 com.mysql.jdbc.Driver
```
与:
```
jdbc连接地址jdbc:mariadb://172.17.2.10:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&tinyInt1isBit=false&rewriteBatchedStatements=true
jdbc连接地址jdbc:mariadb://172.17.2.10:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&tinyInt1isBit=false&rewriteBatchedStatements=true&useCompression=true
jdbc驱动名称 org.mariadb.jdbc.Driver
```
@@ -238,10 +238,17 @@ jdbc驱动名称oracle.jdbc.driver.OracleDriver
**SQL Server(>=2005)数据库**
```
jdbc连接地址jdbc:sqlserver://172.17.2.10:1433;DatabaseName=hqtest
jdbc连接地址jdbc:sqlserver://172.17.2.10:1433;DatabaseName=test
jdbc驱动名称com.microsoft.sqlserver.jdbc.SQLServerDriver
```
**Sybase数据库**
```
jdbc连接地址jdbc:sybase:Tds:172.17.2.10:5000/test
jdbc驱动名称com.sybase.jdbc4.jdbc.SybDriver
```
**PostgreSQL/Greenplum数据库**
```

View File

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

View File

@@ -13,7 +13,7 @@ services:
MYSQL_ROOT_HOST: '%'
dbswitch:
container_name: dbswitch_webui
image: inrgihc/dbswitch:1.6.13
image: inrgihc/dbswitch:1.6.14
environment:
MYSQLDB_HOST: dbswitch_mysqldb
MYSQLDB_PORT: 3306

View File

@@ -64,13 +64,19 @@
</li>
<li>Greenplum
</li>
<li>DB2
<li>IBM的DB2
</li>
<li>达梦数据库DM
<li>Sybase数据库
</li>
<li>人大金仓数据库Kingbase8
<li>国产达梦数据库DMDB
</li>
<li>翰高数据库HighGo
<li>国产人大金仓数据库Kingbase8
</li>
<li>国产翰高数据库HighGo
</li>
<li>国产神通数据库Oscar
</li>
<li>国产南大通用数据库GBase8a
</li>
<li>Apache Hive(只支持为源端)
</li>

View File

@@ -179,7 +179,7 @@
style="width:65%">
<el-tooltip placement="top">
<div slot="content">
数据同步时单个批次处理的行记录总数该值越到越占用内存空间。建议小字段表设置为10000大字段表设置为1000
数据同步时单个批次处理的行记录总数该值越到越占用内存空间。建议小字段表设置为10000或20000大字段表设置为1000
</div>
<i class="el-icon-question"></i>
</el-tooltip>
@@ -200,6 +200,8 @@
<p>说明:(1) 当表名映射规则记录为空时,代表目标表名与源表名的名称相同;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(2) 当字段名映射规则记录为空时,代表目标表的字段名与源表名的字段名相同</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(3) 在字段名映射规则中,如果目标字段名为空(未填写),则代表剔除该字段(不能是主键)的同步</p>
</div>
<el-button type="success"
@click="addTableNameMapperListRow()"

View File

@@ -179,7 +179,7 @@
style="width:65%">
<el-tooltip placement="top">
<div slot="content">
数据同步时单个批次处理的行记录总数该值越到越占用内存空间。建议小字段表设置为10000大字段表设置为1000
数据同步时单个批次处理的行记录总数该值越到越占用内存空间。建议小字段表设置为10000或20000大字段表设置为1000
</div>
<i class="el-icon-question"></i>
</el-tooltip>
@@ -200,6 +200,8 @@
<p>说明:(1) 当表名映射规则记录为空时,代表目标表名与源表名的名称相同;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(2) 当字段名映射规则记录为空时,代表目标表的字段名与源表名的字段名相同</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(3) 在字段名映射规则中,如果目标字段名为空(未填写),则代表剔除该字段(不能是主键)的同步</p>
</div>
<el-button type="success"
@click="addTableNameMapperListRow()"

View File

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

View File

@@ -59,12 +59,16 @@ public enum SupportDbTypeEnum {
"/* ping */ SELECT 1",
"jdbc:gbase://",
new String[]{"jdbc:gbase://{host}[:{port}]/[{database}][\\?{params}]"}),
HIVE(11, "hive", "org.apache.hive.jdbc.HiveDriver", 10000,
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}]"}),
HIVE(12, "hive", "org.apache.hive.jdbc.HiveDriver", 10000,
"SELECT 1",
"jdbc:hive2://",
new String[]{"jdbc:hive2://{host}[:{port}]/[{database}][\\?{params}]"}),
// 参考文章https://blog.csdn.net/wank1259162/article/details/104946744
SQLITE3(12, "sqlite3", "org.sqlite.JDBC", 0,
SQLITE3(13, "sqlite3", "org.sqlite.JDBC", 0,
"SELECT 1",
"jdbc:sqlite:",
new String[]{"jdbc:sqlite:{file}", "jdbc:sqlite::resource:{file}"}),

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.7100812cbfb54537881ccb2f2c33240f.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.4f3e74017de9a770cb02.js></script><script type=text/javascript src=/static/js/vendor.d6c2f50c2f02bf33c8cf.js></script><script type=text/javascript src=/static/js/app.4dca8abefa8e2bff97e5.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.c7c6ebc68eb8c22b2fd870e690f48549.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.44c945b7ad44b7b49ce3.js></script><script type=text/javascript src=/static/js/vendor.d6c2f50c2f02bf33c8cf.js></script><script type=text/javascript src=/static/js/app.c3d4dda8205e4ac05171.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

View File

@@ -1,2 +1,2 @@
webpackJsonp([10],{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=10.c2e1c087ed8b370c038c.js.map
webpackJsonp([11],{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=11.bdd4dc232dc254aa2be5.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

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([17],{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"),u={render:function(){var n=this.$createElement,e=this._self._c||n;return e("div",{staticClass:"body-wrapper"},[e("router-view")],1)},staticRenderFns:[]};var c=t("VU/8")({name:"App"},u,!1,function(n){t("Pibb")},"data-v-a97617c2",null).exports,i=t("/ocq");a.default.use(i.a);var l=new i.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(8)]).then(t.bind(null,"ARoL"))}},{path:"/connection",name:"连接管理",icon:"el-icon-s-order",component:function(){return Promise.all([t.e(0),t.e(13)]).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(15)]).then(t.bind(null,"D0I9"))}},{path:"/task/schedule",name:"调度记录",icon:"el-icon-pie-chart",component:function(){return t.e(14).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-eleme",component:function(){return t.e(10).then(t.bind(null,"oQRv"))}},{path:"/log/action",name:"操作日志",icon:"el-icon-s-check",component:function(){return t.e(9).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(11)]).then(t.bind(null,"/rCC"))}},{path:"/task/update",name:"修改任务",hidden:!0,component:function(){return Promise.all([t.e(0),t.e(12)]).then(t.bind(null,"txod"))}}]},{path:"/login",name:"登录",component:function(){return t.e(5).then(t.bind(null,"T+/8"))}}]}),p=t("mtWM"),s=t.n(p).a.create();s.interceptors.request.use(function(n){return n.url=""+n.url,n});var d=s,m=t("zL8q"),h=t.n(m),f=(t("muQq"),t("tvR6"),t("7Vno")),b=t.n(f),v=t("XLwt"),g=t.n(v);a.default.use(d),a.default.use(h.a),a.default.use(b.a),a.default.prototype.$http=d,a.default.config.productionTip=!1,a.default.prototype.$echarts=g.a,d.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)}),d.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:c},template:"<App/>"})},Pibb:function(n,e){},muQq:function(n,e){},tvR6:function(n,e){}},["NHnr"]);
//# sourceMappingURL=app.4dca8abefa8e2bff97e5.js.map
webpackJsonp([17],{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"),u={render:function(){var n=this.$createElement,e=this._self._c||n;return e("div",{staticClass:"body-wrapper"},[e("router-view")],1)},staticRenderFns:[]};var c=t("VU/8")({name:"App"},u,!1,function(n){t("Pibb")},"data-v-a97617c2",null).exports,i=t("/ocq");a.default.use(i.a);var l=new i.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(8)]).then(t.bind(null,"ARoL"))}},{path:"/connection",name:"连接管理",icon:"el-icon-s-order",component:function(){return Promise.all([t.e(0),t.e(12)]).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(14)]).then(t.bind(null,"D0I9"))}},{path:"/task/schedule",name:"调度记录",icon:"el-icon-pie-chart",component:function(){return t.e(13).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-eleme",component:function(){return t.e(11).then(t.bind(null,"oQRv"))}},{path:"/log/action",name:"操作日志",icon:"el-icon-s-check",component:function(){return t.e(9).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(15)]).then(t.bind(null,"/rCC"))}},{path:"/task/update",name:"修改任务",hidden:!0,component:function(){return Promise.all([t.e(0),t.e(10)]).then(t.bind(null,"txod"))}}]},{path:"/login",name:"登录",component:function(){return t.e(5).then(t.bind(null,"T+/8"))}}]}),p=t("mtWM"),s=t.n(p).a.create();s.interceptors.request.use(function(n){return n.url=""+n.url,n});var d=s,m=t("zL8q"),h=t.n(m),f=(t("muQq"),t("tvR6"),t("7Vno")),b=t.n(f),v=t("XLwt"),g=t.n(v);a.default.use(d),a.default.use(h.a),a.default.use(b.a),a.default.prototype.$http=d,a.default.config.productionTip=!1,a.default.prototype.$echarts=g.a,d.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)}),d.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:c},template:"<App/>"})},Pibb:function(n,e){},muQq:function(n,e){},tvR6:function(n,e){}},["NHnr"]);
//# sourceMappingURL=app.c3d4dda8205e4ac05171.js.map

View File

@@ -0,0 +1,2 @@
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,o,c){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 o)Object.prototype.hasOwnProperty.call(o,f)&&(e[f]=o[f]);for(n&&n(r,o,c);b.length;)b.shift()();if(c)for(u=0;u<c.length;u++)i=a(a.s=c[u]);return i};var r={},t={18: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 o=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,a.nc&&c.setAttribute("nonce",a.nc),c.src=a.p+"static/js/"+e+"."+{0:"ca67e87d8c000a42e592",1:"bd90a7e98064156140b6",2:"a3a6e495913b4aed9e88",3:"d4c1dc7b68edb49b61d2",4:"c4abd62fbe15189d37a5",5:"837a4a67f1fcf6ee6c6a",6:"7f56c2238fb7e4ee2ecd",7:"d5dc80a855f66a3208ff",8:"2bf951413fb931374230",9:"5a8e8f0e586b6f27113c",10:"b00e6f38e0a49c53db2a",11:"bdd4dc232dc254aa2be5",12:"5d3ab6a26a8047df4873",13:"eaa4da512adb13b7d4fd",14:"cadc6af4835efe7c42e4",15:"468c24b7253c8418ef6f"}[e]+".js";var f=setTimeout(d,12e4);function d(){c.onerror=c.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=d,o.appendChild(c),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.44c945b7ad44b7b49ce3.js.map

View File

@@ -1,2 +0,0 @@
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var f,d,i,u=0,s=[];u<r.length;u++)d=r[u],t[d]&&s.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,a);s.length;)s.shift()();if(a)for(u=0;u<a.length;u++)i=o(o.s=a[u]);return i};var r={},t={18:0};function o(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,o),t.l=!0,t.exports}o.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,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"ca67e87d8c000a42e592",1:"bd90a7e98064156140b6",2:"f18db4bdf8ae8c90de89",3:"d4c1dc7b68edb49b61d2",4:"c4abd62fbe15189d37a5",5:"837a4a67f1fcf6ee6c6a",6:"7f56c2238fb7e4ee2ecd",7:"d5dc80a855f66a3208ff",8:"2bf951413fb931374230",9:"5a8e8f0e586b6f27113c",10:"c2e1c087ed8b370c038c",11:"095e904476d1f54d76ff",12:"7a16e7ccf65062debc3b",13:"193d0e9c6755a2722219",14:"ed586583e97505228b92",15:"fb483208e2855048c8d0"}[e]+".js";var f=setTimeout(d,12e4);function d(){a.onerror=a.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=d,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="/",o.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.4f3e74017de9a770cb02.js.map

View File

@@ -1,2 +0,0 @@
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,f){for(var a,d,i,u=0,b=[];u<r.length;u++)d=r[u],t[d]&&b.push(t[d][0]),t[d]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(n&&n(r,c,f);b.length;)b.shift()();if(f)for(u=0;u<f.length;u++)i=o(o.s=f[u]);return i};var r={},t={18:0};function o(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,o),t.l=!0,t.exports}o.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,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,o.nc&&f.setAttribute("nonce",o.nc),f.src=o.p+"static/js/"+e+"."+{0:"ca67e87d8c000a42e592",1:"bd90a7e98064156140b6",2:"45757fdd22b0c905f12a",3:"d4c1dc7b68edb49b61d2",4:"c4abd62fbe15189d37a5",5:"837a4a67f1fcf6ee6c6a",6:"7f56c2238fb7e4ee2ecd",7:"d5dc80a855f66a3208ff",8:"2bf951413fb931374230",9:"51471fff489d5c840717",10:"ec3b8253b1c336df3447",11:"313c152f4354145af7b5",12:"eb5401eb22c55db52cd0",13:"bdcf7e684437edab125f",14:"220c10d64f09655e8973",15:"60356d680f753f10fcdd"}[e]+".js";var a=setTimeout(d,12e4);function d(){f.onerror=f.onload=null,clearTimeout(a);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return f.onerror=f.onload=d,c.appendChild(f),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="/",o.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.feed98e3dd9fb57fcb68.js.map

View File

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

View File

@@ -91,6 +91,11 @@ public enum DatabaseTypeEnum {
* SQLite数据库
*/
SQLITE3(14),
/**
* Sybase数据库类型
*/
SYBASE(15),
;
private int index;
@@ -109,7 +114,8 @@ public enum DatabaseTypeEnum {
DatabaseTypeEnum.MARIADB,
DatabaseTypeEnum.GBASE8A,
DatabaseTypeEnum.HIVE,
DatabaseTypeEnum.SQLITE3
DatabaseTypeEnum.SQLITE3,
DatabaseTypeEnum.SYBASE
).contains(this);
}

View File

@@ -47,6 +47,7 @@ public final class DatabaseAwareUtils {
productNameMap.put("SQLite", DatabaseTypeEnum.SQLITE3);
productNameMap.put("OSCAR", DatabaseTypeEnum.OSCAR);
productNameMap.put("GBase", DatabaseTypeEnum.GBASE8A);
productNameMap.put("Adaptive Server Enterprise", DatabaseTypeEnum.SYBASE);
driverNameMap.put("MySQL Connector Java", DatabaseTypeEnum.MYSQL);
driverNameMap.put("MariaDB Connector/J", DatabaseTypeEnum.MARIADB);
@@ -59,6 +60,7 @@ public final class DatabaseAwareUtils {
driverNameMap.put("SQLite JDBC", DatabaseTypeEnum.SQLITE3);
driverNameMap.put("OSCAR JDBC DRIVER", DatabaseTypeEnum.OSCAR);
driverNameMap.put("GBase JDBC Driver", DatabaseTypeEnum.GBASE8A);
driverNameMap.put("jConnect (TM) for JDBC (TM)", DatabaseTypeEnum.SYBASE);
}
/**

Binary file not shown.

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.13</version>
<version>1.6.14</version>
</parent>
<artifactId>dbswitch-core</artifactId>
@@ -78,6 +78,14 @@
<systemPath>${project.basedir}/lib/mssqlserver.jar</systemPath>
</dependency>
<dependency>
<groupId>com.sybase</groupId>
<artifactId>jconn4</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jconn4.jar</systemPath>
</dependency>
<dependency>
<groupId>com.dameng</groupId>
<artifactId>dm-jdbc</artifactId>

View File

@@ -24,6 +24,7 @@ import com.gitee.dbswitch.core.database.impl.DatabasePostgresImpl;
import com.gitee.dbswitch.core.database.impl.DatabaseSqliteImpl;
import com.gitee.dbswitch.core.database.impl.DatabaseSqlserver2000Impl;
import com.gitee.dbswitch.core.database.impl.DatabaseSqlserverImpl;
import com.gitee.dbswitch.core.database.impl.DatabaseSybaseImpl;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.Callable;
@@ -50,9 +51,11 @@ public final class DatabaseFactory {
put(DatabaseTypeEnum.GREENPLUM, DatabaseGreenplumImpl::new);
put(DatabaseTypeEnum.DB2, DatabaseDB2Impl::new);
put(DatabaseTypeEnum.DM, DatabaseDmImpl::new);
put(DatabaseTypeEnum.SYBASE, DatabaseSybaseImpl::new);
put(DatabaseTypeEnum.KINGBASE, DatabaseKingbaseImpl::new);
put(DatabaseTypeEnum.OSCAR, DatabaseOscarImpl::new);
put(DatabaseTypeEnum.GBASE8A, DatabaseGbase8aImpl::new);
put(DatabaseTypeEnum.SYBASE, DatabaseSybaseImpl::new);
put(DatabaseTypeEnum.HIVE, DatabaseHiveImpl::new);
put(DatabaseTypeEnum.SQLITE3, DatabaseSqliteImpl::new);
}

View File

@@ -0,0 +1,265 @@
// Copyright tang. All rights reserved.
// https://gitee.com/inrgihc/dbswitch
//
// Use of this source code is governed by a BSD-style license
//
// Author: tang (inrgihc@126.com)
// Date : 2020/1/2
// Location: beijing , china
/////////////////////////////////////////////////////////////
package com.gitee.dbswitch.core.database.impl;
import com.gitee.dbswitch.common.constant.Const;
import com.gitee.dbswitch.common.type.DatabaseTypeEnum;
import com.gitee.dbswitch.core.database.AbstractDatabase;
import com.gitee.dbswitch.core.database.IDatabaseInterface;
import com.gitee.dbswitch.core.model.ColumnDescription;
import com.gitee.dbswitch.core.model.ColumnMetaData;
import com.gitee.dbswitch.core.model.TableDescription;
import com.gitee.dbswitch.core.util.GenerateSqlUtils;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import org.apache.commons.lang3.StringUtils;
/**
* 支持Sybase数据库的元信息实现
*
* @author tang
*/
public class DatabaseSybaseImpl extends AbstractDatabase implements IDatabaseInterface {
private static final String SHOW_CREATE_VIEW_SQL = "SELECT sc.text FROM sysobjects so, syscomments sc WHERE user_name(so.uid)=? AND so.name=? and sc.id = so.id ORDER BY sc.colid";
private static Set<String> excludesSchemaNames;
static {
excludesSchemaNames = new HashSet<>();
excludesSchemaNames.add("keycustodian_role");
excludesSchemaNames.add("ha_role");
excludesSchemaNames.add("replication_role");
excludesSchemaNames.add("sa_role");
excludesSchemaNames.add("usedb_user");
excludesSchemaNames.add("replication_maint_role_gp");
excludesSchemaNames.add("sybase_ts_role");
excludesSchemaNames.add("dtm_tm_role");
excludesSchemaNames.add("sso_role");
excludesSchemaNames.add("navigator_role");
excludesSchemaNames.add("sa_serverprivs_role");
excludesSchemaNames.add("probe");
excludesSchemaNames.add("mon_role");
excludesSchemaNames.add("webservices_role");
excludesSchemaNames.add("js_admin_role");
excludesSchemaNames.add("js_user_role");
excludesSchemaNames.add("messaging_role");
excludesSchemaNames.add("js_client_role");
excludesSchemaNames.add("oper_role");
excludesSchemaNames.add("hadr_admin_role_gp");
}
public DatabaseSybaseImpl() {
super("com.sybase.jdbc4.jdbc.SybDriver");
}
@Override
public DatabaseTypeEnum getDatabaseType() {
return DatabaseTypeEnum.SYBASE;
}
private void setCatalogName(Connection connection){
try {
this.catalogName = connection.getCatalog();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@Override
public List<String> querySchemaList(Connection connection) {
setCatalogName(connection);
List<String> schemas = super.querySchemaList(connection);
return schemas.stream().filter(s -> !excludesSchemaNames.contains(s)).collect(Collectors.toList());
}
@Override
public List<TableDescription> queryTableList(Connection connection, String schemaName) {
setCatalogName(connection);
return super.queryTableList(connection, schemaName);
}
@Override
public List<String> queryTableColumnName(Connection connection, String schemaName,
String tableName) {
setCatalogName(connection);
return super.queryTableColumnName(connection, schemaName, tableName);
}
@Override
public List<String> queryTablePrimaryKeys(Connection connection, String schemaName,
String tableName) {
setCatalogName(connection);
return super.queryTablePrimaryKeys(connection, schemaName, tableName);
}
@Override
public List<ColumnDescription> queryTableColumnMeta(Connection connection, String schemaName,
String tableName) {
setCatalogName(connection);
return super.queryTableColumnMeta(connection, schemaName, tableName);
}
@Override
public String getTableDDL(Connection connection, String schemaName, String tableName) {
List<ColumnDescription> columnDescriptions = queryTableColumnMeta(connection, schemaName, tableName);
List<String> pks = queryTablePrimaryKeys(connection, schemaName, tableName);
return GenerateSqlUtils.getDDLCreateTableSQL(DatabaseTypeEnum.SYBASE,
columnDescriptions, pks, schemaName, tableName, false);
}
@Override
public String getViewDDL(Connection connection, String schemaName, String tableName) {
try (PreparedStatement ps = connection.prepareStatement(SHOW_CREATE_VIEW_SQL)) {
ps.setString(1, schemaName);
ps.setString(2, tableName);
try (ResultSet rs = ps.executeQuery()) {
StringBuilder sql = new StringBuilder();
while (rs.next()) {
sql.append(rs.getString(1));
}
return sql.toString();
}
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
@Override
public List<ColumnDescription> querySelectSqlColumnMeta(Connection connection, String sql) {
setCatalogName(connection);
String querySQL = String.format("SELECT TOP 1 * from (%s) tmp ", sql.replace(";", ""));
return this.getSelectSqlColumnMeta(connection, querySQL);
}
@Override
protected String getTableFieldsQuerySQL(String schemaName, String tableName) {
return String.format("select top 1 * from [%s].[%s] ", schemaName, tableName);
}
@Override
protected String getTestQuerySQL(String sql) {
return String.format("SELECT top 1 * from ( %s ) tmp", sql.replace(";", ""));
}
@Override
public String getQuotedSchemaTableCombination(String schemaName, String tableName) {
return String.format(" [%s].[%s] ", schemaName, tableName);
}
@Override
public String getFieldDefinition(ColumnMetaData v, List<String> pks, boolean useAutoInc,
boolean addCr, boolean withRemarks) {
String fieldname = v.getName();
int length = v.getLength();
int precision = v.getPrecision();
int type = v.getType();
String retval = " [" + fieldname + "] ";
switch (type) {
case ColumnMetaData.TYPE_TIMESTAMP:
case ColumnMetaData.TYPE_TIME:
case ColumnMetaData.TYPE_DATE:
retval += "DATETIME";
if (null != pks && !pks.isEmpty() && pks.contains(fieldname)) {
retval += " NOT NULL";
}
break;
case ColumnMetaData.TYPE_BOOLEAN:
retval += "BOOLEAN";
if (null != pks && !pks.isEmpty() && pks.contains(fieldname)) {
retval += " NOT NULL";
}
break;
case ColumnMetaData.TYPE_NUMBER:
case ColumnMetaData.TYPE_INTEGER:
case ColumnMetaData.TYPE_BIGNUMBER:
if (null != pks && !pks.isEmpty() && pks.contains(fieldname)) {
if (useAutoInc) {
retval += "INTEGER IDENTITY NOT NULL";
} else {
retval += "INTEGER NOT NULL";
}
} else {
if (precision != 0 || (precision == 0 && length > 9)) {
if (precision > 0 && length > 0) {
retval += "DECIMAL(" + length + ", " + precision + ") NULL";
} else {
retval += "DOUBLE PRECISION NULL";
}
} else {
if (length < 3) {
retval += "TINYINT NULL";
} else if (length < 5) {
retval += "SMALLINT NULL";
} else {
retval += "INTEGER NULL";
}
}
}
break;
case ColumnMetaData.TYPE_STRING:
if (length >= 2048) {
retval += "TEXT NULL";
} else {
retval += "VARCHAR";
if (length > 0) {
retval += "(" + length + ")";
}
if (null != pks && !pks.isEmpty() && pks.contains(fieldname)) {
retval += " NOT NULL";
} else {
retval += " NULL";
}
}
break;
case ColumnMetaData.TYPE_BINARY:
retval += "VARBINARY";
break;
default:
retval += "TEXT NULL";
break;
}
if (addCr) {
retval += Const.CR;
}
return retval;
}
@Override
public String getPrimaryKeyAsString(List<String> pks) {
if (null != pks && !pks.isEmpty()) {
StringBuilder sb = new StringBuilder();
sb.append("[");
sb.append(StringUtils.join(pks, "] , ["));
sb.append("]");
return sb.toString();
}
return "";
}
@Override
public List<String> getTableColumnCommentDefinition(TableDescription td,
List<ColumnDescription> cds) {
return Collections.emptyList();
}
}

View File

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

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.13</version>
<version>1.6.14</version>
</parent>
<artifactId>dbswitch-dbchange</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.13</version>
<version>1.6.14</version>
</parent>
<artifactId>dbswitch-dbcommon</artifactId>

View File

@@ -22,6 +22,7 @@ import com.gitee.dbswitch.dbcommon.database.impl.OscarDatabaseOperator;
import com.gitee.dbswitch.dbcommon.database.impl.PostgreSqlDatabaseOperator;
import com.gitee.dbswitch.dbcommon.database.impl.SqlServerDatabaseOperator;
import com.gitee.dbswitch.dbcommon.database.impl.SqliteDatabaseOperator;
import com.gitee.dbswitch.dbcommon.database.impl.SybaseDatabaseOperator;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;
@@ -49,6 +50,7 @@ public final class DatabaseOperatorFactory {
put(DatabaseTypeEnum.GREENPLUM, GreenplumDatabaseOperator::new);
put(DatabaseTypeEnum.DB2, DB2DatabaseOperator::new);
put(DatabaseTypeEnum.DM, DmDatabaseOperator::new);
put(DatabaseTypeEnum.SYBASE, SybaseDatabaseOperator::new);
put(DatabaseTypeEnum.KINGBASE, KingbaseDatabaseOperator::new);
put(DatabaseTypeEnum.OSCAR, OscarDatabaseOperator::new);
put(DatabaseTypeEnum.GBASE8A, MysqlDatabaseOperator::new);

View File

@@ -0,0 +1,25 @@
// Copyright tang. All rights reserved.
// https://gitee.com/inrgihc/dbswitch
//
// Use of this source code is governed by a BSD-style license
//
// Author: tang (inrgihc@126.com)
// Date : 2020/1/2
// Location: beijing , china
/////////////////////////////////////////////////////////////
package com.gitee.dbswitch.dbcommon.database.impl;
import javax.sql.DataSource;
/**
* Sybase数据库实现类
*
* @author tang
*/
public class SybaseDatabaseOperator extends SqlServerDatabaseOperator {
public SybaseDatabaseOperator(DataSource dataSource) {
super(dataSource);
}
}

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.13</version>
<version>1.6.14</version>
</parent>
<artifactId>dbswitch-dbsynch</artifactId>

View File

@@ -21,6 +21,7 @@ import com.gitee.dbswitch.dbsynch.oscar.OscarDatabaseSyncImpl;
import com.gitee.dbswitch.dbsynch.pgsql.GreenplumDatabaseSyncImpl;
import com.gitee.dbswitch.dbsynch.pgsql.PostgresqlDatabaseSyncImpl;
import com.gitee.dbswitch.dbsynch.sqlite.Sqlite3DatabaseSyncImpl;
import com.gitee.dbswitch.dbsynch.sybase.SybaseDatabaseSyncImpl;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;
@@ -48,6 +49,7 @@ public final class DatabaseSynchronizeFactory {
put(DatabaseTypeEnum.GREENPLUM, GreenplumDatabaseSyncImpl::new);
put(DatabaseTypeEnum.DB2, DB2DatabaseSyncImpl::new);
put(DatabaseTypeEnum.DM, DmDatabaseSyncImpl::new);
put(DatabaseTypeEnum.SYBASE, SybaseDatabaseSyncImpl::new);
put(DatabaseTypeEnum.KINGBASE, KingbaseDatabaseSyncImpl::new);
put(DatabaseTypeEnum.OSCAR, OscarDatabaseSyncImpl::new);
put(DatabaseTypeEnum.GBASE8A, MySqlDatabaseSyncImpl::new);

View File

@@ -0,0 +1,26 @@
// Copyright tang. All rights reserved.
// https://gitee.com/inrgihc/dbswitch
//
// Use of this source code is governed by a BSD-style license
//
// Author: tang (inrgihc@126.com)
// Date : 2020/1/2
// Location: beijing , china
/////////////////////////////////////////////////////////////
package com.gitee.dbswitch.dbsynch.sybase;
import com.gitee.dbswitch.dbsynch.mssql.SqlServerDatabaseSyncImpl;
import javax.sql.DataSource;
/**
* Sybase数据库DML同步实现类
*
* @author tang
*/
public class SybaseDatabaseSyncImpl extends SqlServerDatabaseSyncImpl {
public SybaseDatabaseSyncImpl(DataSource ds) {
super(ds);
}
}

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.13</version>
<version>1.6.14</version>
</parent>
<artifactId>dbswitch-dbwriter</artifactId>

View File

@@ -20,6 +20,7 @@ import com.gitee.dbswitch.dbwriter.mysql.MySqlWriterImpl;
import com.gitee.dbswitch.dbwriter.oracle.OracleWriterImpl;
import com.gitee.dbswitch.dbwriter.oscar.OscarWriterImpl;
import com.gitee.dbswitch.dbwriter.sqlite.Sqlite3WriterImpl;
import com.gitee.dbswitch.dbwriter.sybase.SybaseWriterImpl;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;
@@ -47,6 +48,7 @@ public class DatabaseWriterFactory {
put(DatabaseTypeEnum.GREENPLUM, GreenplumCopyWriterImpl::new);
put(DatabaseTypeEnum.DB2, DB2WriterImpl::new);
put(DatabaseTypeEnum.DM, DmWriterImpl::new);
put(DatabaseTypeEnum.SYBASE, SybaseWriterImpl::new);
//对于kingbase当前只能使用insert模式
put(DatabaseTypeEnum.KINGBASE, KingbaseInsertWriterImpl::new);
put(DatabaseTypeEnum.OSCAR, OscarWriterImpl::new);

View File

@@ -0,0 +1,33 @@
// Copyright tang. All rights reserved.
// https://gitee.com/inrgihc/dbswitch
//
// Use of this source code is governed by a BSD-style license
//
// Author: tang (inrgihc@126.com)
// Date : 2020/1/2
// Location: beijing , china
/////////////////////////////////////////////////////////////
package com.gitee.dbswitch.dbwriter.sybase;
import com.gitee.dbswitch.dbwriter.mssql.SqlServerWriterImpl;
import javax.sql.DataSource;
import lombok.extern.slf4j.Slf4j;
/**
* Sybase批量写入实现类
*
* @author tang
*/
@Slf4j
public class SybaseWriterImpl extends SqlServerWriterImpl {
public SybaseWriterImpl(DataSource dataSource) {
super(dataSource);
}
@Override
protected String getDatabaseProductName() {
return "Sybase";
}
}

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.13</version>
<version>1.6.14</version>
</parent>
<artifactId>dbswitch-pgwriter</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.13</version>
<version>1.6.14</version>
</parent>
<artifactId>dbswitch-sql</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.dbswitch</groupId>
<artifactId>dbswitch-parent</artifactId>
<version>1.6.13</version>
<version>1.6.14</version>
</parent>
<artifactId>package-tool</artifactId>

View File

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

View File

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