From c47711d346461c99a95565e998f1af5244c92dbf Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Thu, 5 Mar 2020 12:24:07 +0100 Subject: [PATCH] deleted obsolete files --- packages/sqltree/src/Command.ts | 14 ------ packages/sqltree/src/Condition.ts | 9 ---- packages/sqltree/src/Expression.ts | 4 -- packages/sqltree/src/Select.ts | 29 ----------- packages/sqltree/src/Source.ts | 78 ------------------------------ 5 files changed, 134 deletions(-) delete mode 100644 packages/sqltree/src/Command.ts delete mode 100644 packages/sqltree/src/Condition.ts delete mode 100644 packages/sqltree/src/Expression.ts delete mode 100644 packages/sqltree/src/Select.ts delete mode 100644 packages/sqltree/src/Source.ts diff --git a/packages/sqltree/src/Command.ts b/packages/sqltree/src/Command.ts deleted file mode 100644 index 4eed6180..00000000 --- a/packages/sqltree/src/Command.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { NamedObjectInfo, RangeDefinition } from "@dbgate/types"; - - -// import { EngineDriver, SqlDumper } from "@dbgate/types"; - -// export class Command { -// toSql(driver: EngineDriver) { -// const dumper = driver.createDumper(); -// this.dumpSql(dumper); -// return dumper.s; -// } - -// dumpSql(dumper: SqlDumper) {} -// } diff --git a/packages/sqltree/src/Condition.ts b/packages/sqltree/src/Condition.ts deleted file mode 100644 index f58bbe90..00000000 --- a/packages/sqltree/src/Condition.ts +++ /dev/null @@ -1,9 +0,0 @@ -// import { SqlDumper } from "@dbgate/types"; - -// export abstract class Condition { -// abstract dumpSql(dumper: SqlDumper) ; -// } - -// export abstract class UnaryCondition extends Condition { -// // expr: Expresssion; -// } \ No newline at end of file diff --git a/packages/sqltree/src/Expression.ts b/packages/sqltree/src/Expression.ts deleted file mode 100644 index f38af760..00000000 --- a/packages/sqltree/src/Expression.ts +++ /dev/null @@ -1,4 +0,0 @@ - -// export abstract class Expression { - -// } diff --git a/packages/sqltree/src/Select.ts b/packages/sqltree/src/Select.ts deleted file mode 100644 index 67eafe6e..00000000 --- a/packages/sqltree/src/Select.ts +++ /dev/null @@ -1,29 +0,0 @@ -// import { Command } from "./Command"; -// import { NamedObjectInfo, RangeDefinition, SqlDumper } from "@dbgate/types"; - -// export class Select extends Command { -// topRecords: number; -// from: NamedObjectInfo; -// range: RangeDefinition; -// distinct = false; -// selectAll = false; - -// dumpSql(dumper: SqlDumper) { -// dumper.put("^select "); -// if (this.topRecords) { -// dumper.put("^top %s ", this.topRecords); -// } -// if (this.distinct) { -// dumper.put("^distinct "); -// } -// if (this.selectAll) { -// dumper.put("* "); -// } else { -// // TODO -// } -// dumper.put("^from %f ", this.from); -// if (this.range) { -// dumper.put("^limit %s ^offset %s ", this.range.limit, this.range.offset); -// } -// } -// } diff --git a/packages/sqltree/src/Source.ts b/packages/sqltree/src/Source.ts deleted file mode 100644 index 4389f28f..00000000 --- a/packages/sqltree/src/Source.ts +++ /dev/null @@ -1,78 +0,0 @@ -// import { SqlDumper, NamedObjectInfo } from "@dbgate/types"; -// import { Select } from "./Select"; - -// export class Source { -// name: NamedObjectInfo; -// alias: string; -// subQuery: Select; -// subQueryString: string; - -// dumpSqlDef(dumper: SqlDumper) { -// let sources = 0; -// if (this.name != null) sources++; -// if (this.subQuery != null) sources++; -// if (this.subQueryString != null) sources++; -// if (sources != 1) -// throw new Error("sqltree.Source should have exactly one source"); - -// if (this.name != null) { -// dumper.put("%f", this.name); -// } -// if (this.subQuery) { -// dumper.put("("); -// this.subQuery.dumpSql(dumper); -// dumper.put(")"); -// } -// if (this.subQueryString) { -// dumper.put("("); -// dumper.putRaw(this.subQueryString); -// dumper.put(")"); -// } -// if (this.alias) { -// dumper.put(" %i", this.alias); -// } -// } - -// dumpSqlRef(dumper: SqlDumper) { -// if (this.alias != null) { -// dumper.put("%i", this.alias); -// return true; -// } else if (this.name != null) { -// dumper.put("%f", this.name); -// return true; -// } -// return false; -// } -// } - -// class Relation { -// source:Source; -// joinType: string; -// // conditions: - - -// // dumpSqlRef(dumper: SqlDumper) { - -// // dumper.put("&n"); -// // dumper.putRaw(this.joinType); -// // dumper.put(" "); -// // this.source.dumpSqlDef(dumper) -// // if (Conditions.Any()) -// // { -// // dumper.put(" ^on "); -// // bool was = false; -// // foreach (var cond in Conditions) -// // { -// // if (was) dumper.put(" ^and "); -// // cond.GenSql(dmp); -// // was = true; -// // } -// // } -// // } - -// } - -// export class FromDefinition { -// source: Source; -// relations: Relation[] = []; -// }