!93 feat: DBMS支持mssql和一些功能优化

* feat: 表格+表格元数据缓存
* feat:跳板机支持多段跳
* fix: 所有数据库区分字段主键和自增
* feat: DBMS支持mssql
* refactor: 去除无用的getter方法
This commit is contained in:
zongyangleo
2024-01-29 04:20:23 +00:00
committed by Coder慌
parent 923e183a67
commit 0e6b9713ce
59 changed files with 1506 additions and 433 deletions

View File

@@ -19,7 +19,7 @@ import { NodeType, TagTreeNode } from '@/views/ops/component/tag';
import { dbApi } from '@/views/ops/db/api';
import { sleep } from '@/common/utils/loading';
import SvgIcon from '@/components/svgIcon/index.vue';
import { getDbDialect, mysqlDbTypes} from '@/views/ops/db/dialect'
import { getDbDialect, noSchemaTypes } from '@/views/ops/db/dialect';
import TagTreeResourceSelect from '../../component/TagTreeResourceSelect.vue';
import { computed } from 'vue';
@@ -90,8 +90,8 @@ const NodeTypeTagPath = new NodeType(TagTreeNode.TagPath).withLoadNodesFunc(asyn
});
/** mysql类型的数据库没有schema层 */
const mysqlType = (type: string) => {
return mysqlDbTypes.includes(type);
const noSchemaType = (type: string) => {
return noSchemaTypes.includes(type);
};
// 数据库实例节点类型
@@ -99,7 +99,7 @@ const NodeTypeDbInst = new NodeType(SqlExecNodeType.DbInst).withLoadNodesFunc((p
const params = parentNode.params;
const dbs = params.database.split(' ')?.sort();
let fn: NodeType;
if (mysqlType(params.type)) {
if (noSchemaType(params.type)) {
fn = MysqlNodeTypes;
} else {
fn = PgNodeTypes;
@@ -117,7 +117,7 @@ const NodeTypeDbInst = new NodeType(SqlExecNodeType.DbInst).withLoadNodesFunc((p
db: x,
})
.withIcon(DbIcon);
if (mysqlType(params.type)) {
if (noSchemaType(params.type)) {
tagTreeNode.isLeaf = true;
}
return tagTreeNode;