dobo 2.33.0 → 2.34.0
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/lib/factory/model/sanitize-record.js +9 -4
- package/package.json +1 -1
- package/wiki/CHANGES.md +196 -192
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
* @param {boolean} [opts.forceNoHidden=false] - If `true`, force ALL fields to be picked, thus ignoring hidden fields. If an array, force all fields except those in the array to be picked.
|
|
11
11
|
* @param {boolean} [opts.fmt=false] - If `true`, add a `_fmt` property to the sanitized record with formatted values automatically based on the model's properties and rules
|
|
12
12
|
* @param {Object} [opts.req] - Request object, used for formatting values based on request context
|
|
13
|
+
* @param {Object} [opts.i18n] - Internationalization options, used for formatting values based on i18n context
|
|
14
|
+
* @param {string} [opts.i18n.lang] - Language code for formatting values
|
|
15
|
+
* @param {string} [opts.i18n.dateStyle] - Date style for formatting date values
|
|
16
|
+
* @param {string} [opts.i18n.timeStyle] - Time style for formatting time values
|
|
17
|
+
* @param {string} [opts.i18n.timeZone] - Time zone for formatting date/time values
|
|
13
18
|
* @returns {Object} Returns sanitized record object
|
|
14
19
|
*/
|
|
15
20
|
async function sanitizeRecord (record = {}, opts = {}) {
|
|
@@ -51,11 +56,11 @@ async function sanitizeRecord (record = {}, opts = {}) {
|
|
|
51
56
|
else if (isString(prop.format)) newRecord._fmt[key] = await callHandler(this.plugin, this, value, newRecord, opts)
|
|
52
57
|
else {
|
|
53
58
|
const options = {
|
|
54
|
-
lang: get(opts, 'req.lang'),
|
|
59
|
+
lang: get(opts, 'i18n.lang', get(opts, 'req.lang')),
|
|
55
60
|
datetime: {
|
|
56
|
-
dateStyle: get(opts, 'req.site.setting.sumba.dateStyle'),
|
|
57
|
-
timeStyle: get(opts, 'req.site.setting.sumba.timeStyle'),
|
|
58
|
-
timeZone: get(opts, 'req.site.setting.sumba.timeZone')
|
|
61
|
+
dateStyle: get(opts, 'i18n.dateStyle', get(opts, 'req.site.setting.sumba.dateStyle')),
|
|
62
|
+
timeStyle: get(opts, 'i18n.timeStyle', get(opts, 'req.site.setting.sumba.timeStyle')),
|
|
63
|
+
timeZone: get(opts, 'i18n.timeZone', get(opts, 'req.site.setting.sumba.timeZone'))
|
|
59
64
|
},
|
|
60
65
|
latitude: ['lat', 'latitude'].includes(key),
|
|
61
66
|
longitude: ['lon', 'lng', 'longitude'].includes(key)
|
package/package.json
CHANGED
package/wiki/CHANGES.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-07-26
|
|
4
|
+
|
|
5
|
+
- [2.34.0] Add `options.i18n` to `model.sanitizeRecord()`
|
|
6
|
+
|
|
3
7
|
## 2026-07-24
|
|
4
8
|
|
|
5
9
|
- [2.33.0] Change `selfBind` to `bindThis`
|
|
@@ -12,286 +16,286 @@
|
|
|
12
16
|
|
|
13
17
|
## 2026-06-29
|
|
14
18
|
|
|
15
|
-
- [2.31.0] Add
|
|
19
|
+
- [2.31.0] Add `dobo.driver:{before|after}Any`
|
|
16
20
|
|
|
17
21
|
## 2026-06-24
|
|
18
22
|
|
|
19
|
-
- [2.30.5] Bug fix in
|
|
20
|
-
- [2.30.5] Bug fix in
|
|
21
|
-
- [2.30.6] Bug fix in
|
|
22
|
-
- [2.30.7] Bug fix in
|
|
23
|
-
- [2.30.7] Bug fix in
|
|
24
|
-
- [2.30.7] Bug fix in
|
|
23
|
+
- [2.30.5] Bug fix in `model.sanitizeBody()`
|
|
24
|
+
- [2.30.5] Bug fix in `model.sanitizeRecord()`
|
|
25
|
+
- [2.30.6] Bug fix in `driver.sanitizeRecord()`
|
|
26
|
+
- [2.30.7] Bug fix in `util.getRefs()`
|
|
27
|
+
- [2.30.7] Bug fix in `model.sanitizeBody()`
|
|
28
|
+
- [2.30.7] Bug fix in `model.sanitizeRecord()`
|
|
25
29
|
|
|
26
30
|
## 2026-06-16
|
|
27
31
|
|
|
28
|
-
- [2.30.4] Bug fix in
|
|
29
|
-
- [2.30.4] Bug fix in
|
|
32
|
+
- [2.30.4] Bug fix in `model.sanitizeBody()`
|
|
33
|
+
- [2.30.4] Bug fix in `model._prepBodyForCreate()`
|
|
30
34
|
|
|
31
35
|
## 2026-06-13
|
|
32
36
|
|
|
33
|
-
- [2.30.2] Bug fix in
|
|
34
|
-
- [2.30.2] Bug fix in
|
|
35
|
-
- [2.30.2] Bug fix in
|
|
36
|
-
- [2.30.3] Bug fix in
|
|
37
|
+
- [2.30.2] Bug fix in `model.findAllRecord()`
|
|
38
|
+
- [2.30.2] Bug fix in `memory.findAllRecord()`
|
|
39
|
+
- [2.30.2] Bug fix in `collect-models.js`
|
|
40
|
+
- [2.30.3] Bug fix in `memory.findRecord()`
|
|
37
41
|
|
|
38
42
|
## 2026-06-12
|
|
39
43
|
|
|
40
|
-
- [2.30.0] Necessary updates to
|
|
41
|
-
- [2.30.0] Add
|
|
42
|
-
- [2.30.0] Add
|
|
43
|
-
- [2.30.0] Refactor
|
|
44
|
-
- [2.30.1] Bug fix in
|
|
44
|
+
- [2.30.0] Necessary updates to `bajo@2.18.0` specs
|
|
45
|
+
- [2.30.0] Add `sanitizeByType()`
|
|
46
|
+
- [2.30.0] Add `error._abortAction` to abort an action in driver level
|
|
47
|
+
- [2.30.0] Refactor `model.sanitizeBody()` to use shared sanitizing function
|
|
48
|
+
- [2.30.1] Bug fix in `model.sanitizeBody()`
|
|
45
49
|
|
|
46
50
|
## 2026-06-11
|
|
47
51
|
|
|
48
|
-
- [2.29.1] Bug fix in
|
|
49
|
-
- [2.29.2] Bug fix in
|
|
52
|
+
- [2.29.1] Bug fix in `model.sanitizeBody()`
|
|
53
|
+
- [2.29.2] Bug fix in `model.sanitizeBody()`
|
|
50
54
|
|
|
51
55
|
## 2026-06-10
|
|
52
56
|
|
|
53
|
-
- [2.29.0] Feature
|
|
54
|
-
- [2.29.0] Add
|
|
55
|
-
- [2.29.0] Options
|
|
56
|
-
- [2.29.0] Add
|
|
57
|
+
- [2.29.0] Feature `dobo:immutable` now using array instead of boolean
|
|
58
|
+
- [2.29.0] Add `model.sanitizeFixture()`
|
|
59
|
+
- [2.29.0] Options `noMagic` no without touching `noModelHook`
|
|
60
|
+
- [2.29.0] Add `array` validator type
|
|
57
61
|
|
|
58
62
|
## 2026-06-03
|
|
59
63
|
|
|
60
|
-
- [2.28.0] Property
|
|
61
|
-
- [2.28.0]
|
|
62
|
-
- [2.28.0] Bug fix in
|
|
63
|
-
- [2.28.0] Bug fix in
|
|
64
|
+
- [2.28.0] Property `values` can now accept a function that will be called dynamically upon used
|
|
65
|
+
- [2.28.0] `_util.buildPropValues()` now become a new model method
|
|
66
|
+
- [2.28.0] Bug fix in `model.sanitizeRecord()`
|
|
67
|
+
- [2.28.0] Bug fix in `model.validate()`
|
|
64
68
|
|
|
65
69
|
## 2026-05-30
|
|
66
70
|
|
|
67
|
-
- [2.27.0] Bug fix in
|
|
68
|
-
- [2.27.0] Add
|
|
69
|
-
- [2.27.0] Bug fix in
|
|
70
|
-
- [2.27.0] Bug fix in
|
|
71
|
-
- [2.27.1] Bug fix in
|
|
72
|
-
- [2.27.2] Bug fix in
|
|
71
|
+
- [2.27.0] Bug fix in `model.transaction()`
|
|
72
|
+
- [2.27.0] Add `model:[before|after]RecordValidation` model hooks
|
|
73
|
+
- [2.27.0] Bug fix in `model.countRecord()`
|
|
74
|
+
- [2.27.0] Bug fix in `model.loadFixtures()`
|
|
75
|
+
- [2.27.1] Bug fix in `model.sanitizeRecord()`
|
|
76
|
+
- [2.27.2] Bug fix in `collect-models.js`
|
|
73
77
|
|
|
74
78
|
## 2026-05-29
|
|
75
79
|
|
|
76
|
-
- [2.26.1] Bug fix in
|
|
77
|
-
- [2.26.1] Bug fix in
|
|
78
|
-
- [2.26.1] Bug fix in
|
|
79
|
-
- [2.26.1] Bug fix in
|
|
80
|
-
- [2.26.4] Bug fix in
|
|
80
|
+
- [2.26.1] Bug fix in `model.createRecord()`
|
|
81
|
+
- [2.26.1] Bug fix in `model.updateRecord()`
|
|
82
|
+
- [2.26.1] Bug fix in `model.upsertRecord()`
|
|
83
|
+
- [2.26.1] Bug fix in `model.removeRecord()`
|
|
84
|
+
- [2.26.4] Bug fix in `model.listAttachment()`
|
|
81
85
|
|
|
82
86
|
## 2026-05-26
|
|
83
87
|
|
|
84
|
-
- [2.26.0] Add loading multiple model schema as in one
|
|
88
|
+
- [2.26.0] Add loading multiple model schema as in one `model.js` file
|
|
85
89
|
- [2.26.0] Remove caching feature of model schema
|
|
86
|
-
- [2.26.0] Change driver hook name with this syntax:
|
|
87
|
-
- [2.26.1] Bug fix in
|
|
88
|
-
- [2.26.2] Bug fix in
|
|
90
|
+
- [2.26.0] Change driver hook name with this syntax: `dobo.driver:<action>`
|
|
91
|
+
- [2.26.1] Bug fix in `memory.js`
|
|
92
|
+
- [2.26.2] Bug fix in `driver.js`
|
|
89
93
|
|
|
90
94
|
## 2026-05-22
|
|
91
95
|
|
|
92
|
-
- [2.25.0] Add
|
|
93
|
-
- [2.25.0] Change
|
|
94
|
-
- [2.25.0] Add
|
|
95
|
-
- [2.25.0] Bug fix in
|
|
96
|
-
- [2.25.0] Handle
|
|
96
|
+
- [2.25.0] Add `array` & `object` validator handling
|
|
97
|
+
- [2.25.0] Change `interSite` definition to `xSite`
|
|
98
|
+
- [2.25.0] Add `model.getNonVirtualProperties()`
|
|
99
|
+
- [2.25.0] Bug fix in `model.loadFixtures()`
|
|
100
|
+
- [2.25.0] Handle `array` validation schema
|
|
97
101
|
|
|
98
102
|
## 2026-05-16
|
|
99
103
|
|
|
100
|
-
- [2.24.0] Change
|
|
101
|
-
- [2.24.0] Add
|
|
102
|
-
- [2.24.0] Add
|
|
103
|
-
- [2.24.0] Change
|
|
104
|
-
- [2.24.0] Remove
|
|
105
|
-
- [2.24.0] Change
|
|
106
|
-
- [2.24.0] Bugfix in
|
|
107
|
-
- [2.24.0] Add
|
|
108
|
-
- [2.24.0] Add
|
|
104
|
+
- [2.24.0] Change `dobo:immutable` feature, field no longer hidden
|
|
105
|
+
- [2.24.0] Add `dobo:[before|after]driver<Action>` hook
|
|
106
|
+
- [2.24.0] Add `dobo.<modelName>:[before|after]driver<Action>` hook
|
|
107
|
+
- [2.24.0] Change `model._simpleLookup()`
|
|
108
|
+
- [2.24.0] Remove `dobo:[before|after]Build[Query|Search]` hook
|
|
109
|
+
- [2.24.0] Change `model.loadFixtures()`
|
|
110
|
+
- [2.24.0] Bugfix in `model.sanitizeBody()`
|
|
111
|
+
- [2.24.0] Add `dobo:afterTransaction` hook
|
|
112
|
+
- [2.24.0] Add `dobo.<modelName>:afterTransaction` hook
|
|
109
113
|
|
|
110
114
|
## 2026-05-11
|
|
111
115
|
|
|
112
|
-
- [2.23.0] Add
|
|
113
|
-
- [2.23.0] Add
|
|
114
|
-
- [2.23.0] Add
|
|
115
|
-
- [2.23.0] Add
|
|
116
|
-
- [2.23.0] Move
|
|
117
|
-
- [2.23.0] Move
|
|
118
|
-
- [2.23.0] Add
|
|
119
|
-
- [2.23.0] Add
|
|
120
|
-
- [2.23.0] Add
|
|
121
|
-
- [2.23.0] Rename method to
|
|
122
|
-
- [2.23.0] Remove
|
|
123
|
-
- [2.23.0] Add reference support for
|
|
124
|
-
- [2.23.0] Bug fix in
|
|
125
|
-
- [2.23.0] Bug fix in
|
|
126
|
-
- [2.23.0] Bug fix in
|
|
116
|
+
- [2.23.0] Add `beforeBulkCreate` model hook on `dobo:unique` feature
|
|
117
|
+
- [2.23.0] Add `beforeBulkCreate` model hook on `dobo:updatedAt` feature
|
|
118
|
+
- [2.23.0] Add `beforeBulkCreate` model hook on `dobo:unique` feature
|
|
119
|
+
- [2.23.0] Add `connection.initdriver()`
|
|
120
|
+
- [2.23.0] Move `model.file` in model definition to `model.options.file`
|
|
121
|
+
- [2.23.0] Move `model.attachment` in model definition to `model.options.attachment`
|
|
122
|
+
- [2.23.0] Add `model.buildStart()` and `model.buildEnd()` in model definition
|
|
123
|
+
- [2.23.0] Add `null` driver
|
|
124
|
+
- [2.23.0] Add `model.syncIdField()`
|
|
125
|
+
- [2.23.0] Rename method to `model.bulkCreateRecord` instead `bulkCreateRecords`. The later name now serve only as alias
|
|
126
|
+
- [2.23.0] Remove `getSingleRef()` and `getMultiRefs()`, use `getRefs()` instead
|
|
127
|
+
- [2.23.0] Add reference support for `array` column type
|
|
128
|
+
- [2.23.0] Bug fix in `model.findAllRecord()`, now use correctly hook names
|
|
129
|
+
- [2.23.0] Bug fix in `model.sanitizeBody()`
|
|
130
|
+
- [2.23.0] Bug fix in `model.sanitizeRecord()`
|
|
127
131
|
|
|
128
132
|
## 2026-05-03
|
|
129
133
|
|
|
130
|
-
- [2.22.1] Bug fix in
|
|
134
|
+
- [2.22.1] Bug fix in `dobo:image` feature
|
|
131
135
|
|
|
132
136
|
## 2026-05-02
|
|
133
137
|
|
|
134
138
|
- [2.22.0] Add auto thumbnail creation when image attachment is uploaded
|
|
135
139
|
- [2.22.0] Add feature to get the thumbnail instead of attachment file in attachment route
|
|
136
|
-
- [2.22.0] Add
|
|
137
|
-
- [2.22.0] Bug fix in
|
|
138
|
-
- [2.22.0] Bug fix in
|
|
139
|
-
- [2.22.0] Bug fix in
|
|
140
|
-
- [2.22.0] Bug fix in
|
|
140
|
+
- [2.22.0] Add `dobo:image` feature
|
|
141
|
+
- [2.22.0] Bug fix in `model.createRecord()`
|
|
142
|
+
- [2.22.0] Bug fix in `model.updateRecord()`
|
|
143
|
+
- [2.22.0] Bug fix in `model.upsertRecord()`
|
|
144
|
+
- [2.22.0] Bug fix in `model.removeRecord()`
|
|
141
145
|
- [2.22.0] Remove attachment now also remove corresponding thumbnails
|
|
142
146
|
|
|
143
147
|
## 2026-04-28
|
|
144
148
|
|
|
145
|
-
- [2.21.1] Bug fix in
|
|
146
|
-
- [2.21.1] Bug fix in
|
|
147
|
-
- [2.21.1] Bug fix in
|
|
149
|
+
- [2.21.1] Bug fix in `collect-models.js`
|
|
150
|
+
- [2.21.1] Bug fix in `driver._updateRecord()`
|
|
151
|
+
- [2.21.1] Bug fix in `util.getMultiRef()`
|
|
148
152
|
- [2.21.1] Bug fix in setting references
|
|
149
|
-
- [2.21.1] Bug fix in
|
|
153
|
+
- [2.21.1] Bug fix in `model.sanitizeRecord()`
|
|
150
154
|
|
|
151
155
|
## 2026-04-25
|
|
152
156
|
|
|
153
|
-
- [2.21.0] Change
|
|
154
|
-
- [2.21.0] Remove
|
|
155
|
-
- [2.21.0] Remove
|
|
156
|
-
- [2.21.0] Remove
|
|
157
|
-
- [2.21.0] Add
|
|
157
|
+
- [2.21.0] Change `options.formatValue` to `options.fmt`
|
|
158
|
+
- [2.21.0] Remove `options.retainOriginalValue` since it is not needed anymore
|
|
159
|
+
- [2.21.0] Remove `formatValue` altogether
|
|
160
|
+
- [2.21.0] Remove `record._orig`, in exchange switch the formatted value to `record._fmt`
|
|
161
|
+
- [2.21.0] Add `property.virtual` to set property is a virtual/calculated property
|
|
158
162
|
- [2.21.0] Add necessary safe guards for virtual property
|
|
159
|
-
- [2.21.0] Add
|
|
160
|
-
- [2.21.0] Add
|
|
161
|
-
- [2.21.0] Add
|
|
162
|
-
- [2.21.0] Activate transaction on
|
|
163
|
+
- [2.21.0] Add `model.getProperties()`
|
|
164
|
+
- [2.21.0] Add `model.getIndexes()`
|
|
165
|
+
- [2.21.0] Add `model.getVirtualPropertties()`
|
|
166
|
+
- [2.21.0] Activate transaction on `loadFixtures()`
|
|
163
167
|
|
|
164
168
|
## 2026-04-23
|
|
165
169
|
|
|
166
|
-
- [2.20.1] Bug fix in
|
|
170
|
+
- [2.20.1] Bug fix in `collect-models.js`, now with deep merge in advance
|
|
167
171
|
|
|
168
172
|
## 2026-04-21
|
|
169
173
|
|
|
170
|
-
- [2.19.1] Bug fix in
|
|
171
|
-
- [2.19.1] Bug fix in
|
|
172
|
-
- [2.19.1] Add
|
|
174
|
+
- [2.19.1] Bug fix in `collect-models.js`, now values are sanitized with `parseObject()`
|
|
175
|
+
- [2.19.1] Bug fix in `options.dataOnly` on all model methods
|
|
176
|
+
- [2.19.1] Add `options.noMagic`
|
|
173
177
|
- [2.20.0] Revert back to NOT using hooks for caching
|
|
174
178
|
|
|
175
179
|
## 2026-04-19
|
|
176
180
|
|
|
177
|
-
- [2.19.0] Add
|
|
178
|
-
- [2.19.0] Bug fix in
|
|
181
|
+
- [2.19.0] Add `queryAny()` for query using model's scanables fields
|
|
182
|
+
- [2.19.0] Bug fix in `reviveRegexInJson()`
|
|
179
183
|
- [2.19.0] Bug fix in query sanitizing especially for regex existance
|
|
180
|
-
- [2.19.0] Remove
|
|
184
|
+
- [2.19.0] Remove `replaceIdInQuerySearch()` in `_util.js` as it isn't needed anymore
|
|
181
185
|
|
|
182
186
|
## 2026-04-18
|
|
183
187
|
|
|
184
|
-
- [2.18.2] Bug fix in
|
|
185
|
-
- [2.18.2] Bug fix in
|
|
186
|
-
- [2.18.2] Bug fix in
|
|
187
|
-
- [2.18.2] Bug fix in
|
|
188
|
+
- [2.18.2] Bug fix in `config` object
|
|
189
|
+
- [2.18.2] Bug fix in `getDefaultValues`
|
|
190
|
+
- [2.18.2] Bug fix in `sanitizeProp()` in `collect-models.js`
|
|
191
|
+
- [2.18.2] Bug fix in `sanitizeRecord()` for prop with `format` set to `false`
|
|
188
192
|
|
|
189
193
|
## 2026-04-17
|
|
190
194
|
|
|
191
|
-
- [2.18.1] Bug fix in
|
|
192
|
-
- [2.18.1] Bug fix in
|
|
193
|
-
- [2.18.1] Bug fix in
|
|
195
|
+
- [2.18.1] Bug fix in `model.createAttachment()`
|
|
196
|
+
- [2.18.1] Bug fix in `model.sanitizeBody()`
|
|
197
|
+
- [2.18.1] Bug fix in `model.sanitizeRecord()`
|
|
194
198
|
|
|
195
199
|
## 2026-04-16
|
|
196
200
|
|
|
197
|
-
- [2.18.0] Add parameter options to
|
|
198
|
-
- [2.18.0] Rewrite
|
|
199
|
-
- [2.18.0] Bug fix in
|
|
200
|
-
- [2.18.0] Changes in
|
|
201
|
-
- [2.18.0] Changes in
|
|
202
|
-
- [2.18.0] Bug fix in
|
|
203
|
-
- [2.18.0] Bug fix in
|
|
201
|
+
- [2.18.0] Add parameter options to `sanitizeObject()`
|
|
202
|
+
- [2.18.0] Rewrite `dobo:dt` feature to support customization
|
|
203
|
+
- [2.18.0] Bug fix in `model.createRecord()`
|
|
204
|
+
- [2.18.0] Changes in `model.sanitizeBody()` to throw error with payload details
|
|
205
|
+
- [2.18.0] Changes in `model.sanitizeRecord()` to support `options.retainOriginalValue`
|
|
206
|
+
- [2.18.0] Bug fix in `model.updateRecord()`
|
|
207
|
+
- [2.18.0] Bug fix in `model.upsertRecord()`
|
|
204
208
|
|
|
205
209
|
## 2026-04-13
|
|
206
210
|
|
|
207
|
-
- [2.17.0] Add
|
|
211
|
+
- [2.17.0] Add `{ strict }` as parameter to `sanitizeObject()`
|
|
208
212
|
|
|
209
213
|
## 2026-04-11
|
|
210
214
|
|
|
211
|
-
- [2.16.0] Add
|
|
212
|
-
- [2.16.0] Rewrite
|
|
213
|
-
- [2.16.0] All inter site admins are now exempts from
|
|
214
|
-
- [2.16.0] Bug fix in
|
|
215
|
-
- [2.16.0] Bug fix in
|
|
216
|
-
- [2.16.0] Add feature to return formatted row(s) with
|
|
217
|
-
- [2.16.0] If row is formatted, add feature to save original row in
|
|
215
|
+
- [2.16.0] Add `format` as new model's property key
|
|
216
|
+
- [2.16.0] Rewrite `getDefaultValues()` to base on `req.getSetting()`
|
|
217
|
+
- [2.16.0] All inter site admins are now exempts from `immutable` row
|
|
218
|
+
- [2.16.0] Bug fix in `collect-models.js`
|
|
219
|
+
- [2.16.0] Bug fix in `getRefs()` and `getRefs()`
|
|
220
|
+
- [2.16.0] Add feature to return formatted row(s) with `options.formatValue`
|
|
221
|
+
- [2.16.0] If row is formatted, add feature to save original row in `_orig` with `options.retainOriginalValue`
|
|
218
222
|
|
|
219
223
|
## 2026-04-07
|
|
220
224
|
|
|
221
|
-
- [2.15.0] Add
|
|
222
|
-
- [2.15.0] Add
|
|
223
|
-
- [2.15.0] Add
|
|
224
|
-
- [2.15.0] Add
|
|
225
|
-
- [2.15.0] Change all
|
|
226
|
-
- [2.15.0] Add
|
|
227
|
-
- [2.15.0] Add
|
|
228
|
-
- [2.15.0] Add
|
|
229
|
-
- [2.15.0] change
|
|
225
|
+
- [2.15.0] Add `parseNql()`
|
|
226
|
+
- [2.15.0] Add `parseQuery()`
|
|
227
|
+
- [2.15.0] Add `replaceRegexInJson()`
|
|
228
|
+
- [2.15.0] Add `reviveRegexInJson()`
|
|
229
|
+
- [2.15.0] Change all `opts.fieldName` to `opts.field` in features
|
|
230
|
+
- [2.15.0] Add `ref.searchField` in model reference
|
|
231
|
+
- [2.15.0] Add `ref.labelField` in model reference
|
|
232
|
+
- [2.15.0] Add `ref.valueField` in model reference
|
|
233
|
+
- [2.15.0] change `ref.propName` to `ref.field` in model reference
|
|
230
234
|
|
|
231
235
|
## 2026-04-02
|
|
232
236
|
|
|
233
|
-
- [2.14.1] Bug fix in
|
|
234
|
-
- [2.14.1]
|
|
237
|
+
- [2.14.1] Bug fix in `hardCap`
|
|
238
|
+
- [2.14.1] `warnings` now can be turned off through `config` or site settings
|
|
235
239
|
|
|
236
240
|
## 2026-04-01
|
|
237
241
|
|
|
238
|
-
- [2.14.0] Add
|
|
242
|
+
- [2.14.0] Add `between` as custom query, since it doesn't exists in NQL
|
|
239
243
|
|
|
240
244
|
## 2026-03-30
|
|
241
245
|
|
|
242
|
-
- [2.12.0] Add
|
|
243
|
-
- [2.12.0] Bug fix in
|
|
246
|
+
- [2.12.0] Add `.bootorder` level 10
|
|
247
|
+
- [2.12.0] Bug fix in `model._simpleLookup()`
|
|
244
248
|
- [2.12.0] Add model name in validation error's payload
|
|
245
|
-
- [2.13.0] Add
|
|
249
|
+
- [2.13.0] Add `hardCap` support
|
|
246
250
|
|
|
247
251
|
## 2026-03-26
|
|
248
252
|
|
|
249
|
-
- [2.11.4] Exceptions thrown in
|
|
253
|
+
- [2.11.4] Exceptions thrown in `getRefs()` && `getRefs()` will be catched and are ignored
|
|
250
254
|
|
|
251
255
|
## 2026-03-25
|
|
252
256
|
|
|
253
257
|
- [2.11.2] Bug fix in result sets cache
|
|
254
|
-
- [2.11.3] Bug fix in cache handling if
|
|
258
|
+
- [2.11.3] Bug fix in cache handling if `bajoCache` isn't loaded
|
|
255
259
|
|
|
256
260
|
## 2026-03-17
|
|
257
261
|
|
|
258
|
-
- [2.11.1] Bug fix on
|
|
262
|
+
- [2.11.1] Bug fix on `model.validate()`: if `partial` is true, set `fields` from `body` keys
|
|
259
263
|
|
|
260
264
|
## 2026-03-16
|
|
261
265
|
|
|
262
|
-
- [2.11.0] Attachment can now listed by its type (
|
|
263
|
-
- [2.11.0] Add
|
|
266
|
+
- [2.11.0] Attachment can now listed by its type (`image`, `video`, etc)
|
|
267
|
+
- [2.11.0] Add `_last` to autodetect last item in list in `@id.js`
|
|
264
268
|
|
|
265
269
|
## 2026-03-12
|
|
266
270
|
|
|
267
|
-
- [2.10.1] Bug fix in
|
|
271
|
+
- [2.10.1] Bug fix in `model._simpleLookup()` should return `null` if query results empty value
|
|
268
272
|
|
|
269
273
|
## 2026-03-11
|
|
270
274
|
|
|
271
|
-
- [2.10.0] Add
|
|
272
|
-
- [2.10.0] Set
|
|
273
|
-
- [2.10.0] Add
|
|
274
|
-
- [2.10.0] Refactor
|
|
275
|
-
- [2.10.0] Add
|
|
275
|
+
- [2.10.0] Add `immutable` and `feature` to the list of allowed property keys
|
|
276
|
+
- [2.10.0] Set `property.feature` to the name of feature name if property is build using `feature`
|
|
277
|
+
- [2.10.0] Add `model._simpleLookup()`
|
|
278
|
+
- [2.10.0] Refactor `model.loadFixtures()`
|
|
279
|
+
- [2.10.0] Add `property.immutable` for property that can't be updated
|
|
276
280
|
|
|
277
281
|
## 2026-03-09
|
|
278
282
|
|
|
279
|
-
- [2.9.3] Bug fix in
|
|
283
|
+
- [2.9.3] Bug fix in `model.findAllRecord`
|
|
280
284
|
|
|
281
285
|
## 2026-03-07
|
|
282
286
|
|
|
283
|
-
- [2.9.2] Bug fix in
|
|
284
|
-
- [2.9.2] Bug fix in
|
|
287
|
+
- [2.9.2] Bug fix in `model.loadFixtures()`
|
|
288
|
+
- [2.9.2] Bug fix in `collect-connections.js`
|
|
285
289
|
|
|
286
290
|
## 2026-03-06
|
|
287
291
|
|
|
288
|
-
- [2.9.1] Bug fix in
|
|
292
|
+
- [2.9.1] Bug fix in `model.sanitizeBody()`
|
|
289
293
|
|
|
290
294
|
## 2026-03-05
|
|
291
295
|
|
|
292
|
-
- [2.9.0] Add transaction support with
|
|
293
|
-
- [2.9.0] Add property
|
|
294
|
-
- [2.9.0] Add property
|
|
296
|
+
- [2.9.0] Add transaction support with `model.transaction()` wrapper
|
|
297
|
+
- [2.9.0] Add property `driver.support.transaction` to indicate a driver is fully support transaction or not
|
|
298
|
+
- [2.9.0] Add property `connection.options.connName`
|
|
295
299
|
|
|
296
300
|
## 2026-02-25
|
|
297
301
|
|
|
@@ -299,24 +303,24 @@
|
|
|
299
303
|
|
|
300
304
|
## 2026-02-24
|
|
301
305
|
|
|
302
|
-
- [2.8.2] Bug fix in field type
|
|
303
|
-
- [2.8.2] Bug fix in
|
|
306
|
+
- [2.8.2] Bug fix in field type `textType`
|
|
307
|
+
- [2.8.2] Bug fix in `collect-models.js` when empty model is returned
|
|
304
308
|
|
|
305
309
|
## 2026-02-23
|
|
306
310
|
|
|
307
|
-
- [2.8.1] Bug fix in
|
|
308
|
-
- [2.8.1] Bug fix in
|
|
311
|
+
- [2.8.1] Bug fix in `memory._getCursor()`
|
|
312
|
+
- [2.8.1] Bug fix in `model.upsertRecord()`
|
|
309
313
|
|
|
310
314
|
## 2026-02-22
|
|
311
315
|
|
|
312
|
-
- [2.8.0] Add
|
|
313
|
-
- [2.8.0] Throw error if
|
|
316
|
+
- [2.8.0] Add `warnings` to response object
|
|
317
|
+
- [2.8.0] Throw error if `page` above the allowed threshold
|
|
314
318
|
|
|
315
319
|
## 2026-02-20
|
|
316
320
|
|
|
317
|
-
- [2.7.0] Add
|
|
318
|
-
- [2.7.0] Add
|
|
319
|
-
- [2.7.0] Change
|
|
321
|
+
- [2.7.0] Add `prop.values` support
|
|
322
|
+
- [2.7.0] Add `prop.rulesMsg` support
|
|
323
|
+
- [2.7.0] Change `buildFromDbModel()` on validation to async function
|
|
320
324
|
|
|
321
325
|
## 2026-02-17
|
|
322
326
|
|
|
@@ -326,11 +330,11 @@
|
|
|
326
330
|
|
|
327
331
|
## 2026-02-05
|
|
328
332
|
|
|
329
|
-
- [2.6.4] Bug fix in driver options,
|
|
333
|
+
- [2.6.4] Bug fix in driver options, `noCheckUnique` must be perform in `create`, `update` and `upsert`
|
|
330
334
|
|
|
331
335
|
## 2026-02-03
|
|
332
336
|
|
|
333
|
-
- [2.6.3] Bug fix in
|
|
337
|
+
- [2.6.3] Bug fix in `model.sanitizeRecord()`
|
|
334
338
|
|
|
335
339
|
## 2026-02-02
|
|
336
340
|
|
|
@@ -338,24 +342,24 @@
|
|
|
338
342
|
|
|
339
343
|
## 2026-02-01
|
|
340
344
|
|
|
341
|
-
- [2.6.0] Add
|
|
342
|
-
- [2.6.0] Add
|
|
343
|
-
- [2.6.0] Add model hooks
|
|
345
|
+
- [2.6.0] Add `model.scanables` for fields that can participate in table scans if necessary
|
|
346
|
+
- [2.6.0] Add `driver.support.search` for driver's fulltext search support
|
|
347
|
+
- [2.6.0] Add model hooks `before/afterBuildQuery/Search`
|
|
344
348
|
|
|
345
349
|
## 2026-01-30
|
|
346
350
|
|
|
347
|
-
- [2.5.0] Add feature to push custom
|
|
348
|
-
- [2.5.0] Remove
|
|
349
|
-
- [2.5.1] driver now support
|
|
350
|
-
- [2.5.1] Bug fix in
|
|
351
|
+
- [2.5.0] Add feature to push custom `options._data`. If provided, this will be used instead of auto generated one.
|
|
352
|
+
- [2.5.0] Remove `silent` in `options` object
|
|
353
|
+
- [2.5.1] driver now support `this.useUtc` for database that store values in UTC string
|
|
354
|
+
- [2.5.1] Bug fix in `driver.sanitizeRecord()`
|
|
351
355
|
|
|
352
356
|
## 2026-01-29
|
|
353
357
|
|
|
354
|
-
- [2.4.0] Add
|
|
355
|
-
- [2.4.0] Add
|
|
358
|
+
- [2.4.0] Add `bulkCreateRecord()` on model & driver
|
|
359
|
+
- [2.4.0] Add `execModelHook()`
|
|
356
360
|
- [2.4.0] Bug fix in models collection
|
|
357
|
-
- [2.4.0] Add
|
|
358
|
-
- [2.4.0]
|
|
361
|
+
- [2.4.0] Add `DoboAction` to the `app.baseClass`
|
|
362
|
+
- [2.4.0] `findAllRecord()` can't be called as action
|
|
359
363
|
|
|
360
364
|
## 2026-01-26
|
|
361
365
|
|
|
@@ -364,22 +368,22 @@
|
|
|
364
368
|
|
|
365
369
|
## 2026-01-24
|
|
366
370
|
|
|
367
|
-
- [2.3.0] Add
|
|
368
|
-
- [2.3.0] Add
|
|
369
|
-
- [2.3.0] Add
|
|
371
|
+
- [2.3.0] Add `dynHooks` to model's options
|
|
372
|
+
- [2.3.0] Add `dobo:unique` feature
|
|
373
|
+
- [2.3.0] Add `noWait` handler for model's hook
|
|
370
374
|
|
|
371
375
|
## 2026-01-21
|
|
372
376
|
|
|
373
|
-
- [2.2.5] Add
|
|
377
|
+
- [2.2.5] Add `proto` to `connection.options`
|
|
374
378
|
|
|
375
379
|
## 2026-01-19
|
|
376
380
|
|
|
377
|
-
- [2.2.4] Bug fix in route
|
|
381
|
+
- [2.2.4] Bug fix in route `dobo:/attachment/...`
|
|
378
382
|
|
|
379
383
|
## 2026-01-18
|
|
380
384
|
|
|
381
|
-
- [2.2.2] Revert back to
|
|
382
|
-
- [2.2.3] Bug fix in driver's
|
|
385
|
+
- [2.2.2] Revert back to `mingo@6.5.1` because of bugs in `skip` operation
|
|
386
|
+
- [2.2.3] Bug fix in driver's `sanitizeBody()`
|
|
383
387
|
|
|
384
388
|
## 2026-01-16
|
|
385
389
|
|
|
@@ -388,24 +392,24 @@
|
|
|
388
392
|
## 2026-01-11
|
|
389
393
|
|
|
390
394
|
- [2.2.0] Any driver that support memory DB can now declare itself as in-memory DB and be handled as such
|
|
391
|
-
- [2.2.0]
|
|
395
|
+
- [2.2.0] `driver.init()` is removed, and driver should solely use `driver.createClient()` instead
|
|
392
396
|
- [2.2.0] Bug fixes
|
|
393
397
|
|
|
394
398
|
## 2026-01-07
|
|
395
399
|
|
|
396
|
-
- [2.2.0] Add
|
|
400
|
+
- [2.2.0] Add `immutable` feature
|
|
397
401
|
- [2.2.0] Lots of bug fixes
|
|
398
402
|
|
|
399
403
|
## 2025-12-28
|
|
400
404
|
|
|
401
|
-
- [2.2.0] Add
|
|
402
|
-
- [2.2.0] Implement
|
|
403
|
-
- [2.2.0] If no
|
|
405
|
+
- [2.2.0] Add `calcAggregate()` & `calcHistogram()` for array of data objects
|
|
406
|
+
- [2.2.0] Implement `createAggregate()` & `createHistogram()` to the built-in memory database driver
|
|
407
|
+
- [2.2.0] If no `default` connection found, all models automatically bound to `memory` connection
|
|
404
408
|
|
|
405
409
|
## 2025-12-22
|
|
406
410
|
|
|
407
411
|
- [2.2.0] Introduce Action class that enables you to work on models with chainable methods
|
|
408
|
-
- [2.2.0] All base class definitions moved now to
|
|
412
|
+
- [2.2.0] All base class definitions moved now to `this.baseClass` instead of `this.lib`
|
|
409
413
|
|
|
410
414
|
## 2025-12-16
|
|
411
415
|
|
|
@@ -420,12 +424,12 @@
|
|
|
420
424
|
- [2.2.0] Rewrite the whole thing into class based modules: Connection, driver, Feature, Model. Dobo will solely serve as DB Manager in the future
|
|
421
425
|
|
|
422
426
|
## 2025-12-05
|
|
423
|
-
- [2.2.0] Connection now saved in
|
|
427
|
+
- [2.2.0] Connection now saved in `this.connections` as `Connection` instance
|
|
424
428
|
|
|
425
429
|
## 2025-12-03
|
|
426
430
|
|
|
427
431
|
- [2.1.0] Upgrade joi to 18.0.2
|
|
428
432
|
- [2.1.0] Upgrade mingo to 7.0.2
|
|
429
|
-
- [2.1.0] Feature now saved in
|
|
430
|
-
- [2.1.0] driver now saved in
|
|
431
|
-
- [2.1.0] Add
|
|
433
|
+
- [2.1.0] Feature now saved in `this.features` as `Feature` instance
|
|
434
|
+
- [2.1.0] driver now saved in `this.drivers` as `driver` instance
|
|
435
|
+
- [2.1.0] Add `this.getdriver()`. Accept short name or NsPath format
|