datafolder 1.0.27 → 1.0.29

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.
@@ -67,7 +67,7 @@ function insertData(qyDB) {
67
67
  for (const key in Characters) {
68
68
  const character = Characters[key];
69
69
  const { id } = character;
70
- batch.put(["Characters", id], character);
70
+ batch.insert(["Characters", id], character);
71
71
  }
72
72
  batch.run();
73
73
  }
@@ -3,6 +3,7 @@ import { deepEqual, partialDeepStrictEqual } from "node:assert/strict";
3
3
  import { QyDB } from "../src/QyDB.js";
4
4
  import { QyJsonSaver } from "../src/QyJsonSaver.js";
5
5
  import { logger } from "../src/QyLogger.js";
6
+ import { cleanContent } from "../src/QyFileContentUtils.js";
6
7
  logger.level = "warn";
7
8
  test("test QyNorthwind", { skip: false }, async (context) => {
8
9
  context.after(async (t) => {
@@ -98,11 +99,11 @@ test("test QyNorthwind", { skip: false }, async (context) => {
98
99
  if (tableName.indexOf("_") < 0) {
99
100
  const table = dbValuesJson[tableName];
100
101
  for (const id in table) {
101
- partialDeepStrictEqual(qyDB.view([tableName, id]), table[id]);
102
+ partialDeepStrictEqual(qyDB.view([tableName, id]), cleanContent(table[id]));
102
103
  }
103
104
  }
104
105
  }
105
- deepEqual(qyDB.view(["employees", "6"], {
106
+ deepEqual(cleanContent(qyDB.view(["employees", "6"], {
106
107
  $all: 1,
107
108
  last_name: 0,
108
109
  reports_to: { $link: "employees", $spec: { first_name: 1, postal_code: 1 } },
@@ -110,9 +111,8 @@ test("test QyNorthwind", { skip: false }, async (context) => {
110
111
  $link: "territories",
111
112
  $spec: { "**": 1, region_id: { $link: "region", region_description: 1 } },
112
113
  },
113
- }), {
114
+ })), {
114
115
  employee_id: 6,
115
- region: null,
116
116
  first_name: "Michael",
117
117
  title: "Sales Representative",
118
118
  title_of_courtesy: "Mr.",