@squiz/db-lib 1.40.1-alpha.24 → 1.40.1-alpha.26
Sign up to get free protection for your applications and to get access to all the features.
- package/.npm/_logs/{2023-07-25T00_47_58_270Z-debug-0.log → 2023-07-25T03_32_47_960Z-debug-0.log} +15 -15
- package/lib/AbstractRepository.d.ts +2 -2
- package/lib/index.js +3 -2
- package/lib/index.js.map +2 -2
- package/package.json +4 -4
- package/src/AbstractRepository.ts +3 -6
- package/tsconfig.tsbuildinfo +1 -1
package/.npm/_logs/{2023-07-25T00_47_58_270Z-debug-0.log → 2023-07-25T03_32_47_960Z-debug-0.log}
RENAMED
@@ -1,37 +1,37 @@
|
|
1
1
|
0 verbose cli /usr/local/bin/node /usr/local/bin/npm
|
2
2
|
1 info using npm@9.5.0
|
3
3
|
2 info using node@v18.15.0
|
4
|
-
3 timing npm:load:whichnode Completed in
|
4
|
+
3 timing npm:load:whichnode Completed in 1ms
|
5
5
|
4 timing config:load:defaults Completed in 2ms
|
6
|
-
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in
|
6
|
+
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 0ms
|
7
7
|
6 timing config:load:builtin Completed in 1ms
|
8
|
-
7 timing config:load:cli Completed in
|
8
|
+
7 timing config:load:cli Completed in 1ms
|
9
9
|
8 timing config:load:env Completed in 1ms
|
10
10
|
9 info found workspace root at /builds/developer-experience/cmp
|
11
11
|
10 timing config:load:file:/builds/developer-experience/cmp/.npmrc Completed in 0ms
|
12
|
-
11 timing config:load:project Completed in
|
12
|
+
11 timing config:load:project Completed in 25ms
|
13
13
|
12 timing config:load:file:/root/.npmrc Completed in 1ms
|
14
|
-
13 timing config:load:user Completed in
|
14
|
+
13 timing config:load:user Completed in 2ms
|
15
15
|
14 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
|
16
16
|
15 timing config:load:global Completed in 0ms
|
17
17
|
16 timing config:load:setEnvs Completed in 1ms
|
18
|
-
17 timing config:load Completed in
|
19
|
-
18 timing npm:load:configload Completed in
|
18
|
+
17 timing config:load Completed in 34ms
|
19
|
+
18 timing npm:load:configload Completed in 34ms
|
20
20
|
19 timing npm:load:mkdirpcache Completed in 1ms
|
21
21
|
20 timing npm:load:mkdirplogs Completed in 0ms
|
22
22
|
21 verbose title npm run compile
|
23
23
|
22 verbose argv "run" "compile" "--"
|
24
|
-
23 timing npm:load:setTitle Completed in
|
24
|
+
23 timing npm:load:setTitle Completed in 1ms
|
25
25
|
24 timing config:load:flatten Completed in 4ms
|
26
|
-
25 timing npm:load:display Completed in
|
27
|
-
26 verbose logfile logs-max:10 dir:/builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-07-
|
28
|
-
27 verbose logfile /builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-07-
|
29
|
-
28 timing npm:load:logFile Completed in
|
26
|
+
25 timing npm:load:display Completed in 6ms
|
27
|
+
26 verbose logfile logs-max:10 dir:/builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-07-25T03_32_47_960Z-
|
28
|
+
27 verbose logfile /builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-07-25T03_32_47_960Z-debug-0.log
|
29
|
+
28 timing npm:load:logFile Completed in 4ms
|
30
30
|
29 timing npm:load:timers Completed in 0ms
|
31
31
|
30 timing npm:load:configScope Completed in 0ms
|
32
|
-
31 timing npm:load Completed in
|
32
|
+
31 timing npm:load Completed in 48ms
|
33
33
|
32 silly logfile done cleaning log files
|
34
|
-
33 timing command:run Completed in
|
34
|
+
33 timing command:run Completed in 3680ms
|
35
35
|
34 verbose exit 0
|
36
|
-
35 timing npm Completed in
|
36
|
+
35 timing npm Completed in 3743ms
|
37
37
|
36 info ok
|
@@ -43,9 +43,9 @@ export declare abstract class AbstractRepository<SHAPE extends object, DATA_CLAS
|
|
43
43
|
delete(where: Partial<SHAPE>, transactionClient?: PoolClient | null): Promise<number>;
|
44
44
|
protected createWhereStringFromPartialModel(values: Partial<SHAPE>, initialIndex?: number): string;
|
45
45
|
protected executeQueryRaw(query: string, values: any[], transactionClient?: PoolClient | null): Promise<any[]>;
|
46
|
-
|
46
|
+
executeQuery(query: string, values: any[], transactionClient?: PoolClient | null): Promise<SHAPE[]>;
|
47
47
|
protected createAndHydrateModel(row: any): SHAPE;
|
48
|
-
findOne(item: Partial<SHAPE
|
48
|
+
findOne(item: Partial<SHAPE>, transactionClient?: PoolClient): Promise<SHAPE | undefined>;
|
49
49
|
find(item: Partial<SHAPE>): Promise<SHAPE[]>;
|
50
50
|
findAll(): Promise<SHAPE[]>;
|
51
51
|
getCount(item?: Partial<SHAPE> | null): Promise<number>;
|
package/lib/index.js
CHANGED
@@ -81629,13 +81629,14 @@ var AbstractRepository = class {
|
|
81629
81629
|
}
|
81630
81630
|
return new this.classRef(inputData);
|
81631
81631
|
}
|
81632
|
-
async findOne(item) {
|
81632
|
+
async findOne(item, transactionClient) {
|
81633
81633
|
const result = await this.executeQuery(
|
81634
81634
|
`SELECT *
|
81635
81635
|
FROM ${this.tableName}
|
81636
81636
|
WHERE ${this.createWhereStringFromPartialModel(item)}
|
81637
81637
|
LIMIT 1`,
|
81638
|
-
Object.values(item)
|
81638
|
+
Object.values(item),
|
81639
|
+
transactionClient
|
81639
81640
|
);
|
81640
81641
|
return result[0];
|
81641
81642
|
}
|