@nymphjs/driver-postgresql 1.0.0-beta.5 → 1.0.0-beta.51
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/CHANGELOG.md +198 -0
- package/dist/PostgreSQLDriver.d.ts +1 -13
- package/dist/PostgreSQLDriver.js +128 -185
- package/dist/PostgreSQLDriver.js.map +1 -1
- package/package.json +16 -18
- package/src/PostgreSQLDriver.ts +406 -527
- package/typedoc.json +4 -0
- package/dist/runPostgresqlSync.js +0 -35
- package/src/runPostgresqlSync.js +0 -35
- package/src/testpostgresql.js +0 -59
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,204 @@
|
|
|
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.0.0-beta.51](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.50...v1.0.0-beta.51) (2024-04-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
9
|
+
|
|
10
|
+
# [1.0.0-beta.50](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.49...v1.0.0-beta.50) (2024-04-08)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
13
|
+
|
|
14
|
+
# [1.0.0-beta.49](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.48...v1.0.0-beta.49) (2024-03-04)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
17
|
+
|
|
18
|
+
# [1.0.0-beta.48](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.47...v1.0.0-beta.48) (2023-11-10)
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
- avoid trying to roll back a transaction twice ([e26ef31](https://github.com/sciactive/nymphjs/commit/e26ef312b617edcc715c81e7f92875dfaa7a904a))
|
|
23
|
+
|
|
24
|
+
# [1.0.0-beta.47](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.46...v1.0.0-beta.47) (2023-11-10)
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
- nymph stays in a new transaction on the parent instance ([1857046](https://github.com/sciactive/nymphjs/commit/185704666715162d8482326eaba7c2532297432c))
|
|
29
|
+
|
|
30
|
+
# [1.0.0-beta.46](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.45...v1.0.0-beta.46) (2023-08-29)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
33
|
+
|
|
34
|
+
# [1.0.0-beta.45](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.44...v1.0.0-beta.45) (2023-07-17)
|
|
35
|
+
|
|
36
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
37
|
+
|
|
38
|
+
# [1.0.0-beta.44](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.43...v1.0.0-beta.44) (2023-07-13)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
41
|
+
|
|
42
|
+
# [1.0.0-beta.43](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.42...v1.0.0-beta.43) (2023-07-12)
|
|
43
|
+
|
|
44
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
45
|
+
|
|
46
|
+
# [1.0.0-beta.42](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.41...v1.0.0-beta.42) (2023-07-12)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
49
|
+
|
|
50
|
+
# [1.0.0-beta.41](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.40...v1.0.0-beta.41) (2023-07-12)
|
|
51
|
+
|
|
52
|
+
### Features
|
|
53
|
+
|
|
54
|
+
- remove synchronous database queries ([b579fb2](https://github.com/sciactive/nymphjs/commit/b579fb2eacd96cdd1b386a62c5c00cdbb2438f6e))
|
|
55
|
+
|
|
56
|
+
# [1.0.0-beta.40](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.39...v1.0.0-beta.40) (2023-07-10)
|
|
57
|
+
|
|
58
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
59
|
+
|
|
60
|
+
# [1.0.0-beta.39](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.38...v1.0.0-beta.39) (2023-07-09)
|
|
61
|
+
|
|
62
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
63
|
+
|
|
64
|
+
# [1.0.0-beta.38](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.37...v1.0.0-beta.38) (2023-07-09)
|
|
65
|
+
|
|
66
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
67
|
+
|
|
68
|
+
# [1.0.0-beta.37](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.36...v1.0.0-beta.37) (2023-07-09)
|
|
69
|
+
|
|
70
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
71
|
+
|
|
72
|
+
# [1.0.0-beta.36](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.35...v1.0.0-beta.36) (2023-07-09)
|
|
73
|
+
|
|
74
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
75
|
+
|
|
76
|
+
# [1.0.0-beta.35](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.34...v1.0.0-beta.35) (2023-06-14)
|
|
77
|
+
|
|
78
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
79
|
+
|
|
80
|
+
# [1.0.0-beta.34](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.33...v1.0.0-beta.34) (2023-05-13)
|
|
81
|
+
|
|
82
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
83
|
+
|
|
84
|
+
# [1.0.0-beta.33](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.32...v1.0.0-beta.33) (2023-05-13)
|
|
85
|
+
|
|
86
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
87
|
+
|
|
88
|
+
# [1.0.0-beta.32](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.31...v1.0.0-beta.32) (2023-05-13)
|
|
89
|
+
|
|
90
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
91
|
+
|
|
92
|
+
# [1.0.0-beta.31](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.30...v1.0.0-beta.31) (2023-05-12)
|
|
93
|
+
|
|
94
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
95
|
+
|
|
96
|
+
# [1.0.0-beta.30](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.29...v1.0.0-beta.30) (2023-05-12)
|
|
97
|
+
|
|
98
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
99
|
+
|
|
100
|
+
# [1.0.0-beta.29](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.28...v1.0.0-beta.29) (2023-05-08)
|
|
101
|
+
|
|
102
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
103
|
+
|
|
104
|
+
# [1.0.0-beta.28](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.27...v1.0.0-beta.28) (2023-05-05)
|
|
105
|
+
|
|
106
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
107
|
+
|
|
108
|
+
# [1.0.0-beta.27](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.26...v1.0.0-beta.27) (2023-05-04)
|
|
109
|
+
|
|
110
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
111
|
+
|
|
112
|
+
# [1.0.0-beta.26](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.25...v1.0.0-beta.26) (2023-05-04)
|
|
113
|
+
|
|
114
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
115
|
+
|
|
116
|
+
# [1.0.0-beta.25](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.24...v1.0.0-beta.25) (2023-05-04)
|
|
117
|
+
|
|
118
|
+
### Bug Fixes
|
|
119
|
+
|
|
120
|
+
- don't create empty entities ([1d4d2e9](https://github.com/sciactive/nymphjs/commit/1d4d2e99af2e9cdc647bcf58ac34572836f41176))
|
|
121
|
+
|
|
122
|
+
# [1.0.0-beta.24](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.23...v1.0.0-beta.24) (2023-05-02)
|
|
123
|
+
|
|
124
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
125
|
+
|
|
126
|
+
# [1.0.0-beta.23](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.22...v1.0.0-beta.23) (2023-05-02)
|
|
127
|
+
|
|
128
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
129
|
+
|
|
130
|
+
# [1.0.0-beta.22](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.21...v1.0.0-beta.22) (2023-05-01)
|
|
131
|
+
|
|
132
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
133
|
+
|
|
134
|
+
# [1.0.0-beta.21](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.20...v1.0.0-beta.21) (2023-05-01)
|
|
135
|
+
|
|
136
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
137
|
+
|
|
138
|
+
# [1.0.0-beta.20](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.19...v1.0.0-beta.20) (2023-04-30)
|
|
139
|
+
|
|
140
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
141
|
+
|
|
142
|
+
# [1.0.0-beta.19](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.18...v1.0.0-beta.19) (2023-04-29)
|
|
143
|
+
|
|
144
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
145
|
+
|
|
146
|
+
# [1.0.0-beta.18](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.17...v1.0.0-beta.18) (2023-04-27)
|
|
147
|
+
|
|
148
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
149
|
+
|
|
150
|
+
# [1.0.0-beta.17](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2023-04-24)
|
|
151
|
+
|
|
152
|
+
### Features
|
|
153
|
+
|
|
154
|
+
- use a long lived worker thread for synchronous mysql and postgres queries ([7e2bf84](https://github.com/sciactive/nymphjs/commit/7e2bf84a2d584d6906c31f44147025b793a05026))
|
|
155
|
+
|
|
156
|
+
# [1.0.0-beta.16](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2023-03-31)
|
|
157
|
+
|
|
158
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
159
|
+
|
|
160
|
+
# [1.0.0-beta.15](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2023-03-23)
|
|
161
|
+
|
|
162
|
+
### Features
|
|
163
|
+
|
|
164
|
+
- add option to sort results by a property ([16384e7](https://github.com/sciactive/nymphjs/commit/16384e7bdab88abb55ccccabb06ac09f92fa8a03))
|
|
165
|
+
|
|
166
|
+
# [1.0.0-beta.14](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2023-03-17)
|
|
167
|
+
|
|
168
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
169
|
+
|
|
170
|
+
# [1.0.0-beta.13](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2023-03-16)
|
|
171
|
+
|
|
172
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
173
|
+
|
|
174
|
+
# [1.0.0-beta.12](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2023-03-04)
|
|
175
|
+
|
|
176
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
177
|
+
|
|
178
|
+
# [1.0.0-beta.11](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2023-02-27)
|
|
179
|
+
|
|
180
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
181
|
+
|
|
182
|
+
# [1.0.0-beta.10](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.9...v1.0.0-beta.10) (2023-01-19)
|
|
183
|
+
|
|
184
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
185
|
+
|
|
186
|
+
# [1.0.0-beta.9](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.8...v1.0.0-beta.9) (2023-01-09)
|
|
187
|
+
|
|
188
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
189
|
+
|
|
190
|
+
# [1.0.0-beta.8](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.7...v1.0.0-beta.8) (2023-01-09)
|
|
191
|
+
|
|
192
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
193
|
+
|
|
194
|
+
# [1.0.0-beta.7](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.6...v1.0.0-beta.7) (2023-01-05)
|
|
195
|
+
|
|
196
|
+
### Bug Fixes
|
|
197
|
+
|
|
198
|
+
- sqlite transaction returns wrong instance of nymph if it has been cloned ([b278c76](https://github.com/sciactive/nymphjs/commit/b278c7633722cb1cca7a941187ae2f1ff8ebdc7b))
|
|
199
|
+
|
|
200
|
+
# [1.0.0-beta.6](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.5...v1.0.0-beta.6) (2023-01-05)
|
|
201
|
+
|
|
202
|
+
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
203
|
+
|
|
6
204
|
# [1.0.0-beta.5](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.4...v1.0.0-beta.5) (2022-11-24)
|
|
7
205
|
|
|
8
206
|
**Note:** Version bump only for package @nymphjs/driver-postgresql
|
|
@@ -19,6 +19,7 @@ export default class PostgreSQLDriver extends NymphDriver {
|
|
|
19
19
|
static escape(input: string): string;
|
|
20
20
|
static escapeValue(input: string): string;
|
|
21
21
|
constructor(config: Partial<PostgreSQLDriverConfig>, link?: Pool, transaction?: PostgreSQLDriverTransaction);
|
|
22
|
+
clone(): PostgreSQLDriver;
|
|
22
23
|
private getConnection;
|
|
23
24
|
connect(): Promise<true>;
|
|
24
25
|
disconnect(): Promise<false>;
|
|
@@ -27,12 +28,9 @@ export default class PostgreSQLDriver extends NymphDriver {
|
|
|
27
28
|
private createTables;
|
|
28
29
|
private translateQuery;
|
|
29
30
|
private query;
|
|
30
|
-
private querySync;
|
|
31
31
|
private queryIter;
|
|
32
|
-
private queryIterSync;
|
|
33
32
|
private queryGet;
|
|
34
33
|
private queryRun;
|
|
35
|
-
private queryRunSync;
|
|
36
34
|
commit(name: string): Promise<boolean>;
|
|
37
35
|
deleteEntityByID(guid: string, className?: EntityConstructor | string | null): Promise<boolean>;
|
|
38
36
|
deleteUID(name: string): Promise<boolean>;
|
|
@@ -41,9 +39,6 @@ export default class PostgreSQLDriver extends NymphDriver {
|
|
|
41
39
|
protected performQuery(options: Options, formattedSelectors: FormattedSelector[], etype: string): {
|
|
42
40
|
result: any;
|
|
43
41
|
};
|
|
44
|
-
protected performQuerySync(options: Options, formattedSelectors: FormattedSelector[], etype: string): {
|
|
45
|
-
result: any;
|
|
46
|
-
};
|
|
47
42
|
getEntities<T extends EntityConstructor = EntityConstructor>(options: Options<T> & {
|
|
48
43
|
return: 'count';
|
|
49
44
|
}, ...selectors: Selector[]): Promise<number>;
|
|
@@ -51,13 +46,6 @@ export default class PostgreSQLDriver extends NymphDriver {
|
|
|
51
46
|
return: 'guid';
|
|
52
47
|
}, ...selectors: Selector[]): Promise<string[]>;
|
|
53
48
|
getEntities<T extends EntityConstructor = EntityConstructor>(options?: Options<T>, ...selectors: Selector[]): Promise<ReturnType<T['factorySync']>[]>;
|
|
54
|
-
protected getEntitiesSync<T extends EntityConstructor = EntityConstructor>(options: Options<T> & {
|
|
55
|
-
return: 'count';
|
|
56
|
-
}, ...selectors: Selector[]): number;
|
|
57
|
-
protected getEntitiesSync<T extends EntityConstructor = EntityConstructor>(options: Options<T> & {
|
|
58
|
-
return: 'guid';
|
|
59
|
-
}, ...selectors: Selector[]): string[];
|
|
60
|
-
protected getEntitiesSync<T extends EntityConstructor = EntityConstructor>(options?: Options<T>, ...selectors: Selector[]): ReturnType<T['factorySync']>[];
|
|
61
49
|
getUID(name: string): Promise<number | null>;
|
|
62
50
|
import(filename: string): Promise<boolean>;
|
|
63
51
|
newUID(name: string): Promise<number>;
|