@naturalcycles/db-lib 9.23.0 → 9.23.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.
@@ -6,7 +6,7 @@ const commonKeyValueDao_1 = require("../kv/commonKeyValueDao");
6
6
  const test_model_1 = require("./test.model");
7
7
  const testItems = (0, test_model_1.createTestItemsBM)(4);
8
8
  const testIds = testItems.map(e => e.id);
9
- const testEntries = testItems.map(e => [e.id, e]);
9
+ const testEntries = testItems.map(e => [e.id, Buffer.from(`${e.id}value`)]);
10
10
  function runCommonKeyValueDaoTest(db) {
11
11
  const dao = new commonKeyValueDao_1.CommonKeyValueDao({
12
12
  db,
package/package.json CHANGED
@@ -45,7 +45,7 @@
45
45
  "engines": {
46
46
  "node": ">=20.13"
47
47
  },
48
- "version": "9.23.0",
48
+ "version": "9.23.1",
49
49
  "description": "Lowest Common Denominator API to supported Databases",
50
50
  "keywords": [
51
51
  "db",
@@ -1,14 +1,14 @@
1
- import { _sortBy, KeyValueTuple } from '@naturalcycles/js-lib'
1
+ import { _sortBy } from '@naturalcycles/js-lib'
2
2
  import { CommonKeyValueDao } from '../kv/commonKeyValueDao'
3
- import { CommonKeyValueDB } from '../kv/commonKeyValueDB'
4
- import { createTestItemsBM, TEST_TABLE, TestItemBM } from './test.model'
3
+ import { CommonKeyValueDB, KeyValueDBTuple } from '../kv/commonKeyValueDB'
4
+ import { createTestItemsBM, TEST_TABLE } from './test.model'
5
5
 
6
6
  const testItems = createTestItemsBM(4)
7
7
  const testIds = testItems.map(e => e.id)
8
- const testEntries: KeyValueTuple<string, TestItemBM>[] = testItems.map(e => [e.id, e])
8
+ const testEntries: KeyValueDBTuple[] = testItems.map(e => [e.id, Buffer.from(`${e.id}value`)])
9
9
 
10
10
  export function runCommonKeyValueDaoTest(db: CommonKeyValueDB): void {
11
- const dao = new CommonKeyValueDao<string, TestItemBM>({
11
+ const dao = new CommonKeyValueDao({
12
12
  db,
13
13
  table: TEST_TABLE,
14
14
  // todo: make this test support "deflatedJson" transformer