@bee.js/node 0.0.40 → 0.0.41

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/beehive.js CHANGED
@@ -284,6 +284,13 @@ module.exports = function hive(req = {}, res = {}, model = null) {
284
284
  return this
285
285
  },
286
286
 
287
+ orderByIf: function(condition, ...fields) {
288
+ if (condition)
289
+ script[0]['orderBy'].push(fields.join(', '))
290
+
291
+ return this
292
+ },
293
+
287
294
  limit: function(...params) {
288
295
 
289
296
  script[0]['limit'].push(params.join(","))
package/lib/DBA/beeDBA.js CHANGED
@@ -25,6 +25,9 @@ const fieldType = {
25
25
  case 'char':
26
26
  type = `char(${field.length || 5})`
27
27
  break
28
+ case 'file':
29
+ type = 'blob'
30
+ break
28
31
  }
29
32
  return type
30
33
  + (!field.null ? ' NOT NULL' : '')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bee.js/node",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "description": "A JavaScript framework for making Node.js API´s",
5
5
  "main": "index.js",
6
6
  "scripts": {