@squiz/db-lib 1.2.1-alpha.106 → 1.2.1-alpha.87
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +0 -120
- package/lib/AbstractRepository.d.ts +5 -7
- package/lib/index.d.ts +0 -2
- package/lib/index.js +1312 -12208
- package/lib/index.js.map +4 -4
- package/package.json +11 -10
- package/src/AbstractRepository.ts +9 -13
- package/src/Migrator.ts +9 -13
- package/src/index.ts +0 -5
- package/tsconfig.json +1 -5
- package/tsconfig.tsbuildinfo +1 -1
- package/lib/PostgresErrorCodes.d.ts +0 -268
- package/src/PostgresErrorCodes.ts +0 -270
package/CHANGELOG.md
CHANGED
@@ -3,126 +3,6 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
-
## [1.2.1-alpha.106](https://gitlab.squiz.net/developer-experience/cmp/compare/v1.2.1-alpha.90...v1.2.1-alpha.106) (2022-09-02)
|
7
|
-
|
8
|
-
**Note:** Version bump only for package @squiz/db-lib
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
## [1.2.1-alpha.105](https://gitlab.squiz.net/developer-experience/cmp/compare/v1.2.1-alpha.90...v1.2.1-alpha.105) (2022-08-26)
|
15
|
-
|
16
|
-
**Note:** Version bump only for package @squiz/db-lib
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
## [1.2.1-alpha.104](https://gitlab.squiz.net/developer-experience/cmp/compare/v1.2.1-alpha.90...v1.2.1-alpha.104) (2022-08-23)
|
23
|
-
|
24
|
-
**Note:** Version bump only for package @squiz/db-lib
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
## [1.2.1-alpha.103](https://gitlab.squiz.net/developer-experience/cmp/compare/v1.2.1-alpha.90...v1.2.1-alpha.103) (2022-08-23)
|
31
|
-
|
32
|
-
**Note:** Version bump only for package @squiz/db-lib
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
## [1.2.1-alpha.102](https://gitlab.squiz.net/developer-experience/cmp/compare/v1.2.1-alpha.90...v1.2.1-alpha.102) (2022-08-23)
|
39
|
-
|
40
|
-
**Note:** Version bump only for package @squiz/db-lib
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
## [1.2.1-alpha.101](https://gitlab.squiz.net/developer-experience/cmp/compare/v1.2.1-alpha.90...v1.2.1-alpha.101) (2022-08-19)
|
47
|
-
|
48
|
-
**Note:** Version bump only for package @squiz/db-lib
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
## [1.2.1-alpha.100](https://gitlab.squiz.net/developer-experience/cmp/compare/v1.2.1-alpha.90...v1.2.1-alpha.100) (2022-08-18)
|
55
|
-
|
56
|
-
**Note:** Version bump only for package @squiz/db-lib
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
## [1.2.1-alpha.99](https://gitlab.squiz.net/developer-experience/cmp/compare/v1.2.1-alpha.90...v1.2.1-alpha.99) (2022-08-18)
|
63
|
-
|
64
|
-
**Note:** Version bump only for package @squiz/db-lib
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
## [1.2.1-alpha.98](https://gitlab.squiz.net/developer-experience/cmp/compare/v1.2.1-alpha.90...v1.2.1-alpha.98) (2022-08-17)
|
71
|
-
|
72
|
-
**Note:** Version bump only for package @squiz/db-lib
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
## [1.2.1-alpha.97](https://gitlab.squiz.net/developer-experience/cmp/compare/v1.2.1-alpha.90...v1.2.1-alpha.97) (2022-08-17)
|
79
|
-
|
80
|
-
**Note:** Version bump only for package @squiz/db-lib
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
## [1.2.1-alpha.96](https://gitlab.squiz.net/developer-experience/cmp/compare/v1.2.1-alpha.90...v1.2.1-alpha.96) (2022-08-12)
|
87
|
-
|
88
|
-
**Note:** Version bump only for package @squiz/db-lib
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
## [1.2.1-alpha.95](https://gitlab.squiz.net/developer-experience/cmp/compare/v1.2.1-alpha.90...v1.2.1-alpha.95) (2022-08-10)
|
95
|
-
|
96
|
-
**Note:** Version bump only for package @squiz/db-lib
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
## [1.2.1-alpha.90](https://gitlab.squiz.net/developer-experience/cmp/compare/v1.2.1-alpha.89...v1.2.1-alpha.90) (2022-08-05)
|
103
|
-
|
104
|
-
**Note:** Version bump only for package @squiz/db-lib
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
## [1.2.1-alpha.89](https://gitlab.squiz.net/developer-experience/cmp/compare/v1.2.1-alpha.88...v1.2.1-alpha.89) (2022-08-05)
|
111
|
-
|
112
|
-
**Note:** Version bump only for package @squiz/db-lib
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
## [1.2.1-alpha.88](https://gitlab.squiz.net/developer-experience/cmp/compare/v1.2.1-alpha.67...v1.2.1-alpha.88) (2022-08-05)
|
119
|
-
|
120
|
-
**Note:** Version bump only for package @squiz/db-lib
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
6
|
## [1.2.1-alpha.87](https://gitlab.squiz.net/developer-experience/cmp/compare/v1.2.1-alpha.67...v1.2.1-alpha.87) (2022-08-05)
|
127
7
|
|
128
8
|
**Note:** Version bump only for package @squiz/db-lib
|
@@ -10,28 +10,26 @@ export interface Writer<T> {
|
|
10
10
|
delete(where: Partial<T>): Promise<number>;
|
11
11
|
}
|
12
12
|
export declare type Repository<T> = Reader<T> & Writer<T>;
|
13
|
-
export declare abstract class AbstractRepository<T
|
13
|
+
export declare abstract class AbstractRepository<T> implements Reader<T>, Writer<T> {
|
14
14
|
protected repositories: Repositories;
|
15
15
|
protected pool: Pool;
|
16
16
|
protected classRef: {
|
17
|
-
new (
|
17
|
+
new (): T;
|
18
18
|
};
|
19
19
|
protected tableName: string;
|
20
|
-
/** object where the key is the model property name amd the value is sql column name */
|
21
20
|
protected modelPropertyToSqlColumn: {
|
22
21
|
[key in keyof T]: string;
|
23
22
|
};
|
24
|
-
/** object where the key is the sql column name and the value is the model property name */
|
25
23
|
protected sqlColumnToModelProperty: {
|
26
|
-
[key: string]:
|
24
|
+
[key: string]: keyof T;
|
27
25
|
};
|
28
26
|
constructor(repositories: Repositories, pool: Pool, tableName: string, mapping: {
|
29
27
|
[key in keyof T]: string;
|
30
28
|
}, classRef: {
|
31
|
-
new (
|
29
|
+
new (): T;
|
32
30
|
});
|
33
31
|
protected getConnection(): Promise<PoolClient>;
|
34
|
-
create(value:
|
32
|
+
create(value: Partial<T>, transactionClient?: PoolClient | null): Promise<T>;
|
35
33
|
update(where: Partial<T>, newValue: Partial<T>, transactionClient?: PoolClient | null): Promise<T[]>;
|
36
34
|
delete(where: Partial<T>, transactionClient?: PoolClient | null): Promise<number>;
|
37
35
|
protected createWhereStringFromPartialModel(values: Partial<T>, initialIndex?: number): string;
|