@quillsql/node 0.4.7 → 0.4.9

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.
package/dist/index.d.ts CHANGED
@@ -20,7 +20,7 @@ export declare enum DatabaseType {
20
20
  bigquery = "bigquery",
21
21
  mysql = "mysql"
22
22
  }
23
- export default class QuillClass {
23
+ export declare class Quill {
24
24
  targetConnection: CachedConnection;
25
25
  private baseUrl;
26
26
  private config;
@@ -37,3 +37,4 @@ export default class QuillClass {
37
37
  private postQuill;
38
38
  close(): Promise<void>;
39
39
  }
40
+ export { QuillQueryParams as QuillRequest } from "./models/Quill";
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.DatabaseType = void 0;
15
+ exports.Quill = exports.DatabaseType = void 0;
16
16
  const CachedConnection_1 = require("./db/CachedConnection");
17
17
  const axios_1 = __importDefault(require("axios"));
18
18
  require("dotenv/config");
@@ -29,7 +29,7 @@ var DatabaseType;
29
29
  DatabaseType["bigquery"] = "bigquery";
30
30
  DatabaseType["mysql"] = "mysql";
31
31
  })(DatabaseType || (exports.DatabaseType = DatabaseType = {}));
32
- class QuillClass {
32
+ class Quill {
33
33
  constructor(data) {
34
34
  const { privateKey, databaseType, databaseConnectionString, databaseConfig, cache, metadataServerURL, } = data;
35
35
  this.baseUrl = metadataServerURL ? metadataServerURL : HOST;
@@ -173,9 +173,9 @@ class QuillClass {
173
173
  });
174
174
  }
175
175
  }
176
- exports.default = QuillClass;
177
- const Quill = ({ privateKey, databaseConnectionString, databaseConfig, cache, databaseType, metadataServerURL, }) => {
178
- return new QuillClass({
176
+ exports.Quill = Quill;
177
+ const requireQuill = ({ privateKey, databaseConnectionString, databaseConfig, cache, databaseType, metadataServerURL, }) => {
178
+ return new Quill({
179
179
  privateKey,
180
180
  databaseType,
181
181
  databaseConnectionString,
@@ -184,9 +184,9 @@ const Quill = ({ privateKey, databaseConnectionString, databaseConfig, cache, da
184
184
  metadataServerURL,
185
185
  });
186
186
  };
187
- module.exports = Quill;
187
+ module.exports = requireQuill;
188
+ module.exports.default = requireQuill;
188
189
  module.exports.Quill = Quill;
189
- module.exports.default = Quill;
190
190
  module.exports.getTablesBySchemaByDatabase = DatabaseHelper_1.getTablesBySchemaByDatabase;
191
191
  module.exports.getDatabaseCredentials = DatabaseHelper_1.getDatabaseCredentials;
192
192
  module.exports.getColumnsByTableByDatabase = DatabaseHelper_1.getColumnsByTableByDatabase;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillsql/node",
3
- "version": "0.4.7",
3
+ "version": "0.4.9",
4
4
  "description": "Quill Server SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "module": "./dist/index.js",
package/src/index.ts CHANGED
@@ -44,7 +44,7 @@ export enum DatabaseType {
44
44
  mysql = "mysql",
45
45
  }
46
46
 
47
- export default class QuillClass {
47
+ export class Quill {
48
48
  // Configure cached connection pools with the given config.
49
49
  public targetConnection;
50
50
  private baseUrl: string;
@@ -265,7 +265,7 @@ export default class QuillClass {
265
265
  }
266
266
  }
267
267
 
268
- const Quill = ({
268
+ const requireQuill = ({
269
269
  privateKey,
270
270
  databaseConnectionString,
271
271
  databaseConfig,
@@ -280,7 +280,7 @@ const Quill = ({
280
280
  databaseConfig: any;
281
281
  metadataServerURL?: string;
282
282
  }) => {
283
- return new QuillClass({
283
+ return new Quill({
284
284
  privateKey,
285
285
  databaseType,
286
286
  databaseConnectionString,
@@ -290,9 +290,9 @@ const Quill = ({
290
290
  });
291
291
  };
292
292
 
293
- module.exports = Quill;
293
+ module.exports = requireQuill;
294
+ module.exports.default = requireQuill;
294
295
  module.exports.Quill = Quill;
295
- module.exports.default = Quill;
296
296
  module.exports.getTablesBySchemaByDatabase = getTablesBySchemaByDatabase;
297
297
  module.exports.getDatabaseCredentials = getDatabaseCredentials;
298
298
  module.exports.getColumnsByTableByDatabase = getColumnsByTableByDatabase;
@@ -303,3 +303,5 @@ module.exports.getColumnInfoBySchemaByDatabase =
303
303
  module.exports.connectToDatabase = connectToDatabase;
304
304
  module.exports.runQueryByDatabase = runQueryByDatabase;
305
305
  module.exports.DatabaseType = DatabaseType;
306
+
307
+ export { QuillQueryParams as QuillRequest } from "./models/Quill";