typings refactor - no compilation, renamed package

This commit is contained in:
Jan Prochazka
2020-02-02 12:02:41 +01:00
parent af80a2799f
commit 4fe2912707
20 changed files with 68 additions and 103 deletions

1
lib/.gitignore vendored
View File

@@ -1 +0,0 @@
lib

View File

@@ -1,17 +0,0 @@
{
"version": "0.1.0",
"name": "@dbgate/lib",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"scripts": {
"prepare": "yarn build",
"build": "tsc"
},
"files": [
"lib"
],
"devDependencies": {
"@types/node": "^13.7.0",
"typescript": "^3.7.5"
}
}

View File

@@ -1,29 +0,0 @@
import { ChildProcess } from "child_process";
export interface NamedObjectInfo {
pureName: string;
schemaName: string;
}
export interface ColumnInfo {
columnName: string;
notNull: boolean;
autoIncrement: boolean;
dataType: string;
precision: number;
scale: number;
length: number;
computedExpression: string;
isPersisted: boolean;
isSparse: boolean;
defaultValue: string;
defaultConstraint: string;
}
export interface TableInfo extends NamedObjectInfo {
columns: ColumnInfo[];
}
export interface DatabaseInfo {
tables: TableInfo[];
}

View File

@@ -1,11 +0,0 @@
import { QueryResult } from "./query";
export interface EngineDriver {
connect({ server, port, user, password });
query(pool, sql: string): Promise<QueryResult>;
getVersion(pool): Promise<string>;
listDatabases(pool): Promise<{ name: string }[]>;
analyseFull(pool): Promise<void>;
analyseIncremental(pool): Promise<void>;
}

View File

@@ -1,13 +0,0 @@
import { ChildProcess } from "child_process";
import { DatabaseInfo } from "./dbinfo";
export interface OpenedDatabaseConnection {
conid: string;
database: string;
structure: DatabaseInfo;
subprocess: ChildProcess;
}
export * from "./engines";
export * from "./dbinfo";
export * from "./query";

View File

@@ -1,5 +0,0 @@
import { ChildProcess } from "child_process";
export interface QueryResult {
rows: any[];
}

View File

@@ -1,11 +0,0 @@
{
"compilerOptions": {
"target": "ES2015",
"module": "commonjs",
"declaration": true,
"outDir": "lib"
},
"include": [
"src/**/*"
]
}

View File

@@ -1,13 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@types/node@^13.7.0":
version "13.7.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.7.0.tgz#b417deda18cf8400f278733499ad5547ed1abec4"
integrity sha512-GnZbirvmqZUzMgkFn70c74OQpTTUcCzlhQliTzYjQMqg+hVKcDnxdL19Ne3UdYzdMA/+W3eb646FWn/ZaT1NfQ==
typescript@^3.7.5:
version "3.7.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae"
integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==