@nymphjs/query-parser 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 +298 -0
- package/README.md +7 -5
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/lib/queryParser.js +47 -14
- package/lib/queryParser.js.map +1 -1
- package/lib/queryParser.test.js +47 -1
- package/lib/queryParser.test.js.map +1 -1
- package/package.json +14 -14
- package/src/queryParser.test.ts +51 -1
- package/src/queryParser.ts +28 -18
- package/tsconfig.json +1 -1
- package/typedoc.json +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,304 @@
|
|
|
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
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
9
|
+
|
|
10
|
+
# [1.0.0-beta.80](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.79...v1.0.0-beta.80) (2024-09-28)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
13
|
+
|
|
14
|
+
# [1.0.0-beta.79](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.78...v1.0.0-beta.79) (2024-09-28)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
17
|
+
|
|
18
|
+
# [1.0.0-beta.78](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.77...v1.0.0-beta.78) (2024-09-27)
|
|
19
|
+
|
|
20
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
21
|
+
|
|
22
|
+
# [1.0.0-beta.77](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.76...v1.0.0-beta.77) (2024-09-26)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
25
|
+
|
|
26
|
+
# [1.0.0-beta.76](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.75...v1.0.0-beta.76) (2024-09-25)
|
|
27
|
+
|
|
28
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
29
|
+
|
|
30
|
+
# [1.0.0-beta.75](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.74...v1.0.0-beta.75) (2024-09-24)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
33
|
+
|
|
34
|
+
# [1.0.0-beta.74](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.73...v1.0.0-beta.74) (2024-09-21)
|
|
35
|
+
|
|
36
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
37
|
+
|
|
38
|
+
# [1.0.0-beta.73](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.72...v1.0.0-beta.73) (2024-09-20)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
41
|
+
|
|
42
|
+
# [1.0.0-beta.72](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.71...v1.0.0-beta.72) (2024-09-20)
|
|
43
|
+
|
|
44
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
45
|
+
|
|
46
|
+
# [1.0.0-beta.71](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.70...v1.0.0-beta.71) (2024-09-20)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
49
|
+
|
|
50
|
+
# [1.0.0-beta.70](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.69...v1.0.0-beta.70) (2024-09-20)
|
|
51
|
+
|
|
52
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
53
|
+
|
|
54
|
+
# [1.0.0-beta.69](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.68...v1.0.0-beta.69) (2024-09-19)
|
|
55
|
+
|
|
56
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
57
|
+
|
|
58
|
+
# [1.0.0-beta.68](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.67...v1.0.0-beta.68) (2024-09-19)
|
|
59
|
+
|
|
60
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
61
|
+
|
|
62
|
+
# [1.0.0-beta.67](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.66...v1.0.0-beta.67) (2024-09-03)
|
|
63
|
+
|
|
64
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
65
|
+
|
|
66
|
+
# [1.0.0-beta.66](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.65...v1.0.0-beta.66) (2024-08-06)
|
|
67
|
+
|
|
68
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
69
|
+
|
|
70
|
+
# [1.0.0-beta.65](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.64...v1.0.0-beta.65) (2024-08-05)
|
|
71
|
+
|
|
72
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
73
|
+
|
|
74
|
+
# [1.0.0-beta.64](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.63...v1.0.0-beta.64) (2024-08-04)
|
|
75
|
+
|
|
76
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
77
|
+
|
|
78
|
+
# [1.0.0-beta.63](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.62...v1.0.0-beta.63) (2024-06-18)
|
|
79
|
+
|
|
80
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
81
|
+
|
|
82
|
+
# [1.0.0-beta.62](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.61...v1.0.0-beta.62) (2024-06-15)
|
|
83
|
+
|
|
84
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
85
|
+
|
|
86
|
+
# [1.0.0-beta.61](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.60...v1.0.0-beta.61) (2024-06-14)
|
|
87
|
+
|
|
88
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
89
|
+
|
|
90
|
+
# [1.0.0-beta.60](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.59...v1.0.0-beta.60) (2024-06-14)
|
|
91
|
+
|
|
92
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
93
|
+
|
|
94
|
+
# [1.0.0-beta.59](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.58...v1.0.0-beta.59) (2024-06-14)
|
|
95
|
+
|
|
96
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
97
|
+
|
|
98
|
+
# [1.0.0-beta.58](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.57...v1.0.0-beta.58) (2024-06-12)
|
|
99
|
+
|
|
100
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
101
|
+
|
|
102
|
+
# [1.0.0-beta.57](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.56...v1.0.0-beta.57) (2024-06-12)
|
|
103
|
+
|
|
104
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
105
|
+
|
|
106
|
+
# [1.0.0-beta.56](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.55...v1.0.0-beta.56) (2024-06-11)
|
|
107
|
+
|
|
108
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
109
|
+
|
|
110
|
+
# [1.0.0-beta.55](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.54...v1.0.0-beta.55) (2024-05-26)
|
|
111
|
+
|
|
112
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
113
|
+
|
|
114
|
+
# [1.0.0-beta.54](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.53...v1.0.0-beta.54) (2024-05-26)
|
|
115
|
+
|
|
116
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
117
|
+
|
|
118
|
+
# [1.0.0-beta.53](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.52...v1.0.0-beta.53) (2024-05-26)
|
|
119
|
+
|
|
120
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
121
|
+
|
|
122
|
+
# [1.0.0-beta.52](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.51...v1.0.0-beta.52) (2024-05-25)
|
|
123
|
+
|
|
124
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
125
|
+
|
|
126
|
+
# [1.0.0-beta.51](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.50...v1.0.0-beta.51) (2024-04-12)
|
|
127
|
+
|
|
128
|
+
### Bug Fixes
|
|
129
|
+
|
|
130
|
+
- query parser nested qref clauses ([10bd94d](https://github.com/sciactive/nymphjs/commit/10bd94df0329a3abc76cecb9d05f9a7fb2fdf29a))
|
|
131
|
+
|
|
132
|
+
# [1.0.0-beta.50](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.49...v1.0.0-beta.50) (2024-04-08)
|
|
133
|
+
|
|
134
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
135
|
+
|
|
136
|
+
# [1.0.0-beta.49](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.48...v1.0.0-beta.49) (2024-03-04)
|
|
137
|
+
|
|
138
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
139
|
+
|
|
140
|
+
# [1.0.0-beta.48](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.47...v1.0.0-beta.48) (2023-11-10)
|
|
141
|
+
|
|
142
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
143
|
+
|
|
144
|
+
# [1.0.0-beta.47](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.46...v1.0.0-beta.47) (2023-11-10)
|
|
145
|
+
|
|
146
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
147
|
+
|
|
148
|
+
# [1.0.0-beta.46](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.45...v1.0.0-beta.46) (2023-08-29)
|
|
149
|
+
|
|
150
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
151
|
+
|
|
152
|
+
# [1.0.0-beta.45](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.44...v1.0.0-beta.45) (2023-07-17)
|
|
153
|
+
|
|
154
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
155
|
+
|
|
156
|
+
# [1.0.0-beta.44](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.43...v1.0.0-beta.44) (2023-07-13)
|
|
157
|
+
|
|
158
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
159
|
+
|
|
160
|
+
# [1.0.0-beta.43](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.42...v1.0.0-beta.43) (2023-07-12)
|
|
161
|
+
|
|
162
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
163
|
+
|
|
164
|
+
# [1.0.0-beta.42](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.41...v1.0.0-beta.42) (2023-07-12)
|
|
165
|
+
|
|
166
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
167
|
+
|
|
168
|
+
# [1.0.0-beta.41](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.40...v1.0.0-beta.41) (2023-07-12)
|
|
169
|
+
|
|
170
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
171
|
+
|
|
172
|
+
# [1.0.0-beta.40](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.39...v1.0.0-beta.40) (2023-07-10)
|
|
173
|
+
|
|
174
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
175
|
+
|
|
176
|
+
# [1.0.0-beta.39](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.38...v1.0.0-beta.39) (2023-07-09)
|
|
177
|
+
|
|
178
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
179
|
+
|
|
180
|
+
# [1.0.0-beta.38](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.37...v1.0.0-beta.38) (2023-07-09)
|
|
181
|
+
|
|
182
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
183
|
+
|
|
184
|
+
# [1.0.0-beta.37](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.36...v1.0.0-beta.37) (2023-07-09)
|
|
185
|
+
|
|
186
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
187
|
+
|
|
188
|
+
# [1.0.0-beta.36](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.35...v1.0.0-beta.36) (2023-07-09)
|
|
189
|
+
|
|
190
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
191
|
+
|
|
192
|
+
# [1.0.0-beta.35](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.34...v1.0.0-beta.35) (2023-06-14)
|
|
193
|
+
|
|
194
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
195
|
+
|
|
196
|
+
# [1.0.0-beta.34](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.33...v1.0.0-beta.34) (2023-05-13)
|
|
197
|
+
|
|
198
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
199
|
+
|
|
200
|
+
# [1.0.0-beta.33](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.32...v1.0.0-beta.33) (2023-05-13)
|
|
201
|
+
|
|
202
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
203
|
+
|
|
204
|
+
# [1.0.0-beta.32](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.31...v1.0.0-beta.32) (2023-05-13)
|
|
205
|
+
|
|
206
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
207
|
+
|
|
208
|
+
# [1.0.0-beta.31](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.30...v1.0.0-beta.31) (2023-05-12)
|
|
209
|
+
|
|
210
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
211
|
+
|
|
212
|
+
# [1.0.0-beta.30](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.29...v1.0.0-beta.30) (2023-05-12)
|
|
213
|
+
|
|
214
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
215
|
+
|
|
216
|
+
# [1.0.0-beta.29](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.28...v1.0.0-beta.29) (2023-05-08)
|
|
217
|
+
|
|
218
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
219
|
+
|
|
220
|
+
# [1.0.0-beta.28](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.27...v1.0.0-beta.28) (2023-05-05)
|
|
221
|
+
|
|
222
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
223
|
+
|
|
224
|
+
# [1.0.0-beta.27](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.26...v1.0.0-beta.27) (2023-05-04)
|
|
225
|
+
|
|
226
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
227
|
+
|
|
228
|
+
# [1.0.0-beta.26](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.25...v1.0.0-beta.26) (2023-05-04)
|
|
229
|
+
|
|
230
|
+
### Features
|
|
231
|
+
|
|
232
|
+
- update packages and migrate to mysql2 ([72ad611](https://github.com/sciactive/nymphjs/commit/72ad611bd2bf7bf85c3ba8a3486503d9b50c49d6))
|
|
233
|
+
|
|
234
|
+
# [1.0.0-beta.25](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.24...v1.0.0-beta.25) (2023-05-04)
|
|
235
|
+
|
|
236
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
237
|
+
|
|
238
|
+
# [1.0.0-beta.24](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.23...v1.0.0-beta.24) (2023-05-02)
|
|
239
|
+
|
|
240
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
241
|
+
|
|
242
|
+
# [1.0.0-beta.23](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.22...v1.0.0-beta.23) (2023-05-02)
|
|
243
|
+
|
|
244
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
245
|
+
|
|
246
|
+
# [1.0.0-beta.22](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.21...v1.0.0-beta.22) (2023-05-01)
|
|
247
|
+
|
|
248
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
249
|
+
|
|
250
|
+
# [1.0.0-beta.21](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.20...v1.0.0-beta.21) (2023-05-01)
|
|
251
|
+
|
|
252
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
253
|
+
|
|
254
|
+
# [1.0.0-beta.20](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.19...v1.0.0-beta.20) (2023-04-30)
|
|
255
|
+
|
|
256
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
257
|
+
|
|
258
|
+
# [1.0.0-beta.19](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.18...v1.0.0-beta.19) (2023-04-29)
|
|
259
|
+
|
|
260
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
261
|
+
|
|
262
|
+
# [1.0.0-beta.18](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.17...v1.0.0-beta.18) (2023-04-27)
|
|
263
|
+
|
|
264
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
265
|
+
|
|
266
|
+
# [1.0.0-beta.17](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2023-04-24)
|
|
267
|
+
|
|
268
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
269
|
+
|
|
270
|
+
# [1.0.0-beta.16](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2023-03-31)
|
|
271
|
+
|
|
272
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
273
|
+
|
|
274
|
+
# [1.0.0-beta.15](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2023-03-23)
|
|
275
|
+
|
|
276
|
+
### Features
|
|
277
|
+
|
|
278
|
+
- add option to sort results by a property ([16384e7](https://github.com/sciactive/nymphjs/commit/16384e7bdab88abb55ccccabb06ac09f92fa8a03))
|
|
279
|
+
|
|
280
|
+
# [1.0.0-beta.14](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2023-03-17)
|
|
281
|
+
|
|
282
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
283
|
+
|
|
284
|
+
# [1.0.0-beta.13](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2023-03-16)
|
|
285
|
+
|
|
286
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
287
|
+
|
|
288
|
+
# [1.0.0-beta.12](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2023-03-04)
|
|
289
|
+
|
|
290
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
291
|
+
|
|
292
|
+
# [1.0.0-beta.11](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2023-02-27)
|
|
293
|
+
|
|
294
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
295
|
+
|
|
296
|
+
# [1.0.0-beta.10](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.9...v1.0.0-beta.10) (2023-01-19)
|
|
297
|
+
|
|
298
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
299
|
+
|
|
300
|
+
# [1.0.0-beta.9](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.8...v1.0.0-beta.9) (2023-01-09)
|
|
301
|
+
|
|
302
|
+
**Note:** Version bump only for package @nymphjs/query-parser
|
|
303
|
+
|
|
6
304
|
# [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
305
|
|
|
8
306
|
**Note:** Version bump only for package @nymphjs/query-parser
|
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ import Category from './Category';
|
|
|
23
23
|
async function doQuery() {
|
|
24
24
|
const [options, ...selectors] = queryParser({
|
|
25
25
|
query:
|
|
26
|
-
'limit:4 foobar (| [archived] mdate<"2 weeks ago") category<{cat Tech}>',
|
|
26
|
+
'limit:4 sort:mdate foobar (| [archived] mdate<"2 weeks ago") category<{cat Tech}>',
|
|
27
27
|
entityClass: BlogPost,
|
|
28
28
|
defaultFields: ['title', 'body'],
|
|
29
29
|
qrefMap: {
|
|
@@ -37,7 +37,8 @@ async function doQuery() {
|
|
|
37
37
|
Options will be
|
|
38
38
|
{
|
|
39
39
|
class: BlogPost,
|
|
40
|
-
limit: 4
|
|
40
|
+
limit: 4,
|
|
41
|
+
sort: 'mdate'
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
And selectors will be (equivalent to)
|
|
@@ -81,10 +82,11 @@ async function doQuery() {
|
|
|
81
82
|
|
|
82
83
|
## Options
|
|
83
84
|
|
|
84
|
-
You can set limit, offset, and reverse like this.
|
|
85
|
+
You can set limit, offset, sort, and reverse like this.
|
|
85
86
|
|
|
86
87
|
- `limit:number`
|
|
87
88
|
- `offset:number`
|
|
89
|
+
- `sort:string`
|
|
88
90
|
- `reverse:true`, `reverse:false`, `reverse:1`, or `reverse:0`
|
|
89
91
|
|
|
90
92
|
These must appear in the top level of the query (outside of any parentheses).
|
|
@@ -132,12 +134,12 @@ Check for a reference to another entity.
|
|
|
132
134
|
Check for a reference to another entity using a query.
|
|
133
135
|
|
|
134
136
|
- `name<{refclassname inner query}>` or `name!<{refclassname inner query}>`
|
|
135
|
-
- (
|
|
137
|
+
- (Escape curly brackets with a leading backslash.)
|
|
136
138
|
- (Requires a map of refclassname to their actual class and default fields.)
|
|
137
139
|
|
|
138
140
|
### contain and !contain
|
|
139
141
|
|
|
140
|
-
Check
|
|
142
|
+
Check if the array at the named property contains a value.
|
|
141
143
|
|
|
142
144
|
- `name<value>` or `name!<value>`
|
|
143
145
|
- (Escape angle brackets with a leading backslash. If your value could be interpreted as valid JSON, encode it as a JSON string and use the JSON syntax instead.)
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@nymphjs/client"]=t():e["@nymphjs/client"]=t()}(this,(()=>(()=>{"use strict";var e={
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@nymphjs/client"]=t():e["@nymphjs/client"]=t()}(this,(()=>(()=>{"use strict";var e={750:(e,t,l)=>{function r(e,t,l=1/0){let r=e;const c=[];for(;c.length<l&&r.length;){const e=r.split(t,1);c.push(e[0]),r=r.slice(e[0].length),c.length<l&&r&&(r=r.replace(t,""),r||c.push(r))}return r&&l>0&&(c[c.length-1]+=r),c}l.r(t),l.d(t,{default:()=>c,splitn:()=>r});const c=r},509:function(e,t,l){var r=this&&this.__createBinding||(Object.create?function(e,t,l,r){void 0===r&&(r=l);var c=Object.getOwnPropertyDescriptor(t,l);c&&!("get"in c?!t.__esModule:c.writable||c.configurable)||(c={enumerable:!0,get:function(){return t[l]}}),Object.defineProperty(e,r,c)}:function(e,t,l,r){void 0===r&&(r=l),e[r]=t[l]}),c=this&&this.__exportStar||function(e,t){for(var l in e)"default"===l||Object.prototype.hasOwnProperty.call(t,l)||r(t,e,l)},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.queryParser=void 0,c(l(822),t);const i=n(l(822));t.queryParser=i.default,t.default=i.default},822:function(e,t,l){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const c=r(l(750));function n({query:e,entityClass:t,defaultFields:l=["name"],qrefMap:r={},bareHandler:c=((e,t,l=["name"])=>(e.match(/[_%]/)||(e=`%${e}%`),l.length?{type:"|",ilike:l.map((t=>[t,e]))}:{}))}){const n={class:t};return[n,...i({query:e,entityClass:t,type:"&",defaultFields:l,qrefMap:r,options:n,bareHandler:c})]}function i({query:e,entityClass:t,type:l,defaultFields:r,qrefMap:u,options:o,bareHandler:h}){const f={type:l};let p=e;const d=[];let g=!1,m=0,y=null;for(let e=0;e<p.length;e++)if('"'===p[e])g?"\\"!==p[e-1]&&(g=!1):g=!0;else{if(g)continue;"("===p[e]?null==y?y=e:m++:")"===p[e]&&(0===m?null==y||(d.push([y,e+1]),y=null):m--)}if(d.length){f.selector=[],d.reverse();for(let e of d){let l=p.slice(e[0]+1,e[1]-1);p=p.slice(0,e[0])+p.slice(e[1]);let c="&";l.startsWith("&")?l=l.slice(1):l.startsWith("!&")?(c="!&",l=l.slice(2)):l.startsWith("|")?(c="|",l=l.slice(1)):l.startsWith("!|")?(c="!|",l=l.slice(2)):l.startsWith("!")&&(c="!&",l=l.slice(1)),f.selector.push(...i({query:l,entityClass:t,type:c,defaultFields:r,qrefMap:u,bareHandler:h}))}}if(p=function({query:e,selector:t,qrefMap:l,bareHandler:r}){let i=e;const u=/(?: |^)(\w+)!?<\{(\w+) (.*?[^\\])\}>(?= |$)/g,o=i.match(u);if(o){t.qref=[],t["!qref"]=[];for(let e of o)try{let[i,a]=(0,c.default)(e.trim().slice(0,-1),"<",2);h=a.slice(1,-1),a=h.replace(/\\\{/g,"{").replace(/\\\}/g,"}").replace(/\\\\/g,"\\");let[s,u]=(0,c.default)(a," ",2);const o=l[s].class;if(null==o)continue;const f=n({query:u,entityClass:o,defaultFields:l[s].defaultFields,qrefMap:l,bareHandler:r});i.endsWith("!")?t["!qref"].push([i.slice(0,-1),f]):t.qref.push([i,f])}catch(e){continue}t.qref.length||delete t.qref,t["!qref"].length||delete t["!qref"]}var h;i=i.replace(u,"");const f=/(?: |^)(\w+)!?=(""|".*?[^\\]"|[^ ]+)(?= |$)/g,p=i.match(f);if(p){t.equal=[],t["!equal"]=[];for(let e of p)try{let[l,r]=(0,c.default)(e.trim(),"=",2);try{l.endsWith("!")?t["!equal"].push([l.slice(0,-1),JSON.parse(r)]):t.equal.push([l,JSON.parse(r)])}catch(e){l.endsWith("!")?t["!equal"].push([l.slice(0,-1),a(r)]):t.equal.push([l,a(r)])}}catch(e){continue}t.equal.length||delete t.equal,t["!equal"].length||delete t["!equal"]}i=i.replace(f,"");const d=/(?: |^)(\w+)!?<\{([0-9a-f]{24})\}>(?= |$)/g,g=i.match(d);if(g){t.ref=[],t["!ref"]=[];for(let e of g)try{let[l,r]=(0,c.default)(e.trim().slice(0,-1),"<",2);l.endsWith("!")?t["!ref"].push([l.slice(0,-1),r.slice(1,-1)]):t.ref.push([l,r.slice(1,-1)])}catch(e){continue}t.ref.length||delete t.ref,t["!ref"].length||delete t["!ref"]}i=i.replace(d,"");const m=/(?: |^)(\w+)!?(<.*?[^\\]>)(?= |$)/g,y=i.match(m);if(y){t.contain=[],t["!contain"]=[];for(let e of y)try{let[l,r]=(0,c.default)(e.trim().slice(0,-1),"<",2);try{l.endsWith("!")?t["!contain"].push([l.slice(0,-1),JSON.parse(s(r))]):t.contain.push([l,JSON.parse(s(r))])}catch(e){l.endsWith("!")?t["!contain"].push([l.slice(0,-1),s(r)]):t.contain.push([l,s(r)])}}catch(e){continue}t.contain.length||delete t.contain,t["!contain"].length||delete t["!contain"]}i=i.replace(m,"");const b=/(?: |^)(\w+)!?~(\/\/|\/.*?[^\\]\/)i?(?= |$)/g,q=i.match(b);if(q){t.match=[],t["!match"]=[],t.imatch=[],t["!imatch"]=[];for(let e of q)try{let[l,r]=(0,c.default)(e.trim(),"~",2);l.endsWith("!")?r.endsWith("i")?t["!imatch"].push([l.slice(0,-1),r.replace(/^\/|\/i$/g,"")]):t["!match"].push([l.slice(0,-1),r.replace(/^\/|\/$/g,"")]):r.endsWith("i")?t.imatch.push([l,r.replace(/^\/|\/i$/g,"")]):t.match.push([l,r.replace(/^\/|\/$/g,"")])}catch(e){continue}t.match.length||delete t.match,t["!match"].length||delete t["!match"],t.imatch.length||delete t.imatch,t["!imatch"].length||delete t["!imatch"]}i=i.replace(b,"");const $=/(?: |^)(\w+)!?~(""i?|".*?[^\\]"i?|[^ ]+)(?= |$)/g,w=i.match($);if(w){t.like=[],t["!like"]=[],t.ilike=[],t["!ilike"]=[];for(let e of w)try{let[l,r]=(0,c.default)(e.trim(),"~",2);l.endsWith("!")?r.endsWith('"i')?t["!ilike"].push([l.slice(0,-1),a(r.slice(0,-1))]):t["!like"].push([l.slice(0,-1),a(r)]):r.endsWith('"i')?t.ilike.push([l,a(r.slice(0,-1))]):t.like.push([l,a(r)])}catch(e){continue}t.like.length||delete t.like,t["!like"].length||delete t["!like"],t.ilike.length||delete t.ilike,t["!ilike"].length||delete t["!ilike"]}i=i.replace($,"");const _=/(?: |^)\{!?([0-9a-f]{24})\}(?= |$)/g,k=i.match(_);if(k){t.guid=[],t["!guid"]=[];for(let e of k)try{let l=e.trim().replace(/^\{|\}$/g,"");l.startsWith("!")?t["!guid"].push(l.slice(1)):t.guid.push(l)}catch(e){continue}t.guid.length||delete t.guid,t["!guid"].length||delete t["!guid"]}i=i.replace(_,"");const v=/(?: |^)\[(!?\w+)\](?= |$)/g,O=i.match(v);if(O){t.truthy=[],t["!truthy"]=[];for(let e of O)try{let l=e.trim().replace(/^\[|\]$/g,"");l.startsWith("!")?t["!truthy"].push(l.slice(1)):t.truthy.push(l)}catch(e){continue}t.truthy.length||delete t.truthy,t["!truthy"].length||delete t["!truthy"]}i=i.replace(v,"");const W=/(?: |^)<(!?\w+)>(?= |$)/g,j=i.match(W);if(j){t.tag=[],t["!tag"]=[];for(let e of j)try{let l=e.trim().replace(/^<|>$/g,"");l.startsWith("!")?t["!tag"].push(l.slice(1)):t.tag.push(l)}catch(e){continue}t.tag.length||delete t.tag,t["!tag"].length||delete t["!tag"]}i=i.replace(W,"");const F=/(?: |^)(\w+)>(-?\d+(?:\.\d+)?)(?= |$)/g,M=i.match(F);if(M){t.gt=[];for(let e of M)try{let[l,r]=(0,c.default)(e.trim(),">",2);t.gt.push([l,Number(r)])}catch(e){continue}t.gt.length||delete t.gt}i=i.replace(F,"");const x=/(?: |^)(\w+)>(\w+|"[^"]+")(?= |$)/g,P=i.match(x);if(P){null==t.gt&&(t.gt=[]);for(let e of P)try{let[l,r]=(0,c.default)(e.trim(),">",2);t.gt.push([l,null,r.replace(/"/g,"")])}catch(e){continue}t.gt.length||delete t.gt}i=i.replace(x,"");const N=/(?: |^)(\w+)>=(-?\d+(?:\.\d+)?)(?= |$)/g,S=i.match(N);if(S){t.gte=[];for(let e of S)try{let[l,r]=(0,c.default)(e.trim(),">=",2);t.gte.push([l,Number(r)])}catch(e){continue}t.gte.length||delete t.gte}i=i.replace(N,"");const H=/(?: |^)(\w+)>=(\w+|"[^"]+")(?= |$)/g,C=i.match(H);if(C){null==t.gte&&(t.gte=[]);for(let e of C)try{let[l,r]=(0,c.default)(e.trim(),">=",2);t.gte.push([l,null,r.replace(/"/g,"")])}catch(e){continue}t.gte.length||delete t.gte}i=i.replace(H,"");const A=/(?: |^)(\w+)<(-?\d+(?:\.\d+)?)(?= |$)/g,J=i.match(A);if(J){t.lt=[];for(let e of J)try{let[l,r]=(0,c.default)(e.trim(),"<",2);t.lt.push([l,Number(r)])}catch(e){continue}t.lt.length||delete t.lt}i=i.replace(A,"");const D=/(?: |^)(\w+)<(\w+|"[^"]+")(?= |$)/g,z=i.match(D);if(z){null==t.lt&&(t.lt=[]);for(let e of z)try{let[l,r]=(0,c.default)(e.trim(),"<",2);t.lt.push([l,null,r.replace(/"/g,"")])}catch(e){continue}t.lt.length||delete t.lt}i=i.replace(D,"");const T=/(?: |^)(\w+)<=(-?\d+(?:\.\d+)?)(?= |$)/g,Z=i.match(T);if(Z){t.lte=[];for(let e of Z)try{let[l,r]=(0,c.default)(e.trim(),"<=",2);t.lte.push([l,Number(r)])}catch(e){continue}t.lte.length||delete t.lte}i=i.replace(T,"");const B=/(?: |^)(\w+)<=(\w+|"[^"]+")(?= |$)/g,E=i.match(B);if(E){null==t.lte&&(t.lte=[]);for(let e of E)try{let[l,r]=(0,c.default)(e.trim(),"<=",2);t.lte.push([l,null,r.replace(/"/g,"")])}catch(e){continue}t.lte.length||delete t.lte}return i=i.replace(B,""),i.trim()}({query:p,selector:f,qrefMap:u,bareHandler:h}),o){const e=/(?: |^)limit:(\d+)(?= |$)/,t=p.match(e);t&&(o.limit=Number(t[1])),p=p.replace(e,"");const l=/(?: |^)offset:(\d+)(?= |$)/,r=p.match(l);r&&(o.offset=Number(r[1])),p=p.replace(l,"");const c=/(?: |^)sort:([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)(?= |$)/,n=p.match(c);n&&(o.sort=n[1]),p=p.replace(c,"");const i=/(?: |^)reverse:(true|false|1|0)(?= |$)/,a=p.match(i);a&&(o.reverse="true"===a[1]||"1"===a[1]),p=p.replace(i,"")}if(p=p.trim(),p.length){const e=h(p,t,r);if(Object.keys(e).length)return[...Object.keys(f).length>1?[f]:[],{type:"|",...e}]}return!("selector"in f)||1!==f.selector.length||2!==Object.keys(f).length||"&"!==f.type&&"|"!==f.type?[f]:f.selector}function a(e){return e.match(/^".*?[^\\]"$/)?e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"):e}function s(e){return e.replace(/\\</g,"<").replace(/\\>/g,">").replace(/\\\\/g,"\\")}t.default=n}},t={};function l(r){var c=t[r];if(void 0!==c)return c.exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,l),n.exports}return l.d=(e,t)=>{for(var r in t)l.o(t,r)&&!l.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l(509)})()));
|
|
2
2
|
//# sourceMappingURL=index.js.map
|