mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 19:03:58 +00:00
removed obsolete code
This commit is contained in:
@@ -7,10 +7,6 @@ import debug from 'debug';
|
|||||||
|
|
||||||
const dbg = debug('dbgate:PerspectiveDisplay');
|
const dbg = debug('dbgate:PerspectiveDisplay');
|
||||||
|
|
||||||
// const SKIP_CELL = {
|
|
||||||
// __perspective_skip_cell__: true,
|
|
||||||
// };
|
|
||||||
|
|
||||||
let lastJoinId = 0;
|
let lastJoinId = 0;
|
||||||
function getJoinId(): number {
|
function getJoinId(): number {
|
||||||
lastJoinId += 1;
|
lastJoinId += 1;
|
||||||
@@ -61,10 +57,8 @@ interface PerspectiveSubRowCollection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface CollectedPerspectiveDisplayRow {
|
interface CollectedPerspectiveDisplayRow {
|
||||||
// startIndex = 0;
|
|
||||||
columnIndexes: number[];
|
columnIndexes: number[];
|
||||||
rowData: any[];
|
rowData: any[];
|
||||||
// rowSpans: number[] = null;
|
|
||||||
subRowCollections: PerspectiveSubRowCollection[];
|
subRowCollections: PerspectiveSubRowCollection[];
|
||||||
incompleteRowsIndicator?: string[];
|
incompleteRowsIndicator?: string[];
|
||||||
}
|
}
|
||||||
@@ -77,23 +71,6 @@ export class PerspectiveDisplayRow {
|
|||||||
this.rowCellSkips = _fill(Array(display.columns.length), false);
|
this.rowCellSkips = _fill(Array(display.columns.length), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// getRow(rowIndex): PerspectiveDisplayRow {
|
|
||||||
// if (rowIndex == 0) return this;
|
|
||||||
// while (this.subrows.length < rowIndex) {
|
|
||||||
// this.subrows.push(new PerspectiveDisplayRow(this.display));
|
|
||||||
// }
|
|
||||||
// return this.subrows[rowIndex - 1];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// setRowJoinId(col: number, joinId: number) {
|
|
||||||
// this.rowJoinIds[col] = joinId;
|
|
||||||
// for (const subrow of this.subrows) {
|
|
||||||
// subrow.setRowJoinId(col, joinId);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// subrows?: PerspectiveDisplayRow[] = [];
|
|
||||||
|
|
||||||
rowData: any[] = [];
|
rowData: any[] = [];
|
||||||
rowSpans: number[] = null;
|
rowSpans: number[] = null;
|
||||||
rowCellSkips: boolean[] = null;
|
rowCellSkips: boolean[] = null;
|
||||||
@@ -203,13 +180,6 @@ export class PerspectiveDisplay {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
// flushFlatRows(row: PerspectiveDisplayRow) {
|
|
||||||
// this.rows.push(row);
|
|
||||||
// for (const child of row.subrows) {
|
|
||||||
// this.flushFlatRows(child);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
fillRowSpans() {
|
fillRowSpans() {
|
||||||
for (let col = 0; col < this.columns.length; col++) {
|
for (let col = 0; col < this.columns.length; col++) {
|
||||||
// let lastFilledJoinId = null;
|
// let lastFilledJoinId = null;
|
||||||
@@ -233,21 +203,11 @@ export class PerspectiveDisplay {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mergeRows(collectedRows: CollectedPerspectiveDisplayRow[]) {
|
mergeRows(collectedRows: CollectedPerspectiveDisplayRow[]) {
|
||||||
// const rows = [];
|
|
||||||
let rowIndex = 0;
|
let rowIndex = 0;
|
||||||
for (const collectedRow of collectedRows) {
|
for (const collectedRow of collectedRows) {
|
||||||
// const resultRow = new PerspectiveDisplayRow(this);
|
|
||||||
const count = this.mergeRow(collectedRow, rowIndex);
|
const count = this.mergeRow(collectedRow, rowIndex);
|
||||||
rowIndex += count;
|
rowIndex += count;
|
||||||
}
|
}
|
||||||
// console.log('MERGED NOT FLAT', rows);
|
|
||||||
// console.log('MERGED NOT FLAT SUBROWS 0', rows[0].subrows[0]);
|
|
||||||
// for (const row of rows) {
|
|
||||||
// this.flushFlatRows(row);
|
|
||||||
// }
|
|
||||||
// for (const row of this.rows) {
|
|
||||||
// delete row.subrows;
|
|
||||||
// }
|
|
||||||
this.fillRowSpans();
|
this.fillRowSpans();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,12 +241,5 @@ export class PerspectiveDisplay {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return rowCount;
|
return rowCount;
|
||||||
|
|
||||||
// for (let ri = 0; ri < subRowCount; ri++) {
|
|
||||||
// const targetRow = resultRow.getRow(ri);
|
|
||||||
// for (let i = 0; i < collectedRow.columnIndexes.length; i++) {
|
|
||||||
// targetRow.rowJoinIds[collectedRow.columnIndexes[i]] = joinId;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user