mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 19:13:59 +00:00
removed commented code
This commit is contained in:
@@ -975,146 +975,6 @@ export class PerspectiveTableNode extends PerspectiveTreeNode {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// export class PerspectiveCollectionNode extends PerspectiveTreeNode {
|
|
||||||
// constructor(
|
|
||||||
// public collection: CollectionInfo,
|
|
||||||
// dbs: MultipleDatabaseInfo,
|
|
||||||
// config: PerspectiveConfig,
|
|
||||||
// setConfig: ChangePerspectiveConfigFunc,
|
|
||||||
// public dataProvider: PerspectiveDataProvider,
|
|
||||||
// databaseConfig: PerspectiveDatabaseConfig,
|
|
||||||
// parentNode: PerspectiveTreeNode,
|
|
||||||
// designerId: string
|
|
||||||
// ) {
|
|
||||||
// super(dbs, config, setConfig, parentNode, dataProvider, databaseConfig, designerId);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// getNodeLoadProps(parentRows: any[]): PerspectiveDataLoadProps {
|
|
||||||
// return {
|
|
||||||
// schemaName: this.collection.schemaName,
|
|
||||||
// pureName: this.collection.pureName,
|
|
||||||
// dataColumns: this.getDataLoadColumns(),
|
|
||||||
// databaseConfig: this.databaseConfig,
|
|
||||||
// orderBy: this.getOrderBy(this.collection),
|
|
||||||
// mongoCondition: this.getChildrenMongoCondition(),
|
|
||||||
// engineType: 'docdb',
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
|
|
||||||
// get codeName() {
|
|
||||||
// return this.collection.schemaName
|
|
||||||
// ? `${this.collection.schemaName}:${this.collection.pureName}`
|
|
||||||
// : this.collection.pureName;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// get title() {
|
|
||||||
// return this.nodeConfig?.alias || this.collection.pureName;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// get isExpandable() {
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// generateChildNodes(): PerspectiveTreeNode[] {
|
|
||||||
// return getCollectionChildPerspectiveNodes(
|
|
||||||
// this.designerId,
|
|
||||||
// this.collection,
|
|
||||||
// this.dbs,
|
|
||||||
// this.config,
|
|
||||||
// this.setConfig,
|
|
||||||
// this.dataProvider,
|
|
||||||
// this.databaseConfig,
|
|
||||||
// this
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
// get icon() {
|
|
||||||
// return 'img collection';
|
|
||||||
// }
|
|
||||||
|
|
||||||
// getBaseTableFromThis() {
|
|
||||||
// return this.collection;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// get headerTableAttributes() {
|
|
||||||
// return {
|
|
||||||
// schemaName: this.collection.schemaName,
|
|
||||||
// pureName: this.collection.pureName,
|
|
||||||
// conid: this.databaseConfig.conid,
|
|
||||||
// database: this.databaseConfig.database,
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
|
|
||||||
// get tableCode() {
|
|
||||||
// return `${this.collection.schemaName}|${this.collection.pureName}`;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// get namedObject(): NamedObjectInfo {
|
|
||||||
// return {
|
|
||||||
// schemaName: this.collection.schemaName,
|
|
||||||
// pureName: this.collection.pureName,
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// export class PerspectiveViewNode extends PerspectiveTreeNode {
|
|
||||||
// constructor(
|
|
||||||
// public view: ViewInfo,
|
|
||||||
// dbs: MultipleDatabaseInfo,
|
|
||||||
// config: PerspectiveConfig,
|
|
||||||
// setConfig: ChangePerspectiveConfigFunc,
|
|
||||||
// public dataProvider: PerspectiveDataProvider,
|
|
||||||
// databaseConfig: PerspectiveDatabaseConfig,
|
|
||||||
// parentNode: PerspectiveTreeNode
|
|
||||||
// ) {
|
|
||||||
// super(dbs, config, setConfig, parentNode, dataProvider, databaseConfig);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// getNodeLoadProps(parentRows: any[]): PerspectiveDataLoadProps {
|
|
||||||
// return {
|
|
||||||
// schemaName: this.view.schemaName,
|
|
||||||
// pureName: this.view.pureName,
|
|
||||||
// dataColumns: this.getDataLoadColumns(),
|
|
||||||
// databaseConfig: this.databaseConfig,
|
|
||||||
// orderBy: this.getOrderBy(this.view),
|
|
||||||
// condition: this.getChildrenCondition(),
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
|
|
||||||
// get codeName() {
|
|
||||||
// return this.view.schemaName ? `${this.view.schemaName}:${this.view.pureName}` : this.view.pureName;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// get title() {
|
|
||||||
// return this.view.pureName;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// get isExpandable() {
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// get childNodes(): PerspectiveTreeNode[] {
|
|
||||||
// return getTableChildPerspectiveNodes(
|
|
||||||
// this.view,
|
|
||||||
// this.dbs,
|
|
||||||
// this.config,
|
|
||||||
// this.setConfig,
|
|
||||||
// this.dataProvider,
|
|
||||||
// this.databaseConfig,
|
|
||||||
// this
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
// get icon() {
|
|
||||||
// return 'img table';
|
|
||||||
// }
|
|
||||||
|
|
||||||
// getBaseTableFromThis() {
|
|
||||||
// return this.view;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
export class PerspectiveTableReferenceNode extends PerspectiveTableNode {
|
export class PerspectiveTableReferenceNode extends PerspectiveTableNode {
|
||||||
constructor(
|
constructor(
|
||||||
public foreignKey: ForeignKeyInfo,
|
public foreignKey: ForeignKeyInfo,
|
||||||
@@ -1526,34 +1386,5 @@ export function getTableChildPerspectiveNodes(
|
|||||||
|
|
||||||
res.push(..._sortBy(customs, 'title'));
|
res.push(..._sortBy(customs, 'title'));
|
||||||
|
|
||||||
// const customs = [];
|
|
||||||
// for (const join of config.customJoins || []) {
|
|
||||||
// if (join.baseUniqueName == parentColumn.uniqueName) {
|
|
||||||
// const newConfig = { ...databaseConfig };
|
|
||||||
// if (join.conid) newConfig.conid = join.conid;
|
|
||||||
// if (join.database) newConfig.database = join.database;
|
|
||||||
// const db = dbs?.[newConfig.conid]?.[newConfig.database];
|
|
||||||
// const table = db?.tables?.find(x => x.pureName == join.refTableName && x.schemaName == join.refSchemaName);
|
|
||||||
// const view = db?.views?.find(x => x.pureName == join.refTableName && x.schemaName == join.refSchemaName);
|
|
||||||
|
|
||||||
// if (table || view) {
|
|
||||||
// customs.push(
|
|
||||||
// new PerspectiveCustomJoinTreeNode(
|
|
||||||
// join,
|
|
||||||
// table || view,
|
|
||||||
// dbs,
|
|
||||||
// config,
|
|
||||||
// setConfig,
|
|
||||||
// dataProvider,
|
|
||||||
// newConfig,
|
|
||||||
// parentColumn,
|
|
||||||
// null
|
|
||||||
// )
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// res.push(..._sortBy(customs, 'title'));
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user