leoric 2.6.2 → 2.7.1

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/History.md ADDED
@@ -0,0 +1,783 @@
1
+ 2.7.1 / 2022-08-24
2
+ ==================
3
+
4
+ ## What's Changed
5
+ * fix: projects might have strictPropertyInitialization set to true by @cyjake in https://github.com/cyjake/leoric/pull/329
6
+ * fix: types for validate in `Column` decorator by @vagusX in https://github.com/cyjake/leoric/pull/330
7
+
8
+ ## New Contributors
9
+ * @vagusX made their first contribution in https://github.com/cyjake/leoric/pull/330
10
+
11
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.7.0...v2.7.1
12
+
13
+ 2.7.0 / 2022-08-24
14
+ ==================
15
+
16
+ ## What's Changed
17
+ * fix: glue code for opts.dialectModulePath by @cyjake in https://github.com/cyjake/leoric/pull/326
18
+ * fix: primaryKey in upsert values should be validate in sqlite and postgres by @JimmyDaddy in https://github.com/cyjake/leoric/pull/328
19
+ * feat: change DataTypes to ts and complete decorators type definitions by @JimmyDaddy in https://github.com/cyjake/leoric/pull/319
20
+
21
+
22
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.6.3...v2.7.0
23
+
24
+ 2.6.3 / 2022-08-04
25
+ ==================
26
+
27
+ ## What's Changed
28
+ * fix: aggregator not parse null result by @killagu in https://github.com/cyjake/leoric/pull/322
29
+ * test: switch the auth protocol of test mysql database by @cyjake in https://github.com/cyjake/leoric/pull/323
30
+ * feat: add leoric_bone meta data to Bone by @JimmyDaddy in https://github.com/cyjake/leoric/pull/324
31
+ * docs: fix declarations of findOne(primaryKey) & findOne({ $or }) by @cyjake in https://github.com/cyjake/leoric/pull/325
32
+
33
+
34
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.6.2...v2.6.3
35
+
36
+ 2.6.2 / 2022-07-12
37
+ ==================
38
+
39
+ ## What's Changed
40
+ * fix: format select with out * if use aggreator by @killagu in https://github.com/cyjake/leoric/pull/320
41
+ * fix: fix transaction typing by @killagu in https://github.com/cyjake/leoric/pull/321
42
+
43
+ ## New Contributors
44
+ * @killagu made their first contribution in https://github.com/cyjake/leoric/pull/320
45
+
46
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.6.1...v2.6.2
47
+
48
+ 2.6.1 / 2022-06-24
49
+ ==================
50
+
51
+ ## What's Changed
52
+ * build: switch to latest postgres by @cyjake in https://github.com/cyjake/leoric/pull/316
53
+ * fix: fix [bug] init models with bone class should work #317 by @JimmyDaddy in https://github.com/cyjake/leoric/pull/318
54
+
55
+
56
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.6.0...v2.6.1
57
+
58
+ 2.6.0 / 2022-06-02
59
+ ==================
60
+
61
+ ## What's Changed
62
+ * feat: support export sql query template in logger by @JimmyDaddy in https://github.com/cyjake/leoric/pull/314
63
+ * fix: fix uncast date string without milliseconds error by jsCore in Android/iOS by @JimmyDaddy in https://github.com/cyjake/leoric/pull/315
64
+
65
+
66
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.5.0...v2.6.0
67
+
68
+ 2.5.0 / 2022-05-13
69
+ ==================
70
+
71
+ ## What's Changed
72
+ * feat: support disconnect and fix timestamps init by @JimmyDaddy in https://github.com/cyjake/leoric/pull/313
73
+
74
+
75
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.4.1...v2.5.0
76
+
77
+ 2.4.1 / 2022-04-27
78
+ ==================
79
+
80
+ ## What's Changed
81
+ * fix: realm.Bone.DataTypes should be invokable, Invokable.TYPE.toSqlString() get wrong default length(1), DataType definitions by @JimmyDaddy in https://github.com/cyjake/leoric/pull/307
82
+
83
+
84
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.4.0...v2.4.1
85
+
86
+ 2.4.0 / 2022-04-24
87
+ ==================
88
+
89
+ ## What's Changed
90
+ * feat: support custom driver by @JimmyDaddy in https://github.com/cyjake/leoric/pull/304
91
+ * chore: update build status badge by @snapre in https://github.com/cyjake/leoric/pull/305
92
+ * feat: export more ts type definitions and use deep-equal module by @JimmyDaddy in https://github.com/cyjake/leoric/pull/306
93
+
94
+ ## New Contributors
95
+ * @snapre made their first contribution in https://github.com/cyjake/leoric/pull/305
96
+
97
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.3.2...v2.4.0
98
+
99
+ 2.3.2 / 2022-04-15
100
+ ==================
101
+
102
+ ## What's Changed
103
+ * fix: order by raw with mix-type array in sequelize mode by @JimmyDaddy in https://github.com/cyjake/leoric/pull/298
104
+ * docs: monthly updates and example about egg-orm usage with TypeScript by @cyjake in https://github.com/cyjake/leoric/pull/299
105
+ * docs: monthly updates in en & docmentation about typescript support by @cyjake in https://github.com/cyjake/leoric/pull/300
106
+ * fix: raw query should format replacements with extra blank by @JimmyDaddy in https://github.com/cyjake/leoric/pull/301
107
+ * docs: elaborate on querying by @cyjake in https://github.com/cyjake/leoric/pull/302
108
+ * feat: transaction should return result by @JimmyDaddy in https://github.com/cyjake/leoric/pull/303
109
+
110
+
111
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.3.1...v2.3.2
112
+
113
+ 2.3.1 / 2022-03-22
114
+ ==================
115
+
116
+ ## What's Changed
117
+ * fix: mysql2 Invalid Date compatible by @JimmyDaddy in https://github.com/cyjake/leoric/pull/291
118
+ * fix: order by raw in sequelize mode by @JimmyDaddy in https://github.com/cyjake/leoric/pull/292
119
+ * fix: bulk update query conditions duplicated in sequelize mode by @JimmyDaddy in https://github.com/cyjake/leoric/pull/293
120
+ * fix: bulk destroy query conditions duplicated in sequelize mode by @JimmyDaddy in https://github.com/cyjake/leoric/pull/295
121
+ * fix: drop column if not defined in attributes when alter table by @cyjake in https://github.com/cyjake/leoric/pull/296
122
+
123
+
124
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.3.0...v2.3.1
125
+
126
+ 2.3.0 / 2022-03-10
127
+ ==================
128
+
129
+ ## What's Changed
130
+ * feat: model declaration with decorators by @cyjake in https://github.com/cyjake/leoric/pull/287
131
+ * feat: add VIRTUAL data type by @JimmyDaddy in https://github.com/cyjake/leoric/pull/289
132
+ * fix: create instance dirty check rule fix by @JimmyDaddy in https://github.com/cyjake/leoric/pull/290
133
+
134
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.2.3...v2.3.0
135
+ 2.2.3 / 2022-03-01
136
+ ==================
137
+
138
+ ## What's Changed
139
+ * fix: normalize attribute defaultValue by @cyjake in https://github.com/cyjake/leoric/pull/285
140
+ * fix: instance beforeUpdate hooks should not modify any Raw if there are no Raw assignment in them by @JimmyDaddy in https://github.com/cyjake/leoric/pull/283
141
+
142
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.2.2...v2.2.3
143
+
144
+ 2.2.2 / 2022-02-28
145
+ ==================
146
+
147
+ ## What's Changed
148
+ * fix: tddl gives misleading information_schema.columns.table_name by @cyjake in https://github.com/cyjake/leoric/pull/284
149
+
150
+
151
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.2.1...v2.2.2
152
+
153
+ 2.2.1 / 2022-02-24
154
+ ==================
155
+
156
+ ## What's Changed
157
+ * fix: realm.DataTypes should be invokable by @cyjake in https://github.com/cyjake/leoric/pull/282
158
+
159
+
160
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.2.0...v2.2.1
161
+
162
+ 2.2.0 / 2022-02-24
163
+ ==================
164
+
165
+ ## What's Changed
166
+ * fix: add missing `password` field for `ConnectOptions` by @luckydrq in https://github.com/cyjake/leoric/pull/280
167
+ * feat: integer types (mostly mysql specific) by @cyjake in https://github.com/cyjake/leoric/pull/281
168
+
169
+
170
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.1.1...v2.2.0
171
+
172
+ 2.1.1 / 2022-02-23
173
+ ==================
174
+
175
+ ## What's Changed
176
+ * fix: fix #274 update with fields option by @JimmyDaddy in https://github.com/cyjake/leoric/pull/275
177
+ * fix: upsert should set createdAt by default while createdAt not set by @JimmyDaddy in https://github.com/cyjake/leoric/pull/277
178
+ * fix: previousChanges should check instance is new record or not while specific attributes' values were undefined by @JimmyDaddy in https://github.com/cyjake/leoric/pull/276
179
+ * docs: add types for realm by @luckydrq in https://github.com/cyjake/leoric/pull/278
180
+
181
+ ## New Contributors
182
+ * @luckydrq made their first contribution in https://github.com/cyjake/leoric/pull/278
183
+
184
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.1.0...v2.1.1
185
+
186
+ 2.1.0 / 2022-02-17
187
+ ==================
188
+
189
+ ## What's Changed
190
+ * feat: fix #270 sequelize mode bulkBuild by @JimmyDaddy in https://github.com/cyjake/leoric/pull/273
191
+ * fix: mysql delete/remove/destroy with limit and orders by @JimmyDaddy in https://github.com/cyjake/leoric/pull/272
192
+
193
+
194
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.0.4...v2.1.0
195
+
196
+ 2.0.4 / 2022-02-16
197
+ ==================
198
+
199
+ ## What's Changed
200
+ * fix: fix unit test error by @LB4027221 in https://github.com/cyjake/leoric/pull/269
201
+ * fix: attribute.defaultValue should be set when init attributes by @cyjake in https://github.com/cyjake/leoric/pull/271
202
+
203
+
204
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.0.3...v2.0.4
205
+
206
+ 2.0.3 / 2022-02-11
207
+ ==================
208
+
209
+ ## What's Changed
210
+ * fix: default updatedAt to new date if model has no createdAt by @LB4027221 in https://github.com/cyjake/leoric/pull/268
211
+
212
+ ## New Contributors
213
+ * @LB4027221 made their first contribution in https://github.com/cyjake/leoric/pull/268
214
+
215
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.0.2...v2.0.3
216
+
217
+ 2.0.2 / 2022-02-10
218
+ ==================
219
+
220
+ ## What's Changed
221
+ * fix: order by alias should not throw by @cyjake in https://github.com/cyjake/leoric/pull/255
222
+ * fix: fix #257 DataType.uncast should skip Raw type at type checking by @JimmyDaddy in https://github.com/cyjake/leoric/pull/258
223
+ * docs: async function in transaction by @cyjake in https://github.com/cyjake/leoric/pull/259
224
+ * fix: fixed #256 static create instance should check all default attri… by @JimmyDaddy in https://github.com/cyjake/leoric/pull/262
225
+ * fix: fix #260 UPDATE with LIMIT and ORDER should be formatted(mysql only) by @JimmyDaddy in https://github.com/cyjake/leoric/pull/261
226
+ * refactor: keep the UPDATE ... ORDER BY ... LIMIT to mysql driver by @cyjake in https://github.com/cyjake/leoric/pull/264
227
+ * fix: fix #263 upsert attributes should use defaultValue while there i… by @JimmyDaddy in https://github.com/cyjake/leoric/pull/265
228
+ * fix: fix restore Error `Undefined attribute "deletedAt"` by @JimmyDaddy in https://github.com/cyjake/leoric/pull/267
229
+ * fix: type checking adaption by @JimmyDaddy in https://github.com/cyjake/leoric/pull/266
230
+
231
+
232
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v2.0.1...v2.0.2
233
+
234
+ 2.0.1 / 2022-01-05
235
+ ==================
236
+
237
+ ## What's Changed
238
+ * fix: format numeric result by @JimmyDaddy in https://github.com/cyjake/leoric/pull/253
239
+ * fix: should still return number if value is '0.000' by @cyjake in https://github.com/cyjake/leoric/pull/254
240
+
241
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v1.15.1...v2.0.1
242
+
243
+ 2.0.0 / 2021-12-28
244
+ ==================
245
+
246
+ ## What's Changed
247
+ * breaking: model.sync add force/alter option by @SmartOrange in https://github.com/cyjake/leoric/pull/224
248
+ * breaking: logQueryError(err, sql, duration, options) by @cyjake in https://github.com/cyjake/leoric/pull/237
249
+ * test: add utf8mb4 test cases by @fengmk2 in https://github.com/cyjake/leoric/pull/239
250
+ * Merge 1.x changes by @cyjake in https://github.com/cyjake/leoric/pull/249
251
+
252
+ ## New Contributors
253
+ * @SmartOrange made their first contribution in https://github.com/cyjake/leoric/pull/222
254
+
255
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v1.15.1...v2.0.0
256
+
257
+ 1.15.1 / 2021-12-28
258
+ ===================
259
+
260
+ ## What's Changed
261
+ * fix: fix #242 date string format by @JimmyDaddy in https://github.com/cyjake/leoric/pull/243
262
+ * fix: update with empty conditions by @JimmyDaddy in https://github.com/cyjake/leoric/pull/241
263
+ * fix: silent option's priority should be lower than valueSet by @JimmyDaddy in https://github.com/cyjake/leoric/pull/244
264
+ * fix: information_schema.columns.datetime_precision by @cyjake in https://github.com/cyjake/leoric/pull/246
265
+ * fix: should not hoist subquery if query is ordered by external columns by @cyjake in https://github.com/cyjake/leoric/pull/247
266
+
267
+
268
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v1.15.0...v1.15.1
269
+
270
+ 1.15.0 / 2021-11-22
271
+ ===================
272
+
273
+ ## What's Changed
274
+ * feat: make duration in precise milliseconds by @fengmk2 in https://github.com/cyjake/leoric/pull/236
275
+ * fix: spell.increment() & spell.decrement() @cyjake https://github.com/cyjake/leoric/pull/234
276
+ * fix: bulkCreate should adapte empty data @JimmyDaddy https://github.com/cyjake/leoric/pull/232
277
+
278
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v1.14.4...v1.14.5
279
+
280
+ 1.14.4 / 2021-11-15
281
+ ===================
282
+
283
+ ## What's Changed
284
+
285
+ * test: PostgreSQL v14 test case compatibility by @cyjake https://github.com/cyjake/leoric/pull/230
286
+ * fix: turn off subquery optimization if query criteria contains other column by @cyjake https://github.com/cyjake/leoric/pull/229
287
+ * fix: bone.changed() return `false | string[]` type by @fengmk2 https://github.com/cyjake/leoric/pull/231
288
+
289
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v1.14.3...v1.14.4
290
+
291
+ 1.14.3 / 2021-11-12
292
+ ===================
293
+
294
+ ## What's Changed
295
+ * fix: logger.logQuery should be guarded in case of error by @SmartOrange in https://github.com/cyjake/leoric/pull/222
296
+ * fix: findOne without result should return null by @JimmyDaddy in https://github.com/cyjake/leoric/pull/225
297
+ * fix: Literal should support bigint type by @fengmk2 in https://github.com/cyjake/leoric/pull/226
298
+ * fix: select((name: string) => boolean) by @cyjake in https://github.com/cyjake/leoric/pull/227
299
+
300
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v1.14.2...v1.14.3
301
+
302
+ 1.14.2 / 2021-11-01
303
+ ===================
304
+
305
+ ## What's Changed
306
+ * fix: accept timestamps in snake case by @cyjake in https://github.com/cyjake/leoric/pull/221
307
+
308
+
309
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v1.14.1...v1.14.2
310
+
311
+ 1.14.1 / 2021-11-01
312
+ ===================
313
+
314
+ ## What's Changed
315
+ * docs: export { Collection } by @cyjake in https://github.com/cyjake/leoric/pull/220
316
+
317
+
318
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v1.14.0...v1.14.1
319
+
320
+ 1.14.0 / 2021-11-01
321
+ ===================
322
+
323
+ Two options regarding `Model.init()` were added in this release:
324
+
325
+ ```js
326
+ class User extends Bone {}
327
+ User.init({ name: STRING }, {
328
+ timestamps: true, // which is the default
329
+ paranoid: true, // which default to `false`
330
+ });
331
+ assert.deepEqual(Object.keys(User.attributes), [
332
+ 'id',
333
+ 'name',
334
+ 'createdAt',
335
+ 'updatedAt',
336
+ 'deletedAt',
337
+ ]);
338
+ ```
339
+
340
+ ## What's Changed
341
+ * docs: update 'primayKey' typos by @freshgum-bubbles in https://github.com/cyjake/leoric/pull/211
342
+ * docs: DataTypes definitions in d.ts by @cyjake in https://github.com/cyjake/leoric/pull/210
343
+ * fix: fix#209 sequelize mode should update all changed fields in instance update method by @JimmyDaddy in https://github.com/cyjake/leoric/pull/212
344
+ * fix: fix #213 findAndCountAll should ignore attributes by @JimmyDaddy in https://github.com/cyjake/leoric/pull/214
345
+ * fix: opts.connectTimeout by @cyjake in https://github.com/cyjake/leoric/pull/216
346
+ * fix: reload instance with sharding key should not throw by @cyjake in https://github.com/cyjake/leoric/pull/217
347
+ * feat: timestamps should be defined by default by @cyjake in https://github.com/cyjake/leoric/pull/218
348
+ * fix: instance.reload() should not rely on `static findOne()` by @cyjake in https://github.com/cyjake/leoric/pull/219
349
+
350
+ ## New Contributors
351
+ * @freshgum-bubbles made their first contribution in https://github.com/cyjake/leoric/pull/211
352
+
353
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v1.13.5...v1.14.0
354
+
355
+ 1.13.5 / 2021-10-26
356
+ ===================
357
+
358
+ ## What's Changed
359
+ * docs: enhance aggregation query types & fix raw query result type by @cyjake in https://github.com/cyjake/leoric/pull/208
360
+
361
+
362
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v1.13.4...v1.13.5
363
+
364
+ 1.13.4 / 2021-10-25
365
+ ===================
366
+
367
+ ## What's Changed
368
+ * docs: spell & model methods should be generic by @cyjake in https://github.com/cyjake/leoric/pull/206
369
+ * docs: enhance query options, instance type, and toJSON() result type by @cyjake in https://github.com/cyjake/leoric/pull/207
370
+
371
+ This version brings correct (and hopefully better) typescript definitions, with the dts checked continuously at test/types tests. With this version, users that have model types correctly pinned at Bone will get code completion including class fields. Such as:
372
+
373
+ ![image](https://user-images.githubusercontent.com/252317/138683240-98ee9e79-4b3e-449c-bc95-a449d457d64f.png)
374
+
375
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v1.13.3...v1.13.4
376
+
377
+ 1.13.3 / 2021-10-21
378
+ ===================
379
+
380
+ ## What's Changed
381
+ * refactor: persist edge cases of type casting in integration tests by @cyjake in https://github.com/cyjake/leoric/pull/202
382
+ * docs: renaming attributes by @cyjake in https://github.com/cyjake/leoric/pull/203
383
+ * fix: JSON.uncast(string) should not serialize twice by @cyjake in https://github.com/cyjake/leoric/pull/205
384
+
385
+
386
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v1.13.2...v1.13.3
387
+
388
+ 1.13.2 / 2021-10-18
389
+ ===================
390
+
391
+ ## What's Changed
392
+ * fix: attribute.uncast([]) and realm.connect with synchronized models by @cyjake in https://github.com/cyjake/leoric/pull/201
393
+
394
+
395
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v1.13.1...v1.13.2
396
+
397
+ 1.13.1 / 2021-10-18
398
+ ===================
399
+
400
+ ## What's Changed
401
+ * fix: skip connecting if models are synchronized already by @cyjake in https://github.com/cyjake/leoric/pull/200
402
+
403
+
404
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v1.13.0...v1.13.1
405
+
406
+ 1.13.0 / 2021-10-18
407
+ ===================
408
+
409
+ ## What's Changed
410
+ * docs: monthly updates of 2021.09; support dark mode by @cyjake in https://github.com/cyjake/leoric/pull/196
411
+ * feat: coerce literal values into accurate attribute type by @cyjake in https://github.com/cyjake/leoric/pull/197
412
+ * fix: dispatched result should be in attribute names by @cyjake in https://github.com/cyjake/leoric/pull/198
413
+
414
+
415
+ **Full Changelog**: https://github.com/cyjake/leoric/compare/v1.12.0...v1.13.0
416
+
417
+ 1.12.0 / 2021-10-12
418
+ ===================
419
+
420
+ * feat: support custom fields query and sequelize mode export rawAttributes (#192)
421
+ * refactor: collection format query result (#194)
422
+ * refactor: object condition parsing and expression formatting (#191)
423
+
424
+ 1.11.1 / 2021-09-28
425
+ ===================
426
+
427
+ This version fixes lots of issues regarding logical operator in object conditions.
428
+
429
+ * fix: logical operator with multiple conditions such as (#190)
430
+ * fix: sequelize mode support HAVING, and select fields raw sql support (#187)
431
+ * fix: support len validator (#188)
432
+ * fix: normalize logical operator conditions before formatting with spellbook (#186)
433
+
434
+ 1.11.0 / 2021-09-24
435
+ ===================
436
+
437
+ * feat: support BINARY(length), VARBINARY(length), and BLOB (#169)
438
+ * fix: logic operate should adapt one argument (#183)
439
+ * fix: Bone.load() should be idempotent, make sure associations is intact (#184)
440
+ * fix: selected instance isNewRecord is false (#182)
441
+ * fix: set options.busyTimeout to mitigate SQLITE_BUSY (#176)
442
+ * fix: turn on long stack trace of sqlite driver (#175)
443
+ * docs: how to contribute (#180)
444
+
445
+ 1.10.0 / 2021-09-14
446
+ ===================
447
+
448
+ * feat: SQLite driver should emit "connection" event when new connection is created (#168)
449
+ * fix: bulkCreate(...records) should recognize custom setters (#168)
450
+ * fix: attribute.equals() check should ignore defaultValue (#172)
451
+
452
+ 1.9.0 / 2021-09-04
453
+ ==================
454
+
455
+ > should've been a major release but since existing users have all migrated to the new api...
456
+
457
+ * breaking: drop the deprecated `Model.describe()` (#167)
458
+
459
+ 1.8.0 / 2021-08-30
460
+ ==================
461
+
462
+ * feat: silent option fix #164 (#165)
463
+ * feat: binary type (#166)
464
+
465
+ 1.7.1 / 2021-08-17
466
+ ==================
467
+
468
+ * revert: drop Driver#recycleConnections due to poor interoperability (#162)
469
+ * fix: validator call array arguments (#160)
470
+
471
+ 1.7.0 / 2021-08-17
472
+ =================
473
+
474
+ * feat: close connections that exceeds opts.idleTimeout (#159)
475
+ * feat: `opts.connectionLimit` support for SQLite (#159)
476
+ * feat: raw query relpacements, closes #149 (#155)
477
+ * fix: upsert created_at default (#154)
478
+ * test: validator unit test (#157)
479
+ * test: setup_hooks unit test (#158)
480
+
481
+ 1.6.7 / 2021-08-05
482
+ ==================
483
+
484
+ * fix: prevent from calling Date.prototype.toJSON (#153)
485
+
486
+ 1.6.6 / 2021-07-22
487
+ ==================
488
+
489
+ * fix: subclassing data type in dialects (#145)
490
+ * fix: where('width / height >= 16 / 9') (#144)
491
+ * docs: logging and sequelzie adapter (zh) (#142)
492
+ * test: include test/unit/utils (#143)
493
+ * test: more tests cases about sequelize adapter (#141)
494
+
495
+ 1.6.5 / 2021-07-16
496
+ ==================
497
+
498
+ * fix: define assign Bone.models #140
499
+
500
+ 1.6.4 / 2021-07-16
501
+ ==================
502
+
503
+ * refactor: connect({ Bone }) still necessary (#139)
504
+ * fix: formatting select join with subqueries should not tamper the subquery itself (#138)
505
+ * fix: describe table with more compatible syntax (#137)
506
+
507
+ 1.6.3 / 2021-07-14
508
+ ==================
509
+
510
+ * fix: transaction option passing in sequelize adapter (#136)
511
+ * fix: this.Model and proper Model.describe() (#135)
512
+
513
+ 1.6.2 / 2021-07-09
514
+ ==================
515
+
516
+ * fix: convert datetime in seconds/milliseconds back to Date (#134)
517
+ * fix: renamed attribute should remain enumerable (#133)
518
+
519
+ 1.6.1 / 2021-07-07
520
+ ==================
521
+
522
+ * fix: collection convert should handle tddl results as well (#132)
523
+
524
+ 1.6.0 / 2021-07-06
525
+ ==================
526
+
527
+ * feat: support class static attributes and hooks (#131)
528
+ * fix: names defined in Bone.attributes should always be enumerable (#128)
529
+ * chore: add quality badge to readme (#129)
530
+
531
+ 1.5.2 / 2021-07-02
532
+ ==================
533
+
534
+ * fix: leave the getter properties defined in class syntax as is (#127)
535
+
536
+ 1.5.1 / 2021-06-30
537
+ ==================
538
+
539
+ * fix: export Logger and Spell to let users intercept lower level api calls (#126)
540
+
541
+ 1.5.0 / 2021-06-30
542
+ ==================
543
+
544
+ * feat: provide Bone.pool to be backward compatible with v0.x (#124)
545
+ * feat: complete bone/spine.restore and Bone API type definitions (#125)
546
+ * feat: support more data types (mediumtext, mediumint, char, date...) (#123)
547
+
548
+ 1.4.1 / 2021-06-25
549
+ ==================
550
+
551
+ * refactor: simplify legacy timestamps support (#120)
552
+ * refactor: do not subclass Bone unless asked specifically (#120)
553
+
554
+ 1.4.0 / 2021-06-24
555
+ ==================
556
+
557
+ * feat: `realm.raw('SELECT ...')` and `Model.raw('SELECT ...')` (#94)
558
+ * feat: support multiple order rules in one single string or one-dimensional array (#92)
559
+ * feat: `Model.truncate()` now uses TRUNCATE if possible
560
+ * feat: `Model.find().optimizerHints('SET_VAR(foreign_key_checks=OFF)')`
561
+ * fix: Bone.bulkCreate() should not throw when called with non attribute (#117)
562
+ * fix: batch upsert (#108)
563
+ * fix: make sure connection is passed around in all queries carried out within transaction (#105)
564
+ * fix: update, sequelize mode get API, destroy compitable (#104)
565
+ * fix: `setDataValue` in sequelize adapter should not check prop name strictly
566
+ * refactor: spell_insert (#118)
567
+ * docs: about egg-orm & migrations (#119)
568
+ * docs: revise instructions for installing Jekyll (#111)
569
+ * docs: migrations, validations, hooks, and sequelize adapter (#103)
570
+ * docs: contributing guides
571
+
572
+ 1.3.0 / 2021-03-01
573
+ ==================
574
+
575
+ * feat: hook support
576
+ * feat: dirty check (`changes()` & `previousChanges()`)
577
+ * feat: compatible with mysql longtext conversion
578
+ * feat: NOT condition
579
+
580
+ 1.2.0 / 2020-12-10
581
+ ==================
582
+
583
+ * feat: `Realm.prototype.transaction()` with async function support
584
+ * feat: `Realm.prototype.query()` for raw queries
585
+ * feat: `logger.logQuery(sql, duration, { Model, command })`
586
+ * feat: `logger.logQueryError(sql, err, duration, { Model, command })`
587
+
588
+ 1.1.0 / 2020-11-23
589
+ ==================
590
+
591
+ * feat: JSON and JSONB data types
592
+ * feat: support `stringifyObjects` option for mysql client
593
+ * feat: aggregate functions for sequelize adapter
594
+ * feat: `Spell.prototype.nodeify()`
595
+
596
+ 1.0.3 / 2020-03-16
597
+ ==================
598
+
599
+ * fix: replace `deep-equal` (which is bloated) with `util.isDeepStrictEqual`
600
+
601
+ 1.0.2 / 2020-03-04
602
+ ==================
603
+
604
+ * fix: driver.alterTable() with multiple columns to add in SQLite
605
+
606
+ 1.0.1 / 2020-02-25
607
+ ==================
608
+
609
+ * fix: bulkCreate in sequelize shim
610
+
611
+ 1.0.0 / 2020-02-24
612
+ ==================
613
+
614
+ First major release. Let's get serious with semver.
615
+
616
+ * feat: logger.logQuery(sql, duration) & logger.logQueryError(sql, err)
617
+
618
+ 0.5.3 / 2020-02-22
619
+ ==================
620
+
621
+ * fix: `connect({ sequelize, dialect, client })` to allow mandatory sqlite client
622
+ * fix: prevent queries being performed unless model is correctly connected
623
+
624
+ 0.5.2 / 2020-02-21
625
+ ==================
626
+
627
+ * fix: drop the default and unused `require('sqlite3')`
628
+
629
+ 0.5.1 / 2020-02-21
630
+ ==================
631
+
632
+ * fix: `connect({ client: '@journeyapps/sqlcipher' })`
633
+
634
+ 0.5.0 / 2020-02-19
635
+ ==================
636
+
637
+ * feat: `Bone.sync()` to synchronize model with database
638
+ * feat: `Bone.createMigrationFile()` to create migration file
639
+ * feat: `Bone.migrate()` to run migrations
640
+ * feat: `Bone.bulkCreate()` to bulk insert records
641
+ * feat: `require('leoric')` now exports `Realm` to connect with multiple databases
642
+ * feat: `realm.define()` to define models in an old fashioned way
643
+ * feat: `realm.connect()` to connect with database
644
+ * feat: SQLite support without hacking node-sqlite3
645
+ * feat: `Bone.DataTypes` for type references
646
+ * feat: `Bone.init()` to initialize models
647
+ * feat: an adaptor to use Leoric in (partially) Sequelize complaint API
648
+ * refactor: a complete re-write of JOIN queries
649
+ * refactor: added `Bone.driver` to better encapsulate and planish database nuances
650
+
651
+ 0.4.5 / 2019-12-14
652
+ ==================
653
+
654
+ * fix: prevent primary key from being overridden with incorrect `LAST_INSERT_ID()`
655
+
656
+ 0.4.4 / 2019-07-15
657
+ ==================
658
+
659
+ * fix: append default scope when declaring relations, fixes #10
660
+
661
+ 0.4.3 / 2019-05-09
662
+ ==================
663
+
664
+ * fix: prevent Bone.dispatch from creating duplicated records of main table
665
+
666
+ 0.4.2 / 2019-04-26
667
+ ==================
668
+
669
+ * feat: `Spell#orWhere()` and `Spell#orHaving()`
670
+ * feat: arithmetic operators
671
+ * feat: unary operators such as unary minus `-` and bit invertion `~`
672
+ * fix: unset attribute should be overwritable
673
+ * fix: `attributeChanged()` should be false if attribute is unset and not overwritten
674
+ * fix: subclass with incomplete getter/setter should be complemented
675
+ * fix: sharding key validation on `Bone.update()` and `Bone.save()`
676
+ * fix: sharding key should be along with primary key on `bone.remove()`
677
+ * fix: `Bone.cast()` should leave `null` as is
678
+ * fix: `INSERT ... UPDATE` with `id = LAST_INSERT_ID(id)` in MySQL
679
+ * fix: `Model.find({ name: { $op1, $op2 } })` object conditions with multiple operators
680
+ * fix: prefixing result set with qualifiers if query contains join relations and is not dispatchable
681
+ * fix: `Spell#$get(index)` with LIMIT
682
+ * doc: `Model.transaction()`
683
+ * doc: definition types with `index.d.ts`
684
+
685
+ 0.4.1 / 2019-03-21
686
+ ==================
687
+
688
+ * feat: premature sharding key validation
689
+ * fix: output complete SQL instead of parameterized query with values.
690
+ * fix: both `connect({ model })` and `connect({ models })` are allowed.
691
+ * doc: no more `.findOrCreate()`, just `.upsert()`
692
+ * doc: table of contents with kramdown's `{:toc}`
693
+ * chore: droped experimental sqlite3 support
694
+
695
+ 0.4.0 / 2018-11-05
696
+ ==================
697
+
698
+ * feat: PostgreSQL support
699
+ * feat: Transaction support
700
+ * upgrade: (forked) SQLite client updated to SQLite 3.24
701
+
702
+
703
+ 0.3.0 / 2018-10-31
704
+ ==================
705
+
706
+ * feat: SQLite support with a [forked sqlite3](https://github.com/cyjake/node-sqlite3)
707
+ * feat: mysql2 support (which is trivial since both mysql and mysql2 share the same API)
708
+ * refactor: Spell now formats SQL with the literals separated, which gets escaped by the corresponding client itself later on.
709
+
710
+ 0.2.0 / 2018-01-03
711
+ ==================
712
+
713
+ * breaking: renaming
714
+
715
+ 0.1.8 / 2017-12-31
716
+ ==================
717
+
718
+ * fix: implement `query.batch()` as async iterator
719
+ * fix: `NOT (expr)`
720
+ * fix: `IFNULL(foo, default)`
721
+ * fix: support `.select(name[])`, `.select(name => {})`, and `.select("...name")`
722
+ * doc: `Model => className` in association options
723
+ * doc: use [jsdoc](http://usejsdoc.org) to generate docs/api
724
+ * doc: `.include()`
725
+
726
+ 0.1.7 / 2017-12-22
727
+ ==================
728
+
729
+ * refactor: `{ type: 'op', name: 'as' }` renamed to `{ type: 'alias' }`
730
+ * feat: `{ type: 'mod' }` for modifier, currently only `DISTINCT` is recognized
731
+ * feat: unary operators like `!` and `NOT`
732
+ * feat: `IS` and `IS NOT`
733
+ * fix: logic operator precendences
734
+ * fix: polymorphic hasMany({ through }) relations
735
+ * fix: dispatching multiple results with joins correctly
736
+
737
+ 0.1.6 / 2017-12-21
738
+ ==================
739
+
740
+ * feat: proper `.first`, `.last`, `.all`, and `.get(index)`
741
+ * fix: accept `Date`, `boolean`, and `Set` values
742
+ * fix: `Model.unscoped`
743
+ * fix: `Model.remove({}, true)` should be unscoped
744
+
745
+ 0.1.5 / 2017-12-20
746
+ ==================
747
+
748
+ * refactor: encapsulate column names. Keep them from the users even if the query results can not be dispatched.
749
+ * fix: complicated groups with joins should discard the use of subquery.
750
+ * fix: camelCase should replace globally
751
+ * fix: avoid missing attribtue exception when toJSON/toObject
752
+
753
+ 0.1.4 / 2017-12-18
754
+ ==================
755
+
756
+ * fix: should format condition arrays by hand instead of hand it over to formatExpr
757
+ * fix: whereConditions of subquery should retain the order of the whereConditions in major query
758
+ * fix: calculated columns should be kept in the final columns when sorting out the attributes
759
+ * fix: doesn't depend on co anymore
760
+
761
+ 0.1.3 / 2017-12-17
762
+ ==================
763
+
764
+ * fix: `select distict foo from table`;
765
+ * fix: `where (a = 1 or a = 2) and b = 3`;
766
+ * doc: a syntax table to provide a better glance over the querying ability.
767
+
768
+ 0.1.2 / 2017-12-14
769
+ ==================
770
+
771
+ * fix: copy left table's orders into subquery to make order/limit work when combined.
772
+ * fix: errors should be thrown when accessing attributes that weren't selected at the first place.
773
+
774
+ 0.1.1 / 2017-12-13
775
+ ==================
776
+
777
+ * refactor: automatic versioning on spells. When client calls query methods with chaining, new versions of spell gets duplicated. Makes reuse of spells possible.
778
+ * doc: english verion is almost complete <http://cyj.me/leoric>.
779
+
780
+ 0.1.0 / 2017-12-09
781
+ ==================
782
+
783
+ * Initial version, covers basic usage such as model authoring, database connection, query interface, and association.