waibu-db 2.28.1 → 2.29.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/index.js CHANGED
@@ -57,19 +57,19 @@ async function factory (pkgName) {
57
57
  remove: 'DELETE'
58
58
  }
59
59
 
60
- this.selfBind([
61
- 'countRecord',
62
- 'createAggregate',
63
- 'createHistogram',
64
- 'createRecord',
65
- 'findOneRecord',
66
- 'findRecord',
67
- 'getSchemaExt',
68
- 'getRecord',
69
- 'removeRecord',
70
- 'updateRecord',
71
- 'findAllRecord'
72
- ])
60
+ this.bindThis(
61
+ countRecord,
62
+ createAggregate,
63
+ createHistogram,
64
+ createRecord,
65
+ findOneRecord,
66
+ findRecord,
67
+ getSchemaExt,
68
+ getRecord,
69
+ removeRecord,
70
+ updateRecord,
71
+ findAllRecord
72
+ )
73
73
  }
74
74
 
75
75
  /**
@@ -100,15 +100,16 @@ async function factory (pkgName) {
100
100
  }
101
101
  options.filter.sort = 'id:1' // TODO: make this configurable
102
102
  if (!this.app.sumba || !id) {
103
- await exportTo(model, dest, options)
104
- return dest
103
+ const result = await exportTo(model, dest, options)
104
+ return result.file
105
105
  }
106
106
  const { downloadDir } = this.app.sumba
107
107
  dest = `${downloadDir}/${file}`
108
108
  const dmodel = this.app.dobo.getModel('SumbaDownload')
109
109
  try {
110
110
  await dmodel.updateRecord(id, { status: 'PROCESSING' })
111
- await exportTo(model, dest, options)
111
+ const result = await exportTo(model, dest, options)
112
+ dest = result.file
112
113
  const { size } = fs.statSync(dest)
113
114
  await dmodel.updateRecord(id, { size, status: 'COMPLETE' })
114
115
  } catch (err) {
@@ -226,18 +227,6 @@ async function factory (pkgName) {
226
227
  }
227
228
  return await this.findAllRecord({ model, req, options })
228
229
  }
229
-
230
- countRecord = countRecord
231
- createAggregate = createAggregate
232
- createHistogram = createHistogram
233
- createRecord = createRecord
234
- findOneRecord = findOneRecord
235
- findRecord = findRecord
236
- findAllRecord = findAllRecord
237
- getSchemaExt = getSchemaExt
238
- getRecord = getRecord
239
- removeRecord = removeRecord
240
- updateRecord = updateRecord
241
230
  }
242
231
 
243
232
  return WaibuDb
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-db",
3
- "version": "2.28.1",
3
+ "version": "2.29.1",
4
4
  "description": "DB Helper",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-07-25
4
+
5
+ - [2.29.1] Bug fix in `exportData()`
6
+
7
+ ## 2026-07-24
8
+
9
+ - [2.29.0] Change `selfBind` to `bindThis`
10
+
3
11
  ## 2026-07-13
4
12
 
5
13
  - [2.28.0] Update documentations