mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 22:55:59 +00:00
perspective fixes
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
import _cloneDeep from 'lodash/cloneDeep';
|
||||
import _isString from 'lodash/isString';
|
||||
import { ColumnInfo, ColumnReference, DatabaseInfo, DatabaseInfoObjects, SqlDialect, TableInfo } from 'dbgate-types';
|
||||
import {
|
||||
ColumnInfo,
|
||||
ColumnReference,
|
||||
DatabaseInfo,
|
||||
DatabaseInfoObjects,
|
||||
NamedObjectInfo,
|
||||
SqlDialect,
|
||||
TableInfo,
|
||||
} from 'dbgate-types';
|
||||
|
||||
export function fullNameFromString(name) {
|
||||
const m = name.match(/\[([^\]]+)\]\.\[([^\]]+)\]/);
|
||||
@@ -39,6 +47,11 @@ export function equalStringLike(s1, s2) {
|
||||
return (s1 || '').toLowerCase().trim() == (s2 || '').toLowerCase().trim();
|
||||
}
|
||||
|
||||
export function equalFullName(name1: NamedObjectInfo, name2: NamedObjectInfo) {
|
||||
if (!name1 || !name2) return name1 == name2;
|
||||
return name1.pureName == name2.pureName && name1.schemaName == name2.schemaName;
|
||||
}
|
||||
|
||||
export function findObjectLike(
|
||||
{ pureName, schemaName },
|
||||
dbinfo: DatabaseInfo,
|
||||
|
||||
Reference in New Issue
Block a user