@technicity/data-service-generator 0.23.0-next.8 → 0.23.0-next.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.
@@ -9,6 +9,9 @@ type IGenerateInput = {
9
9
  host?: string;
10
10
  port?: number;
11
11
  server?: string;
12
+ clientOpts?: {
13
+ [k: string]: any;
14
+ };
12
15
  outdir: string;
13
16
  tables?: Array<string>;
14
17
  excludeTables?: Array<string>;
@@ -234,7 +234,8 @@ function init(input) {
234
234
  password,
235
235
  host: host ?? "localhost",
236
236
  port: port ?? 3306,
237
- database
237
+ database,
238
+ ...input.clientOpts
238
239
  };
239
240
  const mysql = new MySQL_1.MySQL(connectionOpts);
240
241
  ctx.query = mysql.query.bind(mysql);
@@ -246,7 +247,8 @@ function init(input) {
246
247
  port: port ?? 5432,
247
248
  user,
248
249
  password,
249
- database
250
+ database,
251
+ ...input.clientOpts
250
252
  };
251
253
  const pool = new pg_1.Pool(connectionOpts);
252
254
  ctx.query = (q, values) => pool.query(q, values ?? []).then((r) => r.rows);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@technicity/data-service-generator",
3
- "version": "0.23.0-next.8",
3
+ "version": "0.23.0-next.9",
4
4
  "main": "./dist/index.js",
5
5
  "files": [
6
6
  "dist"