!106 feat:数据同步支持唯一键冲突策略

* refactor:sql同步
* fix: 表格右键导出菜单换行符修复
* feat:数据同步支持唯一键冲突策略
This commit is contained in:
zongyangleo
2024-03-01 04:03:03 +00:00
committed by Coder慌
parent f93231da61
commit 76475e807e
38 changed files with 1117 additions and 257 deletions

View File

@@ -10,14 +10,14 @@ import (
)
func init() {
meta := new(Meta)
meta := new(MssqlMeta)
dbi.Register(dbi.DbTypeMssql, meta)
}
type Meta struct {
type MssqlMeta struct {
}
func (md *Meta) GetSqlDb(d *dbi.DbInfo) (*sql.DB, error) {
func (md *MssqlMeta) GetSqlDb(d *dbi.DbInfo) (*sql.DB, error) {
err := d.IfUseSshTunnelChangeIpPort()
if err != nil {
return nil, err
@@ -52,6 +52,6 @@ func (md *Meta) GetSqlDb(d *dbi.DbInfo) (*sql.DB, error) {
return sql.Open(driverName, dsn)
}
func (md *Meta) GetDialect(conn *dbi.DbConn) dbi.Dialect {
func (md *MssqlMeta) GetDialect(conn *dbi.DbConn) dbi.Dialect {
return &MssqlDialect{conn}
}