@nymphjs/driver-mysql 1.0.0-beta.8 → 1.0.0-beta.81

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