@naturalcycles/db-lib 10.6.0 → 10.8.0
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/dist/adapter/cachedb/cache.db.d.ts +4 -3
- package/dist/adapter/cachedb/cache.db.js +2 -2
- package/dist/adapter/cachedb/cache.db.model.d.ts +3 -2
- package/dist/adapter/file/file.db.d.ts +4 -3
- package/dist/adapter/file/file.db.js +9 -4
- package/dist/adapter/file/file.db.model.d.ts +2 -1
- package/dist/adapter/file/inMemory.persistence.plugin.d.ts +1 -1
- package/dist/adapter/file/localFile.persistence.plugin.d.ts +1 -1
- package/dist/adapter/file/localFile.persistence.plugin.js +1 -1
- package/dist/adapter/file/noop.persistence.plugin.d.ts +1 -1
- package/dist/commondao/common.dao.d.ts +3 -1
- package/dist/commondao/common.dao.js +15 -9
- package/dist/commondao/common.dao.model.d.ts +14 -8
- package/dist/commondao/index.d.ts +2 -0
- package/dist/commondao/index.js +2 -0
- package/dist/{base.common.db.d.ts → commondb/base.common.db.d.ts} +4 -3
- package/dist/{base.common.db.js → commondb/base.common.db.js} +1 -1
- package/dist/{common.db.d.ts → commondb/common.db.d.ts} +4 -3
- package/dist/db.model.d.ts +2 -2
- package/dist/index.d.ts +2 -13
- package/dist/index.js +2 -13
- package/dist/{adapter/inmemory → inmemory}/inMemory.db.d.ts +7 -5
- package/dist/{adapter/inmemory → inmemory}/inMemory.db.js +8 -2
- package/dist/{adapter/inmemory → inmemory}/inMemoryKeyValueDB.d.ts +3 -3
- package/dist/{adapter/inmemory → inmemory}/inMemoryKeyValueDB.js +1 -1
- package/dist/inmemory/index.d.ts +3 -0
- package/dist/inmemory/index.js +3 -0
- package/dist/inmemory/queryInMemory.d.ts +3 -0
- package/dist/{adapter/inmemory → inmemory}/queryInMemory.js +1 -1
- package/dist/kv/commonKeyValueDB.d.ts +1 -1
- package/dist/kv/commonKeyValueDao.d.ts +2 -1
- package/dist/kv/commonKeyValueDao.js +2 -1
- package/dist/kv/commonKeyValueDaoMemoCache.d.ts +3 -2
- package/dist/kv/commonKeyValueDaoMemoCache.js +2 -1
- package/dist/kv/index.d.ts +3 -0
- package/dist/kv/index.js +3 -0
- package/dist/model.util.d.ts +1 -1
- package/dist/model.util.js +1 -1
- package/dist/pipeline/dbPipelineBackup.d.ts +3 -3
- package/dist/pipeline/dbPipelineBackup.js +4 -1
- package/dist/pipeline/dbPipelineCopy.d.ts +3 -3
- package/dist/pipeline/dbPipelineCopy.js +4 -1
- package/dist/pipeline/dbPipelineRestore.d.ts +3 -3
- package/dist/pipeline/dbPipelineRestore.js +6 -1
- package/dist/pipeline/index.d.ts +3 -0
- package/dist/pipeline/index.js +3 -0
- package/dist/query/dbQuery.d.ts +1 -1
- package/dist/query/dbQuery.js +2 -1
- package/dist/testing/commonDBTest.d.ts +1 -1
- package/dist/testing/commonDBTest.js +5 -2
- package/dist/testing/commonDaoTest.d.ts +1 -1
- package/dist/testing/commonDaoTest.js +3 -1
- package/dist/testing/test.model.d.ts +2 -1
- package/dist/testing/test.model.js +2 -1
- package/dist/timeseries/timeSeries.model.d.ts +1 -1
- package/dist/transaction/dbTransaction.util.d.ts +2 -2
- package/package.json +8 -4
- package/src/adapter/cachedb/cache.db.model.ts +3 -2
- package/src/adapter/cachedb/cache.db.ts +5 -9
- package/src/adapter/file/file.db.model.ts +2 -1
- package/src/adapter/file/file.db.ts +13 -15
- package/src/adapter/file/inMemory.persistence.plugin.ts +1 -1
- package/src/adapter/file/localFile.persistence.plugin.ts +2 -2
- package/src/adapter/file/noop.persistence.plugin.ts +1 -1
- package/src/commondao/common.dao.model.ts +15 -11
- package/src/commondao/common.dao.ts +22 -32
- package/src/commondao/index.ts +2 -0
- package/src/{base.common.db.ts → commondb/base.common.db.ts} +7 -11
- package/src/{common.db.ts → commondb/common.db.ts} +4 -8
- package/src/db.model.ts +2 -2
- package/src/index.ts +2 -13
- package/src/{adapter/inmemory → inmemory}/inMemory.db.ts +19 -22
- package/src/{adapter/inmemory → inmemory}/inMemoryKeyValueDB.ts +4 -8
- package/src/inmemory/index.ts +3 -0
- package/src/{adapter/inmemory → inmemory}/queryInMemory.ts +3 -3
- package/src/kv/commonKeyValueDB.ts +1 -1
- package/src/kv/commonKeyValueDao.ts +4 -2
- package/src/kv/commonKeyValueDaoMemoCache.ts +4 -2
- package/src/kv/index.ts +3 -0
- package/src/model.util.ts +2 -2
- package/src/pipeline/dbPipelineBackup.ts +6 -3
- package/src/pipeline/dbPipelineCopy.ts +6 -3
- package/src/pipeline/dbPipelineRestore.ts +9 -15
- package/src/pipeline/index.ts +3 -0
- package/src/query/dbQuery.ts +3 -2
- package/src/testing/commonDBTest.ts +6 -3
- package/src/testing/commonDaoTest.ts +4 -2
- package/src/testing/keyValueDBTest.ts +1 -1
- package/src/testing/test.model.ts +4 -2
- package/src/timeseries/commonTimeSeriesDao.ts +1 -1
- package/src/timeseries/timeSeries.model.ts +1 -1
- package/src/transaction/dbTransaction.util.ts +2 -2
- package/dist/adapter/inmemory/queryInMemory.d.ts +0 -3
- /package/dist/{common.db.js → commondb/common.db.js} +0 -0
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Readable } from 'node:stream'
|
|
2
|
-
import {
|
|
2
|
+
import { _sortBy } from '@naturalcycles/js-lib'
|
|
3
|
+
import { localTime } from '@naturalcycles/js-lib/datetime'
|
|
4
|
+
import { _deepCopy, _filterObject, _omit, _pick } from '@naturalcycles/js-lib/object'
|
|
3
5
|
import { _pipeline } from '@naturalcycles/nodejs-lib/stream'
|
|
4
|
-
import type { CommonDB } from '../common.db.js'
|
|
5
6
|
import { CommonDao } from '../commondao/common.dao.js'
|
|
6
7
|
import { CommonDaoLogLevel } from '../commondao/common.dao.model.js'
|
|
8
|
+
import type { CommonDB } from '../commondb/common.db.js'
|
|
7
9
|
import { DBQuery } from '../query/dbQuery.js'
|
|
8
10
|
import type { CommonDBImplementationQuirks } from './commonDBTest.js'
|
|
9
11
|
import type { TestItemBM } from './test.model.js'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { KeyValueTuple } from '@naturalcycles/js-lib'
|
|
2
1
|
import { _range, _sortBy } from '@naturalcycles/js-lib'
|
|
2
|
+
import type { KeyValueTuple } from '@naturalcycles/js-lib/types'
|
|
3
3
|
import type { CommonKeyValueDB } from '../kv/commonKeyValueDB.js'
|
|
4
4
|
import { TEST_TABLE } from './test.model.js'
|
|
5
5
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { _range } from '@naturalcycles/js-lib'
|
|
2
|
+
import type { JsonSchemaObject } from '@naturalcycles/js-lib/json-schema'
|
|
3
|
+
import { jsonSchema } from '@naturalcycles/js-lib/json-schema'
|
|
4
|
+
import type { BaseDBEntity, UnixTimestamp } from '@naturalcycles/js-lib/types'
|
|
3
5
|
import {
|
|
4
6
|
baseDBEntitySchema,
|
|
5
7
|
binarySchema,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ObjectWithId } from '@naturalcycles/js-lib'
|
|
2
|
-
import type { CommonDB } from '../common.db.js'
|
|
1
|
+
import type { ObjectWithId } from '@naturalcycles/js-lib/types'
|
|
2
|
+
import type { CommonDB } from '../commondb/common.db.js'
|
|
3
3
|
import type { CommonDBOptions, CommonDBSaveOptions, DBTransaction } from '../db.model.js'
|
|
4
4
|
|
|
5
5
|
/**
|
|
File without changes
|