@nymphjs/driver-postgresql 1.0.0-beta.8 → 1.0.0-beta.80

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 CHANGED
@@ -3,6 +3,359 @@
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.80](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.79...v1.0.0-beta.80) (2024-09-28)
7
+
8
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
9
+
10
+ # [1.0.0-beta.79](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.78...v1.0.0-beta.79) (2024-09-28)
11
+
12
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
13
+
14
+ # [1.0.0-beta.78](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.77...v1.0.0-beta.78) (2024-09-27)
15
+
16
+ ### Bug Fixes
17
+
18
+ - don't use transactions for import, to avoid issues when creating tables ([2f8f715](https://github.com/sciactive/nymphjs/commit/2f8f71545de6ca2f3235a9f3a3c91107f58129bf))
19
+ - potential bug with nulls in postgres ([1d8bc50](https://github.com/sciactive/nymphjs/commit/1d8bc500d752b1ef59d6591f3045bf4976eb7c00))
20
+
21
+ ### Features
22
+
23
+ - add method to detect if migration is needed ([274f7c3](https://github.com/sciactive/nymphjs/commit/274f7c39aa4e0d251a38c01593775e1270fc9621))
24
+ - move comparison fields to data table and remove comparison table ([3d7fe7e](https://github.com/sciactive/nymphjs/commit/3d7fe7e614327ecf8903ee7143e559549793e8fc))
25
+
26
+ ### BREAKING CHANGES
27
+
28
+ - This is a breaking change, and requires export and
29
+ import of the database.
30
+
31
+ # [1.0.0-beta.77](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.76...v1.0.0-beta.77) (2024-09-26)
32
+
33
+ ### Bug Fixes
34
+
35
+ - broken queries where param wasn't preceded by at sign ([de183bf](https://github.com/sciactive/nymphjs/commit/de183bf1ab440ee34a7b27b51c42867e9c035bc4))
36
+
37
+ # [1.0.0-beta.76](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.75...v1.0.0-beta.76) (2024-09-25)
38
+
39
+ ### Features
40
+
41
+ - add info level logging and log queries at this level ([afad941](https://github.com/sciactive/nymphjs/commit/afad941f46c4e594f0981de6443e4dd0b9ffdf4c))
42
+ - add json column to postgres and store json values there ([b9ccfd8](https://github.com/sciactive/nymphjs/commit/b9ccfd8d4877870d2662c60423e916ddf46244b2))
43
+
44
+ ### BREAKING CHANGES
45
+
46
+ - This is a breaking change, and requires export and
47
+ import of the database if you are using the Postgres driver.
48
+
49
+ # [1.0.0-beta.75](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.74...v1.0.0-beta.75) (2024-09-24)
50
+
51
+ ### Bug Fixes
52
+
53
+ - shrink btree index and use trigram index in postgres to support very long strings ([7f7bc78](https://github.com/sciactive/nymphjs/commit/7f7bc783f1daf04f443ae12dc2139d45a5570cb9))
54
+
55
+ # [1.0.0-beta.74](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.73...v1.0.0-beta.74) (2024-09-21)
56
+
57
+ ### Bug Fixes
58
+
59
+ - make sure tags don't contain empty strings when pulled from the db ([b67382f](https://github.com/sciactive/nymphjs/commit/b67382f3e23e616696373366d25148b8f2b93a47))
60
+
61
+ # [1.0.0-beta.73](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.72...v1.0.0-beta.73) (2024-09-20)
62
+
63
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
64
+
65
+ # [1.0.0-beta.72](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.71...v1.0.0-beta.72) (2024-09-20)
66
+
67
+ ### Bug Fixes
68
+
69
+ - optimize qref queries the same way ([6fcd92f](https://github.com/sciactive/nymphjs/commit/6fcd92f3289b2762fdf4549a88e80e4918cf8e19))
70
+ - postgres count queries with limit or offset ([edd586e](https://github.com/sciactive/nymphjs/commit/edd586e3e8c7f80093a258a9c328b7a298c555d7))
71
+
72
+ # [1.0.0-beta.71](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.70...v1.0.0-beta.71) (2024-09-20)
73
+
74
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
75
+
76
+ # [1.0.0-beta.70](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.69...v1.0.0-beta.70) (2024-09-20)
77
+
78
+ ### Bug Fixes
79
+
80
+ - optimize postgres queries ([764c95c](https://github.com/sciactive/nymphjs/commit/764c95c626290204b162245892e93c14bffd46a6))
81
+
82
+ # [1.0.0-beta.69](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.68...v1.0.0-beta.69) (2024-09-19)
83
+
84
+ ### Bug Fixes
85
+
86
+ - create postgres tables outside of transaction ([d95e320](https://github.com/sciactive/nymphjs/commit/d95e32025432540fea3523d8a6c6081122d5fc14))
87
+
88
+ # [1.0.0-beta.68](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.67...v1.0.0-beta.68) (2024-09-19)
89
+
90
+ ### Features
91
+
92
+ - add more indexes for postgres and sqlite ([704993e](https://github.com/sciactive/nymphjs/commit/704993ef10f049a886c36de15827736ef5d54c78))
93
+
94
+ # [1.0.0-beta.67](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.66...v1.0.0-beta.67) (2024-09-03)
95
+
96
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
97
+
98
+ # [1.0.0-beta.66](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.65...v1.0.0-beta.66) (2024-08-06)
99
+
100
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
101
+
102
+ # [1.0.0-beta.65](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.64...v1.0.0-beta.65) (2024-08-05)
103
+
104
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
105
+
106
+ # [1.0.0-beta.64](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.63...v1.0.0-beta.64) (2024-08-04)
107
+
108
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
109
+
110
+ # [1.0.0-beta.63](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.62...v1.0.0-beta.63) (2024-06-18)
111
+
112
+ ### Bug Fixes
113
+
114
+ - undo ts compilation to module change ([84be6d4](https://github.com/sciactive/nymphjs/commit/84be6d434be29f8afd53907d15be2eb77d1736ce))
115
+
116
+ ### Features
117
+
118
+ - allow importing from text and iterables ([9d766bd](https://github.com/sciactive/nymphjs/commit/9d766bdad4b0f17bc2dd68b0336a0064857eb4e9))
119
+ - export data iterator ([b86aa19](https://github.com/sciactive/nymphjs/commit/b86aa19fc77d744b5a683046dfb697fc4746df5c))
120
+
121
+ # [1.0.0-beta.62](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.61...v1.0.0-beta.62) (2024-06-15)
122
+
123
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
124
+
125
+ # [1.0.0-beta.61](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.60...v1.0.0-beta.61) (2024-06-14)
126
+
127
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
128
+
129
+ # [1.0.0-beta.60](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.59...v1.0.0-beta.60) (2024-06-14)
130
+
131
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
132
+
133
+ # [1.0.0-beta.59](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.58...v1.0.0-beta.59) (2024-06-14)
134
+
135
+ ### Features
136
+
137
+ - add uniqueness constraint feature, refactor some types ([8133d32](https://github.com/sciactive/nymphjs/commit/8133d32b2c04907182dca2e9171b8217ed1b57e4))
138
+
139
+ # [1.0.0-beta.58](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.57...v1.0.0-beta.58) (2024-06-12)
140
+
141
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
142
+
143
+ # [1.0.0-beta.57](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.56...v1.0.0-beta.57) (2024-06-12)
144
+
145
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
146
+
147
+ # [1.0.0-beta.56](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.55...v1.0.0-beta.56) (2024-06-11)
148
+
149
+ ### Bug Fixes
150
+
151
+ - import entities without transaction ([db56609](https://github.com/sciactive/nymphjs/commit/db56609efaadc16d5d1bbc8e9b50084aa8a076b9))
152
+
153
+ ### Features
154
+
155
+ - make transaction optional during import and off by default ([08d79f8](https://github.com/sciactive/nymphjs/commit/08d79f8f803c846ac79c0c489fc754437dae082b))
156
+
157
+ # [1.0.0-beta.55](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.54...v1.0.0-beta.55) (2024-05-26)
158
+
159
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
160
+
161
+ # [1.0.0-beta.54](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.53...v1.0.0-beta.54) (2024-05-26)
162
+
163
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
164
+
165
+ # [1.0.0-beta.53](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.52...v1.0.0-beta.53) (2024-05-26)
166
+
167
+ ### Features
168
+
169
+ - add pragma statements config to sqlite3 driver ([b0f27e2](https://github.com/sciactive/nymphjs/commit/b0f27e24df85663ea777565e5d352775efcad858))
170
+
171
+ # [1.0.0-beta.52](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.51...v1.0.0-beta.52) (2024-05-25)
172
+
173
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
174
+
175
+ # [1.0.0-beta.51](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.50...v1.0.0-beta.51) (2024-04-12)
176
+
177
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
178
+
179
+ # [1.0.0-beta.50](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.49...v1.0.0-beta.50) (2024-04-08)
180
+
181
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
182
+
183
+ # [1.0.0-beta.49](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.48...v1.0.0-beta.49) (2024-03-04)
184
+
185
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
186
+
187
+ # [1.0.0-beta.48](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.47...v1.0.0-beta.48) (2023-11-10)
188
+
189
+ ### Bug Fixes
190
+
191
+ - avoid trying to roll back a transaction twice ([e26ef31](https://github.com/sciactive/nymphjs/commit/e26ef312b617edcc715c81e7f92875dfaa7a904a))
192
+
193
+ # [1.0.0-beta.47](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.46...v1.0.0-beta.47) (2023-11-10)
194
+
195
+ ### Bug Fixes
196
+
197
+ - nymph stays in a new transaction on the parent instance ([1857046](https://github.com/sciactive/nymphjs/commit/185704666715162d8482326eaba7c2532297432c))
198
+
199
+ # [1.0.0-beta.46](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.45...v1.0.0-beta.46) (2023-08-29)
200
+
201
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
202
+
203
+ # [1.0.0-beta.45](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.44...v1.0.0-beta.45) (2023-07-17)
204
+
205
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
206
+
207
+ # [1.0.0-beta.44](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.43...v1.0.0-beta.44) (2023-07-13)
208
+
209
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
210
+
211
+ # [1.0.0-beta.43](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.42...v1.0.0-beta.43) (2023-07-12)
212
+
213
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
214
+
215
+ # [1.0.0-beta.42](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.41...v1.0.0-beta.42) (2023-07-12)
216
+
217
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
218
+
219
+ # [1.0.0-beta.41](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.40...v1.0.0-beta.41) (2023-07-12)
220
+
221
+ ### Features
222
+
223
+ - remove synchronous database queries ([b579fb2](https://github.com/sciactive/nymphjs/commit/b579fb2eacd96cdd1b386a62c5c00cdbb2438f6e))
224
+
225
+ # [1.0.0-beta.40](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.39...v1.0.0-beta.40) (2023-07-10)
226
+
227
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
228
+
229
+ # [1.0.0-beta.39](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.38...v1.0.0-beta.39) (2023-07-09)
230
+
231
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
232
+
233
+ # [1.0.0-beta.38](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.37...v1.0.0-beta.38) (2023-07-09)
234
+
235
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
236
+
237
+ # [1.0.0-beta.37](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.36...v1.0.0-beta.37) (2023-07-09)
238
+
239
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
240
+
241
+ # [1.0.0-beta.36](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.35...v1.0.0-beta.36) (2023-07-09)
242
+
243
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
244
+
245
+ # [1.0.0-beta.35](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.34...v1.0.0-beta.35) (2023-06-14)
246
+
247
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
248
+
249
+ # [1.0.0-beta.34](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.33...v1.0.0-beta.34) (2023-05-13)
250
+
251
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
252
+
253
+ # [1.0.0-beta.33](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.32...v1.0.0-beta.33) (2023-05-13)
254
+
255
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
256
+
257
+ # [1.0.0-beta.32](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.31...v1.0.0-beta.32) (2023-05-13)
258
+
259
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
260
+
261
+ # [1.0.0-beta.31](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.30...v1.0.0-beta.31) (2023-05-12)
262
+
263
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
264
+
265
+ # [1.0.0-beta.30](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.29...v1.0.0-beta.30) (2023-05-12)
266
+
267
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
268
+
269
+ # [1.0.0-beta.29](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.28...v1.0.0-beta.29) (2023-05-08)
270
+
271
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
272
+
273
+ # [1.0.0-beta.28](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.27...v1.0.0-beta.28) (2023-05-05)
274
+
275
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
276
+
277
+ # [1.0.0-beta.27](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.26...v1.0.0-beta.27) (2023-05-04)
278
+
279
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
280
+
281
+ # [1.0.0-beta.26](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.25...v1.0.0-beta.26) (2023-05-04)
282
+
283
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
284
+
285
+ # [1.0.0-beta.25](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.24...v1.0.0-beta.25) (2023-05-04)
286
+
287
+ ### Bug Fixes
288
+
289
+ - don't create empty entities ([1d4d2e9](https://github.com/sciactive/nymphjs/commit/1d4d2e99af2e9cdc647bcf58ac34572836f41176))
290
+
291
+ # [1.0.0-beta.24](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.23...v1.0.0-beta.24) (2023-05-02)
292
+
293
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
294
+
295
+ # [1.0.0-beta.23](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.22...v1.0.0-beta.23) (2023-05-02)
296
+
297
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
298
+
299
+ # [1.0.0-beta.22](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.21...v1.0.0-beta.22) (2023-05-01)
300
+
301
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
302
+
303
+ # [1.0.0-beta.21](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.20...v1.0.0-beta.21) (2023-05-01)
304
+
305
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
306
+
307
+ # [1.0.0-beta.20](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.19...v1.0.0-beta.20) (2023-04-30)
308
+
309
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
310
+
311
+ # [1.0.0-beta.19](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.18...v1.0.0-beta.19) (2023-04-29)
312
+
313
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
314
+
315
+ # [1.0.0-beta.18](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.17...v1.0.0-beta.18) (2023-04-27)
316
+
317
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
318
+
319
+ # [1.0.0-beta.17](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2023-04-24)
320
+
321
+ ### Features
322
+
323
+ - use a long lived worker thread for synchronous mysql and postgres queries ([7e2bf84](https://github.com/sciactive/nymphjs/commit/7e2bf84a2d584d6906c31f44147025b793a05026))
324
+
325
+ # [1.0.0-beta.16](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2023-03-31)
326
+
327
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
328
+
329
+ # [1.0.0-beta.15](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2023-03-23)
330
+
331
+ ### Features
332
+
333
+ - add option to sort results by a property ([16384e7](https://github.com/sciactive/nymphjs/commit/16384e7bdab88abb55ccccabb06ac09f92fa8a03))
334
+
335
+ # [1.0.0-beta.14](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2023-03-17)
336
+
337
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
338
+
339
+ # [1.0.0-beta.13](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2023-03-16)
340
+
341
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
342
+
343
+ # [1.0.0-beta.12](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2023-03-04)
344
+
345
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
346
+
347
+ # [1.0.0-beta.11](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2023-02-27)
348
+
349
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
350
+
351
+ # [1.0.0-beta.10](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.9...v1.0.0-beta.10) (2023-01-19)
352
+
353
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
354
+
355
+ # [1.0.0-beta.9](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.8...v1.0.0-beta.9) (2023-01-09)
356
+
357
+ **Note:** Version bump only for package @nymphjs/driver-postgresql
358
+
6
359
  # [1.0.0-beta.8](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.7...v1.0.0-beta.8) (2023-01-09)
7
360
 
8
361
  **Note:** Version bump only for package @nymphjs/driver-postgresql
@@ -1,5 +1,5 @@
1
1
  import { Pool, PoolClient } from 'pg';
2
- import { NymphDriver, EntityConstructor, EntityInterface, FormattedSelector, Options, Selector } from '@nymphjs/nymph';
2
+ import { NymphDriver, type EntityConstructor, type EntityInterface, type EntityInstanceType, type SerializedEntityData, type FormattedSelector, type Options, type Selector } from '@nymphjs/nymph';
3
3
  import { PostgreSQLDriverConfig } from './conf';
4
4
  type PostgreSQLDriverConnection = {
5
5
  client: PoolClient;
@@ -9,6 +9,9 @@ type PostgreSQLDriverTransaction = {
9
9
  connection: PostgreSQLDriverConnection | null;
10
10
  count: number;
11
11
  };
12
+ /**
13
+ * The PostgreSQL Nymph database driver.
14
+ */
12
15
  export default class PostgreSQLDriver extends NymphDriver {
13
16
  config: PostgreSQLDriverConfig;
14
17
  private postgresqlConfig;
@@ -18,55 +21,97 @@ export default class PostgreSQLDriver extends NymphDriver {
18
21
  protected transaction: PostgreSQLDriverTransaction | null;
19
22
  static escape(input: string): string;
20
23
  static escapeValue(input: string): string;
24
+ static escapeNullSequences(input: string): string;
25
+ static unescapeNullSequences(input: string): string;
26
+ static escapeNulls(input: string): string;
27
+ static unescapeNulls(input: string): string;
21
28
  constructor(config: Partial<PostgreSQLDriverConfig>, link?: Pool, transaction?: PostgreSQLDriverTransaction);
29
+ /**
30
+ * This is used internally by Nymph. Don't call it yourself.
31
+ *
32
+ * @returns A clone of this instance.
33
+ */
22
34
  clone(): PostgreSQLDriver;
23
35
  private getConnection;
36
+ /**
37
+ * Connect to the PostgreSQL database.
38
+ *
39
+ * @returns Whether this instance is connected to a PostgreSQL database.
40
+ */
24
41
  connect(): Promise<true>;
42
+ /**
43
+ * Disconnect from the PostgreSQL database.
44
+ *
45
+ * @returns Whether this instance is connected to a PostgreSQL database.
46
+ */
25
47
  disconnect(): Promise<false>;
26
48
  inTransaction(): Promise<boolean>;
49
+ /**
50
+ * Check connection status.
51
+ *
52
+ * @returns Whether this instance is connected to a PostgreSQL database.
53
+ */
27
54
  isConnected(): boolean;
55
+ /**
56
+ * Create entity tables in the database.
57
+ *
58
+ * @param etype The entity type to create a table for. If this is blank, the default tables are created.
59
+ * @returns True on success, false on failure.
60
+ */
28
61
  private createTables;
29
62
  private translateQuery;
30
63
  private query;
31
- private querySync;
32
64
  private queryIter;
33
- private queryIterSync;
34
65
  private queryGet;
35
66
  private queryRun;
36
- private queryRunSync;
37
67
  commit(name: string): Promise<boolean>;
38
68
  deleteEntityByID(guid: string, className?: EntityConstructor | string | null): Promise<boolean>;
39
69
  deleteUID(name: string): Promise<boolean>;
40
- protected exportEntities(writeLine: (line: string) => void): Promise<void>;
70
+ exportDataIterator(): AsyncGenerator<{
71
+ type: 'comment' | 'uid' | 'entity';
72
+ content: string;
73
+ }, void, false | undefined>;
74
+ /**
75
+ * Generate the PostgreSQL query.
76
+ * @param options The options array.
77
+ * @param formattedSelectors The formatted selector array.
78
+ * @param etype
79
+ * @param count Used to track internal params.
80
+ * @param params Used to store internal params.
81
+ * @param subquery Whether only a subquery should be returned.
82
+ * @returns The SQL query.
83
+ */
41
84
  private makeEntityQuery;
42
85
  protected performQuery(options: Options, formattedSelectors: FormattedSelector[], etype: string): {
43
86
  result: any;
44
87
  };
45
- protected performQuerySync(options: Options, formattedSelectors: FormattedSelector[], etype: string): {
46
- result: any;
47
- };
48
88
  getEntities<T extends EntityConstructor = EntityConstructor>(options: Options<T> & {
49
89
  return: 'count';
50
90
  }, ...selectors: Selector[]): Promise<number>;
51
91
  getEntities<T extends EntityConstructor = EntityConstructor>(options: Options<T> & {
52
92
  return: 'guid';
53
93
  }, ...selectors: Selector[]): Promise<string[]>;
54
- getEntities<T extends EntityConstructor = EntityConstructor>(options?: Options<T>, ...selectors: Selector[]): Promise<ReturnType<T['factorySync']>[]>;
55
- protected getEntitiesSync<T extends EntityConstructor = EntityConstructor>(options: Options<T> & {
56
- return: 'count';
57
- }, ...selectors: Selector[]): number;
58
- protected getEntitiesSync<T extends EntityConstructor = EntityConstructor>(options: Options<T> & {
59
- return: 'guid';
60
- }, ...selectors: Selector[]): string[];
61
- protected getEntitiesSync<T extends EntityConstructor = EntityConstructor>(options?: Options<T>, ...selectors: Selector[]): ReturnType<T['factorySync']>[];
94
+ getEntities<T extends EntityConstructor = EntityConstructor>(options?: Options<T>, ...selectors: Selector[]): Promise<EntityInstanceType<T>[]>;
62
95
  getUID(name: string): Promise<number | null>;
63
- import(filename: string): Promise<boolean>;
96
+ importEntity({ guid, cdate, mdate, tags, sdata, etype, }: {
97
+ guid: string;
98
+ cdate: number;
99
+ mdate: number;
100
+ tags: string[];
101
+ sdata: SerializedEntityData;
102
+ etype: string;
103
+ }): Promise<void>;
104
+ importUID({ name, value }: {
105
+ name: string;
106
+ value: number;
107
+ }): Promise<void>;
64
108
  newUID(name: string): Promise<number>;
65
109
  renameUID(oldName: string, newName: string): Promise<boolean>;
66
110
  rollback(name: string): Promise<boolean>;
67
111
  saveEntity(entity: EntityInterface): Promise<boolean>;
68
112
  setUID(name: string, curUid: number): Promise<boolean>;
69
- private internalTransaction;
113
+ protected internalTransaction(name: string): Promise<PostgreSQLDriverTransaction>;
70
114
  startTransaction(name: string): Promise<import("@nymphjs/nymph").Nymph>;
115
+ needsMigration(): Promise<boolean>;
71
116
  }
72
117
  export {};