@nocobase/database 1.3.47-beta → 1.3.49-beta

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/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # NocoBase
2
+
3
+ <video width="100%" controls>
4
+ <source src="https://static-docs.nocobase.com/NocoBase0510.mp4" type="video/mp4">
5
+ </video>
6
+
7
+
8
+ ## What is NocoBase
9
+
10
+ NocoBase is a scalability-first, open-source no-code development platform.
11
+ Instead of investing years of time and millions of dollars in research and development, deploy NocoBase in a few minutes and you'll have a private, controllable, and extremely scalable no-code development platform!
12
+
13
+ Homepage:
14
+ https://www.nocobase.com/
15
+
16
+ Online Demo:
17
+ https://demo.nocobase.com/new
18
+
19
+ Documents:
20
+ https://docs.nocobase.com/
21
+
22
+ Commericial license & plugins:
23
+ https://www.nocobase.com/en/commercial
24
+
25
+ License agreement:
26
+ https://www.nocobase.com/en/agreement
27
+
28
+
29
+ ## Contact Us:
30
+ hello@nocobase.com
package/lib/database.js CHANGED
@@ -173,6 +173,9 @@ const _Database = class _Database extends import_events.EventEmitter {
173
173
  return val;
174
174
  });
175
175
  }
176
+ if (options.logging && process.env["DB_SQL_BENCHMARK"] == "true") {
177
+ opts.benchmark = true;
178
+ }
176
179
  this.options = opts;
177
180
  this.logger.debug(
178
181
  `create database instance: ${(0, import_safe_json_stringify.default)(
@@ -36,6 +36,7 @@ const _ToManyInterface = class _ToManyInterface extends import_base_interface.Ba
36
36
  if (!str) {
37
37
  return null;
38
38
  }
39
+ str = `${str}`.trim();
39
40
  const items = str.split(",");
40
41
  const { filterKey, targetCollection, transaction } = ctx;
41
42
  const targetInstances = await targetCollection.repository.find({
@@ -45,7 +46,7 @@ const _ToManyInterface = class _ToManyInterface extends import_base_interface.Ba
45
46
  transaction
46
47
  });
47
48
  items.forEach((item) => {
48
- if (!targetInstances.find((targetInstance) => targetInstance[filterKey] === item)) {
49
+ if (!targetInstances.find((targetInstance) => targetInstance[filterKey] == item)) {
49
50
  throw new Error(`"${item}" not found in ${targetCollection.model.name} ${filterKey}`);
50
51
  }
51
52
  });
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@nocobase/database",
3
- "version": "1.3.47-beta",
3
+ "version": "1.3.49-beta",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
7
7
  "license": "AGPL-3.0",
8
8
  "dependencies": {
9
- "@nocobase/logger": "1.3.47-beta",
10
- "@nocobase/utils": "1.3.47-beta",
9
+ "@nocobase/logger": "1.3.49-beta",
10
+ "@nocobase/utils": "1.3.49-beta",
11
11
  "async-mutex": "^0.3.2",
12
12
  "chalk": "^4.1.1",
13
13
  "cron-parser": "4.4.0",
@@ -38,5 +38,5 @@
38
38
  "url": "git+https://github.com/nocobase/nocobase.git",
39
39
  "directory": "packages/database"
40
40
  },
41
- "gitHead": "dcc260ecf21d9fcb04ef56f2ec8c4de23a8484f3"
41
+ "gitHead": "46dde74e2c220ae19bc275bb40be9ddf52485fa9"
42
42
  }