fix:修复数据库schema提示

This commit is contained in:
刘宗洋
2023-06-13 15:57:08 +08:00
parent 570db453d7
commit 4f08975df2
2 changed files with 13 additions and 9 deletions

View File

@@ -30,6 +30,9 @@ export class DbInst {
*/
dbs: Map<string, Db> = new Map()
/** 数据库schema多个用空格隔开 */
databases: string
/**
* 默认查询分页数量
*/
@@ -124,7 +127,7 @@ export class DbInst {
/**
* 执行sql
*
*
* @param sql sql
* @param remark 执行备注
*/
@@ -186,7 +189,7 @@ export class DbInst {
return `DELETE FROM ${table} WHERE ${primaryKeyColumnName} IN (${ids})`;
}
/*
/*
* 弹框提示是否执行sql
*/
promptExeSql = (db: string, sql: string, cancelFunc: any = null, successFunc: any = null) => {
@@ -216,6 +219,7 @@ export class DbInst {
dbInst.id = inst.id;
dbInst.name = inst.name;
dbInst.type = inst.type;
dbInst.databases = inst.databases;
dbInstCache.set(dbInst.id, dbInst);
return dbInst;
@@ -283,14 +287,14 @@ export class DbInst {
/**
* 判断字段类型是否为数字类型
* @param columnType 字段类型
* @returns
* @returns
*/
static isNumber(columnType: string) {
return columnType.match(/int|double|float|nubmer|decimal|byte|bit/gi);
};
/**
*
*
* @param str 字符串
* @param tableData 表数据
* @param flag 标志
@@ -483,4 +487,4 @@ export type FieldsMeta = {
oldValue: string
// 新值
newValue: string
}
}