@forestadmin/datasource-sql 1.0.0-beta.5 → 1.0.0-beta.50

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
@@ -1,3 +1,480 @@
1
+ # @forestadmin/datasource-sql [1.0.0-beta.50](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.49...@forestadmin/datasource-sql@1.0.0-beta.50) (2022-09-12)
2
+
3
+
4
+ ### Performance Improvements
5
+
6
+ * **datasource-sql:** query structure, indexes and references in parallel ([#419](https://github.com/ForestAdmin/agent-nodejs/issues/419)) ([f08e48a](https://github.com/ForestAdmin/agent-nodejs/commit/f08e48a948c5f85b37ba85e165299ea44fda9fb6))
7
+
8
+ # @forestadmin/datasource-sql [1.0.0-beta.49](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.48...@forestadmin/datasource-sql@1.0.0-beta.49) (2022-09-12)
9
+
10
+
11
+
12
+
13
+
14
+ ### Dependencies
15
+
16
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.42
17
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.32
18
+
19
+ # @forestadmin/datasource-sql [1.0.0-beta.48](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.47...@forestadmin/datasource-sql@1.0.0-beta.48) (2022-09-08)
20
+
21
+
22
+
23
+
24
+
25
+ ### Dependencies
26
+
27
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.41
28
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.31
29
+
30
+ # @forestadmin/datasource-sql [1.0.0-beta.47](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.46...@forestadmin/datasource-sql@1.0.0-beta.47) (2022-09-07)
31
+
32
+
33
+
34
+
35
+
36
+ ### Dependencies
37
+
38
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.40
39
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.30
40
+
41
+ # @forestadmin/datasource-sql [1.0.0-beta.46](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.45...@forestadmin/datasource-sql@1.0.0-beta.46) (2022-09-07)
42
+
43
+
44
+
45
+
46
+
47
+ ### Dependencies
48
+
49
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.39
50
+
51
+ # @forestadmin/datasource-sql [1.0.0-beta.45](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.44...@forestadmin/datasource-sql@1.0.0-beta.45) (2022-09-05)
52
+
53
+
54
+
55
+
56
+
57
+ ### Dependencies
58
+
59
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.38
60
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.29
61
+
62
+ # @forestadmin/datasource-sql [1.0.0-beta.44](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.43...@forestadmin/datasource-sql@1.0.0-beta.44) (2022-09-05)
63
+
64
+
65
+
66
+
67
+
68
+ ### Dependencies
69
+
70
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.37
71
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.28
72
+
73
+ # @forestadmin/datasource-sql [1.0.0-beta.43](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.42...@forestadmin/datasource-sql@1.0.0-beta.43) (2022-09-02)
74
+
75
+
76
+ ### Bug Fixes
77
+
78
+ * **datasource-sql:** skip models which do not have primary keys ([#393](https://github.com/ForestAdmin/agent-nodejs/issues/393)) ([820fbe9](https://github.com/ForestAdmin/agent-nodejs/commit/820fbe9087ec9977fc998363016ce1728438c8f2))
79
+
80
+ # @forestadmin/datasource-sql [1.0.0-beta.42](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.41...@forestadmin/datasource-sql@1.0.0-beta.42) (2022-08-23)
81
+
82
+
83
+
84
+
85
+
86
+ ### Dependencies
87
+
88
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.36
89
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.27
90
+
91
+ # @forestadmin/datasource-sql [1.0.0-beta.41](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.40...@forestadmin/datasource-sql@1.0.0-beta.41) (2022-08-23)
92
+
93
+
94
+
95
+
96
+
97
+ ### Dependencies
98
+
99
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.35
100
+
101
+ # @forestadmin/datasource-sql [1.0.0-beta.40](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.39...@forestadmin/datasource-sql@1.0.0-beta.40) (2022-07-25)
102
+
103
+
104
+ ### Bug Fixes
105
+
106
+ * update code and sequelize version to avoid crash ([#374](https://github.com/ForestAdmin/agent-nodejs/issues/374)) ([e003416](https://github.com/ForestAdmin/agent-nodejs/commit/e0034166b86e48781ea099086fd93aa7c68dba03))
107
+
108
+
109
+
110
+
111
+
112
+ ### Dependencies
113
+
114
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.34
115
+
116
+ # @forestadmin/datasource-sql [1.0.0-beta.39](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.38...@forestadmin/datasource-sql@1.0.0-beta.39) (2022-06-27)
117
+
118
+
119
+
120
+
121
+
122
+ ### Dependencies
123
+
124
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.33
125
+
126
+ # @forestadmin/datasource-sql [1.0.0-beta.38](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.37...@forestadmin/datasource-sql@1.0.0-beta.38) (2022-06-16)
127
+
128
+
129
+
130
+
131
+
132
+ ### Dependencies
133
+
134
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.32
135
+
136
+ # @forestadmin/datasource-sql [1.0.0-beta.37](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.36...@forestadmin/datasource-sql@1.0.0-beta.37) (2022-06-16)
137
+
138
+
139
+ ### Bug Fixes
140
+
141
+ * **patch-package:** remove feature change on sequelize patch ([#356](https://github.com/ForestAdmin/agent-nodejs/issues/356)) ([ac3d7d5](https://github.com/ForestAdmin/agent-nodejs/commit/ac3d7d583c65b392fe668225ebcd9b63729f9f23))
142
+
143
+ # @forestadmin/datasource-sql [1.0.0-beta.36](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.35...@forestadmin/datasource-sql@1.0.0-beta.36) (2022-06-15)
144
+
145
+
146
+
147
+
148
+
149
+ ### Dependencies
150
+
151
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.31
152
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.26
153
+
154
+ # @forestadmin/datasource-sql [1.0.0-beta.35](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.34...@forestadmin/datasource-sql@1.0.0-beta.35) (2022-06-15)
155
+
156
+
157
+
158
+
159
+
160
+ ### Dependencies
161
+
162
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.30
163
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.25
164
+
165
+ # @forestadmin/datasource-sql [1.0.0-beta.34](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.33...@forestadmin/datasource-sql@1.0.0-beta.34) (2022-06-14)
166
+
167
+
168
+
169
+
170
+
171
+ ### Dependencies
172
+
173
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.29
174
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.24
175
+
176
+ # @forestadmin/datasource-sql [1.0.0-beta.33](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.32...@forestadmin/datasource-sql@1.0.0-beta.33) (2022-06-14)
177
+
178
+
179
+
180
+
181
+
182
+ ### Dependencies
183
+
184
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.28
185
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.23
186
+
187
+ # @forestadmin/datasource-sql [1.0.0-beta.32](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.31...@forestadmin/datasource-sql@1.0.0-beta.32) (2022-06-09)
188
+
189
+
190
+
191
+
192
+
193
+ ### Dependencies
194
+
195
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.27
196
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.22
197
+
198
+ # @forestadmin/datasource-sql [1.0.0-beta.31](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.30...@forestadmin/datasource-sql@1.0.0-beta.31) (2022-06-01)
199
+
200
+
201
+
202
+
203
+
204
+ ### Dependencies
205
+
206
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.26
207
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.21
208
+
209
+ # @forestadmin/datasource-sql [1.0.0-beta.30](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.29...@forestadmin/datasource-sql@1.0.0-beta.30) (2022-05-31)
210
+
211
+
212
+
213
+
214
+
215
+ ### Dependencies
216
+
217
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.25
218
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.20
219
+
220
+ # @forestadmin/datasource-sql [1.0.0-beta.29](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.28...@forestadmin/datasource-sql@1.0.0-beta.29) (2022-05-25)
221
+
222
+
223
+
224
+
225
+
226
+ ### Dependencies
227
+
228
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.24
229
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.19
230
+
231
+ # @forestadmin/datasource-sql [1.0.0-beta.28](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.27...@forestadmin/datasource-sql@1.0.0-beta.28) (2022-05-24)
232
+
233
+
234
+
235
+
236
+
237
+ ### Dependencies
238
+
239
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.23
240
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.18
241
+
242
+ # @forestadmin/datasource-sql [1.0.0-beta.27](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.26...@forestadmin/datasource-sql@1.0.0-beta.27) (2022-05-24)
243
+
244
+
245
+
246
+
247
+
248
+ ### Dependencies
249
+
250
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.22
251
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.17
252
+
253
+ # @forestadmin/datasource-sql [1.0.0-beta.26](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.25...@forestadmin/datasource-sql@1.0.0-beta.26) (2022-05-16)
254
+
255
+
256
+
257
+
258
+
259
+ ### Dependencies
260
+
261
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.21
262
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.16
263
+
264
+ # @forestadmin/datasource-sql [1.0.0-beta.25](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.24...@forestadmin/datasource-sql@1.0.0-beta.25) (2022-05-12)
265
+
266
+
267
+
268
+
269
+
270
+ ### Dependencies
271
+
272
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.20
273
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.15
274
+
275
+ # @forestadmin/datasource-sql [1.0.0-beta.24](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.23...@forestadmin/datasource-sql@1.0.0-beta.24) (2022-05-09)
276
+
277
+
278
+ ### Bug Fixes
279
+
280
+ * **datasource sql:** throw an user friendly error when the provided connection uri is invalid ([#297](https://github.com/ForestAdmin/agent-nodejs/issues/297)) ([db1ac83](https://github.com/ForestAdmin/agent-nodejs/commit/db1ac83d3ef023c7875e4affbaecdc52de1e5fc3))
281
+
282
+ # @forestadmin/datasource-sql [1.0.0-beta.23](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.22...@forestadmin/datasource-sql@1.0.0-beta.23) (2022-05-09)
283
+
284
+
285
+
286
+
287
+
288
+ ### Dependencies
289
+
290
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.19
291
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.14
292
+
293
+ # @forestadmin/datasource-sql [1.0.0-beta.22](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.21...@forestadmin/datasource-sql@1.0.0-beta.22) (2022-05-09)
294
+
295
+
296
+
297
+
298
+
299
+ ### Dependencies
300
+
301
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.18
302
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.13
303
+
304
+ # @forestadmin/datasource-sql [1.0.0-beta.21](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.20...@forestadmin/datasource-sql@1.0.0-beta.21) (2022-05-09)
305
+
306
+
307
+ ### Bug Fixes
308
+
309
+ * datasource naming consistency ([#292](https://github.com/ForestAdmin/agent-nodejs/issues/292)) ([ff50a1f](https://github.com/ForestAdmin/agent-nodejs/commit/ff50a1f02aa65b3d99824c2bc9fb19d729a4e465))
310
+
311
+
312
+
313
+
314
+
315
+ ### Dependencies
316
+
317
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.17
318
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.12
319
+
320
+ # @forestadmin/datasource-sql [1.0.0-beta.20](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.19...@forestadmin/datasource-sql@1.0.0-beta.20) (2022-05-04)
321
+
322
+
323
+
324
+
325
+
326
+ ### Dependencies
327
+
328
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.16
329
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.11
330
+
331
+ # @forestadmin/datasource-sql [1.0.0-beta.19](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.18...@forestadmin/datasource-sql@1.0.0-beta.19) (2022-04-29)
332
+
333
+
334
+
335
+
336
+
337
+ ### Dependencies
338
+
339
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.15
340
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.10
341
+
342
+ # @forestadmin/datasource-sql [1.0.0-beta.18](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.17...@forestadmin/datasource-sql@1.0.0-beta.18) (2022-04-29)
343
+
344
+
345
+
346
+
347
+
348
+ ### Dependencies
349
+
350
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.14
351
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.9
352
+
353
+ # @forestadmin/datasource-sql [1.0.0-beta.17](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.16...@forestadmin/datasource-sql@1.0.0-beta.17) (2022-04-28)
354
+
355
+
356
+
357
+
358
+
359
+ ### Dependencies
360
+
361
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.13
362
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.8
363
+
364
+ # @forestadmin/datasource-sql [1.0.0-beta.16](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.15...@forestadmin/datasource-sql@1.0.0-beta.16) (2022-04-26)
365
+
366
+
367
+
368
+
369
+
370
+ ### Dependencies
371
+
372
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.12
373
+
374
+ # @forestadmin/datasource-sql [1.0.0-beta.15](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.14...@forestadmin/datasource-sql@1.0.0-beta.15) (2022-04-26)
375
+
376
+
377
+
378
+
379
+
380
+ ### Dependencies
381
+
382
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.11
383
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.7
384
+
385
+ # @forestadmin/datasource-sql [1.0.0-beta.14](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.13...@forestadmin/datasource-sql@1.0.0-beta.14) (2022-04-25)
386
+
387
+
388
+
389
+
390
+
391
+ ### Dependencies
392
+
393
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.10
394
+
395
+ # @forestadmin/datasource-sql [1.0.0-beta.13](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.12...@forestadmin/datasource-sql@1.0.0-beta.13) (2022-04-25)
396
+
397
+
398
+ ### Bug Fixes
399
+
400
+ * import packages from js ([#260](https://github.com/ForestAdmin/agent-nodejs/issues/260)) ([de00886](https://github.com/ForestAdmin/agent-nodejs/commit/de008862971ea5d3559e5a4c3136b0dd2161d760))
401
+
402
+
403
+
404
+
405
+
406
+ ### Dependencies
407
+
408
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.9
409
+
410
+ # @forestadmin/datasource-sql [1.0.0-beta.12](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.11...@forestadmin/datasource-sql@1.0.0-beta.12) (2022-04-21)
411
+
412
+
413
+ ### Features
414
+
415
+ * harmonize datasource creation and pass logger to it ([#257](https://github.com/ForestAdmin/agent-nodejs/issues/257)) ([82cb4ea](https://github.com/ForestAdmin/agent-nodejs/commit/82cb4ea37ac0a9fe83423d917226dfd8fad7d0a6))
416
+
417
+
418
+
419
+
420
+
421
+ ### Dependencies
422
+
423
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.8
424
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.6
425
+
426
+ # @forestadmin/datasource-sql [1.0.0-beta.11](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.10...@forestadmin/datasource-sql@1.0.0-beta.11) (2022-04-21)
427
+
428
+
429
+ ### Bug Fixes
430
+
431
+ * **datasource sql:** has one detection ([#254](https://github.com/ForestAdmin/agent-nodejs/issues/254)) ([68e68b3](https://github.com/ForestAdmin/agent-nodejs/commit/68e68b33063ba7bbfb9cfc747572f59953b64050))
432
+
433
+ # @forestadmin/datasource-sql [1.0.0-beta.10](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.9...@forestadmin/datasource-sql@1.0.0-beta.10) (2022-04-20)
434
+
435
+
436
+ ### Features
437
+
438
+ * **datasource sql:** handle relations ([#224](https://github.com/ForestAdmin/agent-nodejs/issues/224)) ([275cf7e](https://github.com/ForestAdmin/agent-nodejs/commit/275cf7ed6835933fce418f92a6a4e2521a9721fe))
439
+
440
+ # @forestadmin/datasource-sql [1.0.0-beta.9](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.8...@forestadmin/datasource-sql@1.0.0-beta.9) (2022-04-20)
441
+
442
+
443
+
444
+
445
+
446
+ ### Dependencies
447
+
448
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.7
449
+
450
+ # @forestadmin/datasource-sql [1.0.0-beta.8](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.7...@forestadmin/datasource-sql@1.0.0-beta.8) (2022-04-19)
451
+
452
+
453
+
454
+
455
+
456
+ ### Dependencies
457
+
458
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.6
459
+ * **@forestadmin/datasource-toolkit:** upgraded to 1.0.0-beta.5
460
+
461
+ # @forestadmin/datasource-sql [1.0.0-beta.7](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.6...@forestadmin/datasource-sql@1.0.0-beta.7) (2022-04-19)
462
+
463
+
464
+
465
+
466
+
467
+ ### Dependencies
468
+
469
+ * **@forestadmin/datasource-sequelize:** upgraded to 1.0.0-beta.5
470
+
471
+ # @forestadmin/datasource-sql [1.0.0-beta.6](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.5...@forestadmin/datasource-sql@1.0.0-beta.6) (2022-04-15)
472
+
473
+
474
+ ### Features
475
+
476
+ * **datasource sql:** handle primitive fields and default values ([#215](https://github.com/ForestAdmin/agent-nodejs/issues/215)) ([59a56da](https://github.com/ForestAdmin/agent-nodejs/commit/59a56da2721f39d0487b14d72b11d71b38b83a1f))
477
+
1
478
  # @forestadmin/datasource-sql [1.0.0-beta.5](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.0.0-beta.4...@forestadmin/datasource-sql@1.0.0-beta.5) (2022-04-15)
2
479
 
3
480
 
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
- import SqlDataSource from './datasource';
2
- export default SqlDataSource;
1
+ import { DataSourceFactory, Logger } from '@forestadmin/datasource-toolkit';
2
+ import { Sequelize } from 'sequelize';
3
+ export declare function buildSequelizeInstance(connectionUri: string, logger: Logger): Promise<Sequelize>;
4
+ export declare function createSqlDataSource(connectionUri: string): DataSourceFactory;
3
5
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -3,6 +3,29 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const datasource_1 = __importDefault(require("./datasource"));
7
- exports.default = datasource_1.default;
8
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSw4REFBeUM7QUFFekMsa0JBQWUsb0JBQWEsQ0FBQyJ9
6
+ exports.createSqlDataSource = exports.buildSequelizeInstance = void 0;
7
+ const sequelize_1 = require("sequelize");
8
+ const datasource_sequelize_1 = require("@forestadmin/datasource-sequelize");
9
+ const introspector_1 = __importDefault(require("./introspection/introspector"));
10
+ const model_1 = __importDefault(require("./orm-builder/model"));
11
+ const relations_1 = __importDefault(require("./orm-builder/relations"));
12
+ async function buildSequelizeInstance(connectionUri, logger) {
13
+ if (!/.*:\/\//g.test(connectionUri))
14
+ throw new Error(`Connection Uri "${connectionUri}" provided to SQL data source is not valid.` +
15
+ ' Should be <dialect>://<connection>.');
16
+ const logging = (sql) => logger?.('Debug', sql.substring(sql.indexOf(':') + 2));
17
+ const sequelize = new sequelize_1.Sequelize(connectionUri, { logging });
18
+ const tables = await introspector_1.default.instrospect(sequelize, logger);
19
+ model_1.default.defineModels(sequelize, logger, tables);
20
+ relations_1.default.defineRelations(sequelize, logger, tables);
21
+ return sequelize;
22
+ }
23
+ exports.buildSequelizeInstance = buildSequelizeInstance;
24
+ function createSqlDataSource(connectionUri) {
25
+ return async (logger) => {
26
+ const sequelize = await buildSequelizeInstance(connectionUri, logger);
27
+ return new datasource_sequelize_1.SequelizeDataSource(sequelize, logger);
28
+ };
29
+ }
30
+ exports.createSqlDataSource = createSqlDataSource;
31
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQ0EseUNBQXNDO0FBQ3RDLDRFQUF3RTtBQUV4RSxnRkFBd0Q7QUFDeEQsZ0VBQStDO0FBQy9DLHdFQUFzRDtBQUUvQyxLQUFLLFVBQVUsc0JBQXNCLENBQzFDLGFBQXFCLEVBQ3JCLE1BQWM7SUFFZCxJQUFJLENBQUMsVUFBVSxDQUFDLElBQUksQ0FBQyxhQUFhLENBQUM7UUFDakMsTUFBTSxJQUFJLEtBQUssQ0FDYixtQkFBbUIsYUFBYSw2Q0FBNkM7WUFDM0Usc0NBQXNDLENBQ3pDLENBQUM7SUFFSixNQUFNLE9BQU8sR0FBRyxDQUFDLEdBQVcsRUFBRSxFQUFFLENBQUMsTUFBTSxFQUFFLENBQUMsT0FBTyxFQUFFLEdBQUcsQ0FBQyxTQUFTLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDO0lBQ3hGLE1BQU0sU0FBUyxHQUFHLElBQUkscUJBQVMsQ0FBQyxhQUFhLEVBQUUsRUFBRSxPQUFPLEVBQUUsQ0FBQyxDQUFDO0lBRTVELE1BQU0sTUFBTSxHQUFHLE1BQU0sc0JBQVksQ0FBQyxXQUFXLENBQUMsU0FBUyxFQUFFLE1BQU0sQ0FBQyxDQUFDO0lBQ2pFLGVBQVksQ0FBQyxZQUFZLENBQUMsU0FBUyxFQUFFLE1BQU0sRUFBRSxNQUFNLENBQUMsQ0FBQztJQUNyRCxtQkFBZSxDQUFDLGVBQWUsQ0FBQyxTQUFTLEVBQUUsTUFBTSxFQUFFLE1BQU0sQ0FBQyxDQUFDO0lBRTNELE9BQU8sU0FBUyxDQUFDO0FBQ25CLENBQUM7QUFsQkQsd0RBa0JDO0FBRUQsU0FBZ0IsbUJBQW1CLENBQUMsYUFBcUI7SUFDdkQsT0FBTyxLQUFLLEVBQUUsTUFBYyxFQUFFLEVBQUU7UUFDOUIsTUFBTSxTQUFTLEdBQUcsTUFBTSxzQkFBc0IsQ0FBQyxhQUFhLEVBQUUsTUFBTSxDQUFDLENBQUM7UUFFdEUsT0FBTyxJQUFJLDBDQUFtQixDQUFDLFNBQVMsRUFBRSxNQUFNLENBQUMsQ0FBQztJQUNwRCxDQUFDLENBQUM7QUFDSixDQUFDO0FBTkQsa0RBTUMifQ==
@@ -0,0 +1,12 @@
1
+ import { Sequelize } from 'sequelize';
2
+ export default class ArrayTypeGetter {
3
+ private readonly sequelize;
4
+ private readonly fromArray;
5
+ private readonly query;
6
+ constructor(sequelize: Sequelize);
7
+ getType(tableName: string, columnName: string): Promise<{
8
+ type: string;
9
+ special: string[];
10
+ }>;
11
+ }
12
+ //# sourceMappingURL=array-type-getter.d.ts.map
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const sequelize_1 = require("sequelize");
4
+ class ArrayTypeGetter {
5
+ constructor(sequelize) {
6
+ this.query = `
7
+ SELECT
8
+ (
9
+ CASE
10
+ WHEN e.udt_name = 'hstore' THEN e.udt_name
11
+ ELSE e.data_type
12
+ END
13
+ ) || (
14
+ CASE
15
+ WHEN e.character_maximum_length IS NOT NULL THEN '(' || e.character_maximum_length || ')'
16
+ ELSE ''
17
+ END
18
+ ) as "type",
19
+ (
20
+ SELECT
21
+ array_agg(en.enumlabel)
22
+ FROM
23
+ pg_catalog.pg_type t
24
+ JOIN pg_catalog.pg_enum en ON t.oid = en.enumtypid
25
+ WHERE
26
+ t.typname = e.udt_name
27
+ ) AS "special"
28
+ FROM
29
+ INFORMATION_SCHEMA.columns c
30
+ LEFT JOIN INFORMATION_SCHEMA.element_types e ON (
31
+ (
32
+ c.table_catalog,
33
+ c.table_schema,
34
+ c.table_name,
35
+ 'TABLE',
36
+ c.dtd_identifier
37
+ ) = (
38
+ e.object_catalog,
39
+ e.object_schema,
40
+ e.object_name,
41
+ e.object_type,
42
+ e.collection_type_identifier
43
+ )
44
+ )
45
+ WHERE
46
+ table_name = :tableName
47
+ AND c.column_name = :columnName
48
+ ;
49
+ `;
50
+ this.sequelize = sequelize;
51
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
52
+ this.fromArray = this.sequelize.getQueryInterface().queryGenerator.fromArray;
53
+ }
54
+ async getType(tableName, columnName) {
55
+ const replacements = { tableName, columnName };
56
+ const [{ type, special }] = await this.sequelize.query(this.query, {
57
+ replacements,
58
+ type: sequelize_1.QueryTypes.SELECT,
59
+ });
60
+ return {
61
+ type: type.toUpperCase(),
62
+ special: special ? this.fromArray(special) : [],
63
+ };
64
+ }
65
+ }
66
+ exports.default = ArrayTypeGetter;
67
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXJyYXktdHlwZS1nZXR0ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvaW50cm9zcGVjdGlvbi9oZWxwZXJzL2FycmF5LXR5cGUtZ2V0dGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEseUNBQWtEO0FBRWxELE1BQXFCLGVBQWU7SUFnRGxDLFlBQVksU0FBb0I7UUE3Q2YsVUFBSyxHQUFHOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0dBMkN4QixDQUFDO1FBR0EsSUFBSSxDQUFDLFNBQVMsR0FBRyxTQUFTLENBQUM7UUFDM0IsOERBQThEO1FBQzlELElBQUksQ0FBQyxTQUFTLEdBQUksSUFBSSxDQUFDLFNBQVMsQ0FBQyxpQkFBaUIsRUFBRSxDQUFDLGNBQXNCLENBQUMsU0FBUyxDQUFDO0lBQ3hGLENBQUM7SUFFRCxLQUFLLENBQUMsT0FBTyxDQUNYLFNBQWlCLEVBQ2pCLFVBQWtCO1FBRWxCLE1BQU0sWUFBWSxHQUFHLEVBQUUsU0FBUyxFQUFFLFVBQVUsRUFBRSxDQUFDO1FBRS9DLE1BQU0sQ0FBQyxFQUFFLElBQUksRUFBRSxPQUFPLEVBQUUsQ0FBQyxHQUFHLE1BQU0sSUFBSSxDQUFDLFNBQVMsQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLEtBQUssRUFBRTtZQUNqRSxZQUFZO1lBQ1osSUFBSSxFQUFFLHNCQUFVLENBQUMsTUFBTTtTQUN4QixDQUFDLENBQUM7UUFFSCxPQUFPO1lBQ0wsSUFBSSxFQUFFLElBQUksQ0FBQyxXQUFXLEVBQUU7WUFDeEIsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRTtTQUNoRCxDQUFDO0lBQ0osQ0FBQztDQUNGO0FBdEVELGtDQXNFQyJ9
@@ -0,0 +1,11 @@
1
+ import { AbstractDataType, AbstractDataTypeConstructor, Dialect } from 'sequelize';
2
+ export default class DefaultValueParser {
3
+ private readonly dialect;
4
+ constructor(dialect: Dialect);
5
+ parse(expression: any, type: AbstractDataType | AbstractDataTypeConstructor): unknown;
6
+ private parseGeneric;
7
+ private sanitizeExpression;
8
+ private literalUnlessMatch;
9
+ private parseNumber;
10
+ }
11
+ //# sourceMappingURL=default-value-parser.d.ts.map