dobo 2.6.0 → 2.6.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.
@@ -203,8 +203,6 @@ export async function sanitizeAll (model) {
203
203
  }
204
204
  }
205
205
  await runHook(`dobo.${camelCase(model.name)}:afterSanitizeModel`, model)
206
- // fields that can participate in table scan if needed
207
- model.scans = []
208
206
  // sorting only possible using these fields
209
207
  model.sortables = []
210
208
  for (const index of model.indexes) {
@@ -239,6 +237,7 @@ async function createSchema (item) {
239
237
  item.connection = null
240
238
  item.hooks = item.hooks ?? []
241
239
  item.disabled = item.disabled ?? []
240
+ item.scanables = item.scanables ?? []
242
241
  if (item.disabled === 'all') item.disabled = ['find', 'get', 'create', 'update', 'remove']
243
242
  else if (item.disabled === 'readonly') item.disabled = ['create', 'update', 'remove']
244
243
  // Is there any overwritten connection?
@@ -237,9 +237,9 @@ export function buildFilterQuery (filter = {}) {
237
237
  filter.search = q
238
238
  return {} //
239
239
  } else {
240
- let scans = [...this.scans]
241
- if (scans.length === 0) scans = [...this.sortables]
242
- const fields = scans.filter(f => {
240
+ let scanables = [...this.scanables]
241
+ if (scanables.length === 0) scanables = [...this.sortables]
242
+ const fields = scanables.filter(f => {
243
243
  const field = find(this.properties, { name: f, type: 'string' })
244
244
  return !!field
245
245
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dobo",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "description": "DBMS for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## 2026-02-01
4
4
 
5
- - [2.6.0] Add ```model.scans``` for fields that can participate in table scans if necessary
5
+ - [2.6.0] Add ```model.scanables``` for fields that can participate in table scans if necessary
6
6
  - [2.6.0] Add ```driver.support.search``` for driver's fulltext search support
7
7
  - [2.6.0] Add model hooks ```before/afterBuildQuery/Search```
8
8