@quillsql/node 0.5.7 → 0.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,7 @@ export interface MysqlConnectionConfig {
5
5
  user: string;
6
6
  password: string;
7
7
  database: string;
8
+ port: number;
8
9
  }
9
10
  export declare function formatMysqlConfig(connectionString: string): MysqlConnectionConfig;
10
11
  export declare function connectToMysql(config: MysqlConnectionConfig): MysqlPool;
package/dist/db/Mysql.js CHANGED
@@ -24,6 +24,7 @@ function formatMysqlConfig(connectionString) {
24
24
  user: user || "",
25
25
  password: password || "",
26
26
  database: (parsedUrl.pathname || "").slice(1),
27
+ port: parsedUrl.port ? parseInt(parsedUrl.port) : 3306,
27
28
  };
28
29
  }
29
30
  exports.formatMysqlConfig = formatMysqlConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillsql/node",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "description": "Quill Server SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "module": "./dist/index.js",
package/src/db/Mysql.ts CHANGED
@@ -10,6 +10,7 @@ export interface MysqlConnectionConfig {
10
10
  user: string;
11
11
  password: string;
12
12
  database: string;
13
+ port: number;
13
14
  }
14
15
 
15
16
  export function formatMysqlConfig(
@@ -22,6 +23,7 @@ export function formatMysqlConfig(
22
23
  user: user || "",
23
24
  password: password || "",
24
25
  database: (parsedUrl.pathname || "").slice(1),
26
+ port: parsedUrl.port ? parseInt(parsedUrl.port) : 3306,
25
27
  };
26
28
  }
27
29
 
@@ -149,7 +151,7 @@ export async function getForeignKeysMysql(
149
151
  export async function getSchemaColumnInfoMysql(
150
152
  connection: MysqlPool,
151
153
  schemaName: string,
152
- tableNames: { tableName: string; schemaName: string }[]
154
+ tableNames: { tableName: string; schemaName: string }[]
153
155
  ): Promise<
154
156
  { tableName: string; columns: { columnName: string; dataTypeID: number }[] }[]
155
157
  > {