@starbemtech/star-db-query-builder 1.0.4 → 1.0.6
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/coverage/clover.xml +2 -2
- package/coverage/lcov-report/index.html +1 -1
- package/index.d.ts +8 -7
- package/index.ts +2 -1
- package/package.json +1 -1
package/coverage/clover.xml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
2
|
+
<coverage generated="1712086913135" clover="3.2.0">
|
|
3
|
+
<project timestamp="1712086913135" 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 2024-
|
|
89
|
+
at 2024-04-02T19:41:53.131Z
|
|
90
90
|
</div>
|
|
91
91
|
<script src="prettify.js"></script>
|
|
92
92
|
<script>
|
package/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { IDatabaseClient } from './src/db/IDatabaseClient'
|
|
2
|
-
import { DBClients, QueryParams } from './src/default/types'
|
|
2
|
+
import { DBClients, QueryParams, Conditions } from './src/default/types'
|
|
3
3
|
|
|
4
4
|
export declare function initDb<T>(config: { type: DBClients; options: T }): void
|
|
5
5
|
export declare function getDbClient(): IDatabaseClient
|
|
6
|
+
export { Conditions }
|
|
6
7
|
|
|
7
8
|
export declare function findFirst<T>({
|
|
8
9
|
tableName,
|
|
@@ -11,7 +12,7 @@ export declare function findFirst<T>({
|
|
|
11
12
|
where,
|
|
12
13
|
groupBy,
|
|
13
14
|
orderBy,
|
|
14
|
-
}: QueryParams): Promise<T>
|
|
15
|
+
}: QueryParams<T>): Promise<T>
|
|
15
16
|
|
|
16
17
|
export declare function findMany<T>({
|
|
17
18
|
tableName,
|
|
@@ -21,14 +22,14 @@ export declare function findMany<T>({
|
|
|
21
22
|
groupBy,
|
|
22
23
|
orderBy,
|
|
23
24
|
limit,
|
|
24
|
-
}: QueryParams): Promise<T[]>
|
|
25
|
+
}: QueryParams<T>): Promise<T[]>
|
|
25
26
|
|
|
26
27
|
export declare function insert<T>({
|
|
27
28
|
tableName,
|
|
28
29
|
dbClient,
|
|
29
30
|
data,
|
|
30
31
|
returning,
|
|
31
|
-
}: QueryParams & { data: T; returning?: string[] }): Promise<T | void>
|
|
32
|
+
}: QueryParams<T> & { data: T; returning?: string[] }): Promise<T | void>
|
|
32
33
|
|
|
33
34
|
export declare function update<T>({
|
|
34
35
|
tableName,
|
|
@@ -36,11 +37,11 @@ export declare function update<T>({
|
|
|
36
37
|
id,
|
|
37
38
|
data,
|
|
38
39
|
returning,
|
|
39
|
-
}: QueryParams & { data: T; returning?: string[] }): Promise<T | void>
|
|
40
|
+
}: QueryParams<T> & { data: T; returning?: string[] }): Promise<T | void>
|
|
40
41
|
|
|
41
|
-
export declare function deleteOne({
|
|
42
|
+
export declare function deleteOne<T>({
|
|
42
43
|
tableName,
|
|
43
44
|
dbClient,
|
|
44
45
|
id,
|
|
45
46
|
permanently,
|
|
46
|
-
}: QueryParams & { permanently?: boolean }): Promise<void>
|
|
47
|
+
}: QueryParams<T> & { permanently?: boolean }): Promise<void>
|
package/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PoolConfig as PgPoolConfig } from 'pg'
|
|
2
2
|
import { PoolOptions as MySqlPoolOptions } from 'mysql2'
|
|
3
|
+
import { Conditions } from './src/default/types'
|
|
3
4
|
|
|
4
5
|
// Configs
|
|
5
6
|
export * from './src/db/initDb'
|
|
@@ -8,4 +9,4 @@ export * from './src/db/initDb'
|
|
|
8
9
|
export * from './src/default/genericRepository'
|
|
9
10
|
|
|
10
11
|
// Types Definition
|
|
11
|
-
export type { PgPoolConfig, MySqlPoolOptions }
|
|
12
|
+
export type { PgPoolConfig, MySqlPoolOptions, Conditions }
|
package/package.json
CHANGED