@starbemtech/star-db-query-builder 1.0.37 → 1.0.38

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.
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1745450914749" clover="3.2.0">
3
- <project timestamp="1745450914749" name="All files">
2
+ <coverage generated="1745451387556" clover="3.2.0">
3
+ <project timestamp="1745451387556" name="All files">
4
4
  <metrics statements="0" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0" elements="0" coveredelements="0" complexity="0" loc="0" ncloc="0" packages="0" files="0" classes="0"/>
5
5
  </project>
6
6
  </coverage>
@@ -86,7 +86,7 @@
86
86
  <div class='footer quiet pad2 space-top1 center small'>
87
87
  Code coverage generated by
88
88
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
89
- at 2025-04-23T23:28:34.744Z
89
+ at 2025-04-23T23:36:27.552Z
90
90
  </div>
91
91
  <script src="prettify.js"></script>
92
92
  <script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starbemtech/star-db-query-builder",
3
- "version": "1.0.37",
3
+ "version": "1.0.38",
4
4
  "description": "A query builder to be used with mysql or postgres",
5
5
  "author": "Julio Sousa <julio.sousa@starbem.app>",
6
6
  "main": "./dist/index.js",
@@ -50,7 +50,6 @@
50
50
  "typescript": "^5.8.2"
51
51
  },
52
52
  "dependencies": {
53
- "@starbemtech/star-db-query-builder": "link:",
54
53
  "mysql2": "^3.13.0",
55
54
  "pg": "^8.13.3",
56
55
  "promise-retry": "^2.0.1",
@@ -1,2 +0,0 @@
1
- import { QueryParams } from '../../default/types';
2
- export declare const getByUserAndSubscription: <T>({ tableName, dbClient, select, where, }: QueryParams<T>) => Promise<T | null>;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getByUserAndSubscription = void 0;
4
- const utils_1 = require("../../default/utils");
5
- const getByUserAndSubscription = async ({ tableName, dbClient, select, where, }) => {
6
- if (!tableName)
7
- throw new Error('Table name is required');
8
- if (!dbClient)
9
- throw new Error('DB client is required');
10
- const fields = (0, utils_1.createSelectFields)(select, dbClient.clientType);
11
- const [whereClause, params] = (0, utils_1.createWhereClause)(where, 1, dbClient.clientType);
12
- const rows = await dbClient.query(`SELECT
13
- ${fields}
14
- FROM payments.plan_association_users pa
15
- LEFT JOIN payments.plans ON pa.plan_id = plans.id
16
- ${whereClause}
17
- AND pa.status IN ('active', 'cancelation_requested', 'blocked')`, params);
18
- return rows || null;
19
- };
20
- exports.getByUserAndSubscription = getByUserAndSubscription;
21
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/payment/index.ts"],"names":[],"mappings":";;;AAAA,+CAA2E;AAGpE,MAAM,wBAAwB,GAAG,KAAK,EAAK,EAChD,SAAS,EACT,QAAQ,EACR,MAAM,EACN,KAAK,GACU,EAAqB,EAAE;IACtC,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAA;IACzD,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAA;IAEvD,MAAM,MAAM,GAAG,IAAA,0BAAkB,EAAC,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAA;IAC9D,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,GAAG,IAAA,yBAAiB,EAC7C,KAAK,EACL,CAAC,EACD,QAAQ,CAAC,UAAU,CACpB,CAAA;IAED,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,KAAK,CAC/B;UACM,MAAM;;;UAGN,WAAW;wEACmD,EACpE,MAAM,CACP,CAAA;IAED,OAAO,IAAI,IAAI,IAAI,CAAA;AACrB,CAAC,CAAA;AA3BY,QAAA,wBAAwB,4BA2BpC"}