@ptc-org/nestjs-query-typeorm 0.33.0 → 1.0.0-alpha.3
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 +527 -0
- package/package.json +7 -19
- package/src/query/filter-query.builder.js.map +1 -1
- package/src/query/relation-query.builder.d.ts +19 -13
- package/src/query/relation-query.builder.js +167 -98
- package/src/query/relation-query.builder.js.map +1 -1
- package/src/query/sql-comparison.builder.js +8 -10
- package/src/query/sql-comparison.builder.js.map +1 -1
- package/src/services/relation-query.service.d.ts +2 -2
- package/src/services/relation-query.service.js +15 -24
- package/src/services/relation-query.service.js.map +1 -1
- package/src/services/typeorm-query.service.d.ts +5 -4
- package/src/services/typeorm-query.service.js +40 -12
- package/src/services/typeorm-query.service.js.map +1 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
# [0.30.0](https://github.com/tripss/nestjs-query/compare/v0.29.0...v0.30.0) (2021-09-30)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **query-typeorm:** import jest-extended into typeorm query service ([f539b29](https://github.com/tripss/nestjs-query/commit/f539b29fad60c070e8736f872d547fd498eb3c4f))
|
|
12
|
+
* **tests:** fix jest-extended typings and eslint problems ([6af8af1](https://github.com/tripss/nestjs-query/commit/6af8af13a33faaa1585561e7b426b125a6368b6b))
|
|
13
|
+
* **typeorm:** revert uneeded change to test entity ([86f7fd9](https://github.com/tripss/nestjs-query/commit/86f7fd9abb101eb40af2cf66009d50cb8c173eea))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* **query-typeorm:** allow deeply nested filters ([0bd6b76](https://github.com/tripss/nestjs-query/commit/0bd6b76c4dbd876df7f9a991803843405d24fdb9))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# [0.29.0](https://github.com/tripss/nestjs-query/compare/v0.28.1...v0.29.0) (2021-09-09)
|
|
25
|
+
|
|
26
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## [0.28.1](https://github.com/tripss/nestjs-query/compare/v0.28.0...v0.28.1) (2021-07-27)
|
|
33
|
+
|
|
34
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# [0.28.0](https://github.com/tripss/nestjs-query/compare/v0.27.0...v0.28.0) (2021-07-19)
|
|
41
|
+
|
|
42
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
# [0.27.0](https://github.com/tripss/nestjs-query/compare/v0.26.0...v0.27.0) (2021-05-12)
|
|
49
|
+
|
|
50
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
# [0.26.0](https://github.com/tripss/nestjs-query/compare/v0.25.1...v0.26.0) (2021-04-13)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### Features
|
|
60
|
+
|
|
61
|
+
* **typeorm:** Implement `setRelations` to set many relations ([d1109b7](https://github.com/tripss/nestjs-query/commit/d1109b70f961cf59d7cbc8b8a85c401980a2b6c4))
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
## [0.25.1](https://github.com/tripss/nestjs-query/compare/v0.25.0...v0.25.1) (2021-04-07)
|
|
68
|
+
|
|
69
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
# [0.25.0](https://github.com/tripss/nestjs-query/compare/v0.24.5...v0.25.0) (2021-03-31)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### Bug Fixes
|
|
79
|
+
|
|
80
|
+
* Add consistent sorting for aggregate queries ([4ac7a14](https://github.com/tripss/nestjs-query/commit/4ac7a1485c7dcd83569951298606f487608806b1))
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
### Features
|
|
84
|
+
|
|
85
|
+
* **typeorm:** Update to support new aggregate with groupBy ([e2a4f30](https://github.com/tripss/nestjs-query/commit/e2a4f3066834ae7fddf0239ab647a0a9de667149))
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
## [0.24.4](https://github.com/tripss/nestjs-query/compare/v0.24.3...v0.24.4) (2021-03-18)
|
|
92
|
+
|
|
93
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
## [0.24.1](https://github.com/tripss/nestjs-query/compare/v0.24.0...v0.24.1) (2021-03-16)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
### Bug Fixes
|
|
103
|
+
|
|
104
|
+
* **typeorm, #954:** Filtering on relations with pagination ([#977](https://github.com/tripss/nestjs-query/issues/977)) ([f5a6374](https://github.com/tripss/nestjs-query/commit/f5a6374f6e22470f63ef6257f7271c818ed09321)), closes [#954](https://github.com/tripss/nestjs-query/issues/954) [#954](https://github.com/tripss/nestjs-query/issues/954) [#954](https://github.com/tripss/nestjs-query/issues/954) [#954](https://github.com/tripss/nestjs-query/issues/954)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
# [0.24.0](https://github.com/tripss/nestjs-query/compare/v0.23.1...v0.24.0) (2021-03-15)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
### Features
|
|
114
|
+
|
|
115
|
+
* **typegoose:** Add typegoose package ([#846](https://github.com/tripss/nestjs-query/issues/846)) ([73cf5cd](https://github.com/tripss/nestjs-query/commit/73cf5cdbf11496ad3a3ce3f6bb69975510de26e2))
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
## [0.23.1](https://github.com/tripss/nestjs-query/compare/v0.23.0...v0.23.1) (2021-02-26)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
### Bug Fixes
|
|
125
|
+
|
|
126
|
+
* **typeorm,#895:** Wrap all OR and AND expressions in brackets ([838ab16](https://github.com/tripss/nestjs-query/commit/838ab16befe7a53f5fb11e84624c3b30811f61c6)), closes [#895](https://github.com/tripss/nestjs-query/issues/895)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
# [0.23.0](https://github.com/tripss/nestjs-query/compare/v0.22.0...v0.23.0) (2021-02-26)
|
|
133
|
+
|
|
134
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
# [0.22.0](https://github.com/tripss/nestjs-query/compare/v0.21.2...v0.22.0) (2021-02-08)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
### Bug Fixes
|
|
144
|
+
|
|
145
|
+
* **deps:** update dependency uuid to v8.3.2 ([289f1ed](https://github.com/tripss/nestjs-query/commit/289f1ed5610781792d3c1efa5492376095084ac0))
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
## [0.21.2](https://github.com/tripss/nestjs-query/compare/v0.21.1...v0.21.2) (2020-10-23)
|
|
152
|
+
|
|
153
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
## [0.21.1](https://github.com/tripss/nestjs-query/compare/v0.21.0...v0.21.1) (2020-10-18)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
### Bug Fixes
|
|
163
|
+
|
|
164
|
+
* **deps:** update dependency uuid to v8.3.1 ([a2b7555](https://github.com/tripss/nestjs-query/commit/a2b7555c1186e48999d44aa8af9b792f32b18b7e))
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
# [0.21.0](https://github.com/tripss/nestjs-query/compare/v0.20.2...v0.21.0) (2020-10-16)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
### Bug Fixes
|
|
174
|
+
|
|
175
|
+
* **eslint:** Fix eslint to recognize sub packages ([13fdd2b](https://github.com/tripss/nestjs-query/commit/13fdd2b31289dbc80316cbdb5aa32edbe596bad4))
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
## [0.20.2](https://github.com/tripss/nestjs-query/compare/v0.20.1...v0.20.2) (2020-10-01)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
### Bug Fixes
|
|
185
|
+
|
|
186
|
+
* **filters:** Fix bug with incorect parameters in filter ([6ada4f4](https://github.com/tripss/nestjs-query/commit/6ada4f4a12633d41c60de9540dfc28ed0985ca62))
|
|
187
|
+
* **filters:** Fix bug with incorect parameters in filters ([9f4e93b](https://github.com/tripss/nestjs-query/commit/9f4e93b7726d85cb4febe86d2caf941dc957463a))
|
|
188
|
+
* **typeorm:** fix unit tests after fix filters bug ([5f50419](https://github.com/tripss/nestjs-query/commit/5f5041906694ae7c4aa799f52049d0981b97ccfc))
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
## [0.20.1](https://github.com/tripss/nestjs-query/compare/v0.20.0...v0.20.1) (2020-09-28)
|
|
195
|
+
|
|
196
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
# [0.20.0](https://github.com/tripss/nestjs-query/compare/v0.19.4...v0.20.0) (2020-09-17)
|
|
203
|
+
|
|
204
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
## [0.19.4](https://github.com/tripss/nestjs-query/compare/v0.19.3...v0.19.4) (2020-09-15)
|
|
211
|
+
|
|
212
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
## [0.19.3](https://github.com/tripss/nestjs-query/compare/v0.19.2...v0.19.3) (2020-09-09)
|
|
219
|
+
|
|
220
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
## [0.19.2](https://github.com/tripss/nestjs-query/compare/v0.19.1...v0.19.2) (2020-09-03)
|
|
227
|
+
|
|
228
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
## [0.19.1](https://github.com/tripss/nestjs-query/compare/v0.19.0...v0.19.1) (2020-09-02)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
### Bug Fixes
|
|
238
|
+
|
|
239
|
+
* **typeorm,#493:** Fix uni-directional relation SQL ([7887b8c](https://github.com/tripss/nestjs-query/commit/7887b8c94516194840df03139fecd0d5a0f38f65))
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
# [0.19.0](https://github.com/tripss/nestjs-query/compare/v0.18.1...v0.19.0) (2020-09-01)
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
### Features
|
|
249
|
+
|
|
250
|
+
* **typeorm:** Add additional filter options to QueryService ([64241dc](https://github.com/tripss/nestjs-query/commit/64241dc9c4565c3bb2d4f168c837578bd706c48c))
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
## [0.18.1](https://github.com/tripss/nestjs-query/compare/v0.18.0...v0.18.1) (2020-08-14)
|
|
257
|
+
|
|
258
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
# [0.18.0](https://github.com/tripss/nestjs-query/compare/v0.17.10...v0.18.0) (2020-08-11)
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
### Bug Fixes
|
|
268
|
+
|
|
269
|
+
* **type:** Pin dev dependencies ([442db4c](https://github.com/tripss/nestjs-query/commit/442db4cd9b9d48d0c6a20209f0b44c4a314660ac))
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
### Features
|
|
273
|
+
|
|
274
|
+
* **typeorm:** Switch to use unioned queries for relations ([327c676](https://github.com/tripss/nestjs-query/commit/327c6760e3e1a7db6bb0f872928d0502345c925f))
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
## [0.17.10](https://github.com/tripss/nestjs-query/compare/v0.17.9...v0.17.10) (2020-08-01)
|
|
281
|
+
|
|
282
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
## [0.17.8](https://github.com/tripss/nestjs-query/compare/v0.17.7...v0.17.8) (2020-07-28)
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
### Features
|
|
292
|
+
|
|
293
|
+
* **graphql:** Allow specifying allowed comparisons on filterable fields ([ced2792](https://github.com/tripss/nestjs-query/commit/ced27920e5c2278c2a04c027a692e25b3306f6cb))
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
## [0.17.7](https://github.com/tripss/nestjs-query/compare/v0.17.6...v0.17.7) (2020-07-27)
|
|
300
|
+
|
|
301
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
## [0.17.2](https://github.com/tripss/nestjs-query/compare/v0.17.1...v0.17.2) (2020-07-17)
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
### Bug Fixes
|
|
311
|
+
|
|
312
|
+
* **typeorm:** Ensure record is entity instance when saving ([3cdbbaf](https://github.com/tripss/nestjs-query/commit/3cdbbaff11b18bcc5e6fd29fd182e2bd66b14f17)), closes [#380](https://github.com/tripss/nestjs-query/issues/380)
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
# [0.17.0](https://github.com/tripss/nestjs-query/compare/v0.16.2...v0.17.0) (2020-07-16)
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
### Features
|
|
322
|
+
|
|
323
|
+
* **aggregations:** Add aggregations to graphql ([af075d2](https://github.com/tripss/nestjs-query/commit/af075d2e93b6abbbfbe32afcc917350f803fadaa))
|
|
324
|
+
* **aggregations,typeorm:** Add relation aggregation to typeorm ([2bf35a9](https://github.com/tripss/nestjs-query/commit/2bf35a92ce80b1f3026fd87cb62cad17eb6eff03))
|
|
325
|
+
* **aggretations:** Add aggregations support to typeorm ([7233c23](https://github.com/tripss/nestjs-query/commit/7233c2397d0ac332e5209ab87ae62f5f555609d6))
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
## [0.16.2](https://github.com/tripss/nestjs-query/compare/v0.16.1...v0.16.2) (2020-07-09)
|
|
332
|
+
|
|
333
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
## [0.16.1](https://github.com/tripss/nestjs-query/compare/v0.16.0...v0.16.1) (2020-07-07)
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
### Bug Fixes
|
|
343
|
+
|
|
344
|
+
* **typeorm:** Fix import path in relation service [#363](https://github.com/tripss/nestjs-query/issues/363) ([0e6d484](https://github.com/tripss/nestjs-query/commit/0e6d484920960ed1966360a89af979230667b5f7))
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
# [0.16.0](https://github.com/tripss/nestjs-query/compare/v0.15.1...v0.16.0) (2020-07-05)
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
### Features
|
|
354
|
+
|
|
355
|
+
* **typeorm:** Add support for filtering on relations ([aa8788c](https://github.com/tripss/nestjs-query/commit/aa8788cbbc0c95465e1633b57ca48c91b160038a))
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
## [0.15.1](https://github.com/tripss/nestjs-query/compare/v0.15.0...v0.15.1) (2020-06-27)
|
|
362
|
+
|
|
363
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
# [0.15.0](https://github.com/tripss/nestjs-query/compare/v0.14.3...v0.15.0) (2020-06-23)
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
### Features
|
|
373
|
+
|
|
374
|
+
* **graphql,connection:** Add totalCount to connections ([ed1e84a](https://github.com/tripss/nestjs-query/commit/ed1e84a2feb6f89c3b270fcbc1d0eaf6aec5e575))
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
## [0.14.2](https://github.com/tripss/nestjs-query/compare/v0.14.1...v0.14.2) (2020-06-19)
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
### Bug Fixes
|
|
384
|
+
|
|
385
|
+
* **typeorm:** Allow using string based typeorm relations ([55c157d](https://github.com/tripss/nestjs-query/commit/55c157dbea9ce8c1186a2c2ea17f847857fd2226))
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
# [0.14.0](https://github.com/tripss/nestjs-query/compare/v0.13.2...v0.14.0) (2020-06-18)
|
|
392
|
+
|
|
393
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
# [0.13.0](https://github.com/tripss/nestjs-query/compare/v0.12.0...v0.13.0) (2020-06-12)
|
|
400
|
+
|
|
401
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
# [0.12.0](https://github.com/tripss/nestjs-query/compare/v0.11.8...v0.12.0) (2020-06-07)
|
|
408
|
+
|
|
409
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
## [0.11.8](https://github.com/tripss/nestjs-query/compare/v0.11.7...v0.11.8) (2020-05-30)
|
|
416
|
+
|
|
417
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
## [0.11.7](https://github.com/tripss/nestjs-query/compare/v0.11.6...v0.11.7) (2020-05-29)
|
|
424
|
+
|
|
425
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
## [0.11.6](https://github.com/tripss/nestjs-query/compare/v0.11.5...v0.11.6) (2020-05-26)
|
|
432
|
+
|
|
433
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
## [0.11.5](https://github.com/tripss/nestjs-query/compare/v0.11.4...v0.11.5) (2020-05-21)
|
|
440
|
+
|
|
441
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
## [0.11.4](https://github.com/tripss/nestjs-query/compare/v0.11.3...v0.11.4) (2020-05-19)
|
|
448
|
+
|
|
449
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
## [0.11.3](https://github.com/tripss/nestjs-query/compare/v0.11.2...v0.11.3) (2020-05-16)
|
|
456
|
+
|
|
457
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
## [0.11.2](https://github.com/tripss/nestjs-query/compare/v0.11.1...v0.11.2) (2020-05-14)
|
|
464
|
+
|
|
465
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
## [0.11.1](https://github.com/tripss/nestjs-query/compare/v0.11.0...v0.11.1) (2020-05-11)
|
|
472
|
+
|
|
473
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
# [0.11.0](https://github.com/tripss/nestjs-query/compare/v0.10.2...v0.11.0) (2020-05-09)
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
### Features
|
|
483
|
+
|
|
484
|
+
* **graphql:** Add graphql module ([282c421](https://github.com/tripss/nestjs-query/commit/282c421d0e6f67fe750fa6005f6cb7d960c8fbd0))
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
## [0.10.2](https://github.com/tripss/nestjs-query/compare/v0.10.1...v0.10.2) (2020-05-04)
|
|
491
|
+
|
|
492
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
# [0.10.0](https://github.com/tripss/nestjs-query/compare/v0.9.0...v0.10.0) (2020-04-29)
|
|
499
|
+
|
|
500
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
# [0.9.0](https://github.com/tripss/nestjs-query/compare/v0.8.9...v0.9.0) (2020-04-26)
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
### Features
|
|
510
|
+
|
|
511
|
+
* **typeorm:** Add support for soft deletes ([2ab42fa](https://github.com/tripss/nestjs-query/commit/2ab42faee2802abae4d8496e2529b8eb23860ed4))
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
## [0.8.9](https://github.com/tripss/nestjs-query/compare/v0.8.8...v0.8.9) (2020-04-24)
|
|
518
|
+
|
|
519
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
## [0.8.7](https://github.com/tripss/nestjs-query/compare/v0.8.6...v0.8.7) (2020-04-23)
|
|
526
|
+
|
|
527
|
+
**Note:** Version bump only for package @ptc-org/nestjs-query-typeorm
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ptc-org/nestjs-query-typeorm",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Typeorm adapter for @nestjs-query
|
|
3
|
+
"version": "1.0.0-alpha.3",
|
|
4
|
+
"description": "Typeorm adapter for @ptc-org/nestjs-query-core",
|
|
5
5
|
"author": "doug-martin <doug@dougamartin.com>",
|
|
6
|
-
"homepage": "https://github.com/
|
|
6
|
+
"homepage": "https://github.com/tripss/nestjs-query#readme",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "src/index.js",
|
|
9
9
|
"types": "src/index.d.ts",
|
|
@@ -30,28 +30,16 @@
|
|
|
30
30
|
"@nestjs/typeorm": "^8.0.0",
|
|
31
31
|
"class-transformer": "^0.2.3 || 0.3.1 || 0.4",
|
|
32
32
|
"typeorm": "^0.2.25",
|
|
33
|
-
"@ptc-org/nestjs-query-core": "0.
|
|
34
|
-
|
|
35
|
-
"devDependencies": {
|
|
36
|
-
"@nestjs/common": "8.4.0",
|
|
37
|
-
"@nestjs/testing": "8.4.0",
|
|
38
|
-
"@nestjs/typeorm": "8.0.2",
|
|
39
|
-
"@types/lodash.filter": "4.6.6",
|
|
40
|
-
"@types/lodash.omit": "4.5.6",
|
|
41
|
-
"@types/uuid": "8.3.4",
|
|
42
|
-
"class-transformer": "0.4.0",
|
|
43
|
-
"sqlite3": "5.0.2",
|
|
44
|
-
"ts-mockito": "2.6.1",
|
|
45
|
-
"typeorm": "0.2.40",
|
|
46
|
-
"typescript": "4.4.4"
|
|
33
|
+
"@ptc-org/nestjs-query-core": "1.0.0-alpha.1",
|
|
34
|
+
"reflect-metadata": "^0.1.13"
|
|
47
35
|
},
|
|
48
36
|
"repository": {
|
|
49
37
|
"type": "git",
|
|
50
|
-
"url": "git+https://github.com/
|
|
38
|
+
"url": "git+https://github.com/tripss/nestjs-query.git",
|
|
51
39
|
"directory": "packages/query-typeorm"
|
|
52
40
|
},
|
|
53
41
|
"bugs": {
|
|
54
|
-
"url": "https://github.com/
|
|
42
|
+
"url": "https://github.com/tripss/nestjs-query/issues"
|
|
55
43
|
},
|
|
56
44
|
"typings": "./src/index.d.ts"
|
|
57
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-query.builder.js","sourceRoot":"","sources":["../../../../../packages/query-typeorm/src/query/filter-query.builder.ts"],"names":[],"mappings":";;;;AAAA,kEAA+G;AAW/G,2DAAuD;AACvD,mDAA+C;AAC/C,6EAAiC;AAoCjC;;;;GAIG;AACH,MAAa,kBAAkB;IAC7B,YACW,IAAwB,EACxB,eAAqC,IAAI,4BAAY,EAAU,EAC/D,mBAA6C,IAAI,oCAAgB,EAAU;QAF3E,SAAI,GAAJ,IAAI,CAAoB;QACxB,iBAAY,GAAZ,YAAY,CAAmD;QAC/D,qBAAgB,GAAhB,gBAAgB,CAA2D;IACnF,CAAC;IAEJ;;;;OAIG;IACH,MAAM,CAAC,KAAoB;QACzB,MAAM,YAAY,GAAG,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC3D,IAAI,EAAE,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACnC,EAAE,GAAG,YAAY;YACf,CAAC,CAAC,IAAI,CAAC,2BAA2B,CAAC,EAAE,EAAE,IAAI,CAAC,+BAA+B,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YAC9G,CAAC,CAAC,EAAE,CAAC;QACP,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;QAClD,EAAE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AC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC;IAED;;;;;;OAMG;
|
|
1
|
+
{"version":3,"file":"filter-query.builder.js","sourceRoot":"","sources":["../../../../../packages/query-typeorm/src/query/filter-query.builder.ts"],"names":[],"mappings":";;;;AAAA,kEAA+G;AAW/G,2DAAuD;AACvD,mDAA+C;AAC/C,6EAAiC;AAoCjC;;;;GAIG;AACH,MAAa,kBAAkB;IAC7B,YACW,IAAwB,EACxB,eAAqC,IAAI,4BAAY,EAAU,EAC/D,mBAA6C,IAAI,oCAAgB,EAAU;QAF3E,SAAI,GAAJ,IAAI,CAAoB;QACxB,iBAAY,GAAZ,YAAY,CAAmD;QAC/D,qBAAgB,GAAhB,gBAAgB,CAA2D;IACnF,CAAC;IAEJ;;;;OAIG;IACH,MAAM,CAAC,KAAoB;QACzB,MAAM,YAAY,GAAG,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC3D,IAAI,EAAE,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACnC,EAAE,GAAG,YAAY;YACf,CAAC,CAAC,IAAI,CAAC,2BAA2B,CAAC,EAAE,EAAE,IAAI,CAAC,+BAA+B,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YAC9G,CAAC,CAAC,EAAE,CAAC;QACP,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;QAClD,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;QACpD,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,KAAK,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;QACtD,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,UAAU,CAAC,EAAyC,EAAE,KAAo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,aAAa;QACvB,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;IACjE,CAAC;CACF;AAzOD,gDAyOC"}
|
|
@@ -21,10 +21,13 @@ declare type PrimaryKey = {
|
|
|
21
21
|
propertyName: string;
|
|
22
22
|
};
|
|
23
23
|
interface RelationQuery<Relation, Entity> {
|
|
24
|
+
relation: RelationMetadata;
|
|
24
25
|
from: Class<Relation>;
|
|
25
26
|
fromAlias: string;
|
|
26
27
|
fromPrimaryKeys: PrimaryKey[];
|
|
27
28
|
joins: JoinColumn[];
|
|
29
|
+
mapRelations<RawRelation>(entity: Entity, relations: Relation[], rawRelations: RawRelation[]): Relation[];
|
|
30
|
+
batchSelect(qb: SelectQueryBuilder<Relation>, entities: Entity[]): SelectQueryBuilder<Relation>;
|
|
28
31
|
whereCondition(entity: Entity): SQLFragment;
|
|
29
32
|
}
|
|
30
33
|
export declare type EntityIndexRelation<Relation> = Relation & {
|
|
@@ -38,32 +41,35 @@ export declare type EntityIndexRelation<Relation> = Relation & {
|
|
|
38
41
|
export declare class RelationQueryBuilder<Entity, Relation> {
|
|
39
42
|
readonly repo: Repository<Entity>;
|
|
40
43
|
readonly relation: string;
|
|
41
|
-
private relationMetadata;
|
|
42
44
|
readonly filterQueryBuilder: FilterQueryBuilder<Relation>;
|
|
43
45
|
readonly relationRepo: Repository<Relation>;
|
|
46
|
+
private relationMetadata;
|
|
44
47
|
private paramCount;
|
|
48
|
+
/**
|
|
49
|
+
* Will be filled if the query builder already contains the join
|
|
50
|
+
*
|
|
51
|
+
* TODO:: Do this different? Maybe cleanup the batchSelect / whereCondition as its almost the same
|
|
52
|
+
*/
|
|
53
|
+
private existingAlias;
|
|
45
54
|
constructor(repo: Repository<Entity>, relation: string);
|
|
46
55
|
select(entity: Entity, query: Query<Relation>): SelectQueryBuilder<Relation>;
|
|
47
|
-
batchSelect(entities: Entity[], query: Query<Relation>): SelectQueryBuilder<
|
|
56
|
+
batchSelect(entities: Entity[], query: Query<Relation>): SelectQueryBuilder<Relation>;
|
|
48
57
|
batchAggregate(entities: Entity[], query: Query<Relation>, aggregateQuery: AggregateQuery<Relation>): SelectQueryBuilder<EntityIndexRelation<Record<string, unknown>>>;
|
|
49
58
|
aggregate(entity: Entity, query: Query<Relation>, aggregateQuery: AggregateQuery<Relation>): SelectQueryBuilder<Relation>;
|
|
59
|
+
get relationMeta(): RelationQuery<Relation, Entity>;
|
|
50
60
|
private createUnionAggregateSubQuery;
|
|
51
|
-
private createUnionSelectSubQuery;
|
|
52
61
|
private createRelationQueryBuilder;
|
|
53
|
-
private
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
private getManyToOneOrOneToOneOwnerMeta;
|
|
63
|
+
private getOneToManyOrOneToOneNotOwnerMeta;
|
|
64
|
+
private getManyToManyOwnerMeta;
|
|
65
|
+
private getManyToManyNotOwnerMetadata;
|
|
66
|
+
private batchSelectManyToMany;
|
|
67
|
+
private batchMapRelationsManyToMany;
|
|
58
68
|
private getParamName;
|
|
59
69
|
get entityIndexColName(): string;
|
|
60
70
|
private get escapedEntityIndexColName();
|
|
61
71
|
private get unionAlias();
|
|
62
|
-
private get escapedUnionAlias();
|
|
63
72
|
private escapeName;
|
|
64
|
-
getRelationPrimaryKeysPropertyNameAndColumnsName
|
|
65
|
-
columnName: string;
|
|
66
|
-
propertyName: string;
|
|
67
|
-
}[];
|
|
73
|
+
private getRelationPrimaryKeysPropertyNameAndColumnsName;
|
|
68
74
|
}
|
|
69
75
|
export {};
|