@samet-it/be-db-common 1.3.3 → 1.3.5
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/connection/db.connection.d.ts +1 -1
- package/dist/connection/db.connection.js +4 -2
- package/dist/connection/index.types.d.ts +1 -1
- package/dist/error/db-execute.error.d.ts +1 -1
- package/dist/error/db-invalid-value.error.d.ts +1 -1
- package/dist/error/db-not-supported.error.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.foretell.d.ts +1 -0
- package/dist/index.foretell.js +13 -0
- package/dist/index.js +2 -0
- package/dist/index.loader.d.ts +1 -0
- package/dist/index.loader.js +12 -0
- package/dist/internal.d.ts +1 -0
- package/dist/internal.js +2 -0
- package/dist/line/db-lines.impl.js +3 -1
- package/dist/repo/db.repo.d.ts +1 -1
- package/dist/repo/db.repo.js +6 -3
- package/dist/repo/index.types.d.ts +1 -1
- package/package.json +4 -6
- package/dist/assets/.gitkeep +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { isBareObject } from "@
|
|
2
|
-
import { errorCommon } from "@
|
|
1
|
+
import { isBareObject, setFqn } from "@samet-it/be-base-common";
|
|
2
|
+
import { errorCommon } from "@samet-it/be-base-common";
|
|
3
|
+
import { FQN } from "../internal.js";
|
|
3
4
|
// noinspection JSUnusedGlobalSymbols
|
|
4
5
|
/**
|
|
5
6
|
* DB connection abstract class
|
|
@@ -145,3 +146,4 @@ export class DbConnection {
|
|
|
145
146
|
await this.connect();
|
|
146
147
|
}
|
|
147
148
|
}
|
|
149
|
+
setFqn(DbConnection, FQN);
|
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const foretell_sametDbCommon: any[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FQN } from "./internal.js";
|
|
2
|
+
import { errorPool } from "@samet-it/be-base-common";
|
|
3
|
+
import { foretell_sametBaseCommon } from "@samet-it/be-base-common";
|
|
4
|
+
// noinspection JSUnusedGlobalSymbols
|
|
5
|
+
export const foretell_sametDbCommon = [
|
|
6
|
+
// dependencies
|
|
7
|
+
...foretell_sametBaseCommon,
|
|
8
|
+
// errors
|
|
9
|
+
() => errorPool.lazy(FQN, 'DbError', import('./error/db.error.js').then(m => m.DbError), { i18n: true, emit: true }),
|
|
10
|
+
() => errorPool.lazy(FQN, 'DbExecuteError', import('./error/db-execute.error.js').then(m => m.DbExecuteError), { i18n: true, emit: true }),
|
|
11
|
+
() => errorPool.lazy(FQN, 'DbInvalidValueError', import('./error/db-invalid-value.error.js').then(m => m.DbInvalidValueError), { i18n: true, emit: true }),
|
|
12
|
+
() => errorPool.lazy(FQN, 'DbNotSupportedError', import('./error/db-not-supported.error.js').then(m => m.DbNotSupportedError), { i18n: true, emit: true }),
|
|
13
|
+
];
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const loader_sametDbCommon: import("@samet-it/be-base-common").LoaderLike;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineLoader } from "@samet-it/be-base-common";
|
|
2
|
+
import { FQN } from "./internal.js";
|
|
3
|
+
import { loader_sametBaseCommon } from "@samet-it/be-base-common";
|
|
4
|
+
import { loader_sametCacheCommon } from "@samet-it/be-cache-common/dist/index.loader.js";
|
|
5
|
+
// noinspection JSUnusedGlobalSymbols
|
|
6
|
+
export const loader_sametDbCommon = defineLoader(FQN,
|
|
7
|
+
// dependencies
|
|
8
|
+
...loader_sametBaseCommon, ...loader_sametCacheCommon,
|
|
9
|
+
// errors
|
|
10
|
+
() => import('./error/db.error.js').then(m => m.DbError), () => import('./error/db-execute.error.js').then(m => m.DbExecuteError), () => import('./error/db-invalid-value.error.js').then(m => m.DbInvalidValueError), () => import('./error/db-not-supported.error.js').then(m => m.DbNotSupportedError),
|
|
11
|
+
// classes
|
|
12
|
+
() => import('./repo/db.repo.js').then(m => m.DbRepo), () => import('./connection/db.connection.js').then(m => m.DbConnection));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NME: string, FQN: string, VER: string, CNF: import("@samet-it/be-base-common").LeyyoConfig;
|
package/dist/internal.js
ADDED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// ~~console.log(__filename);
|
|
2
|
-
import { assertFunction } from "@
|
|
2
|
+
import { assertFunction, setFqn } from "@samet-it/be-base-common";
|
|
3
|
+
import { FQN } from "../internal.js";
|
|
3
4
|
/** @inheritDoc */
|
|
4
5
|
class DbLinesImpl {
|
|
5
6
|
_lines;
|
|
@@ -127,6 +128,7 @@ class DbLinesImpl {
|
|
|
127
128
|
return this.end();
|
|
128
129
|
}
|
|
129
130
|
}
|
|
131
|
+
setFqn(DbLinesImpl, FQN);
|
|
130
132
|
// noinspection JSUnusedGlobalSymbols
|
|
131
133
|
/**
|
|
132
134
|
* Create new/empty sql lines
|
package/dist/repo/db.repo.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DbCheckKeysResult, DbRepoProps, DbRepoLike, DbRepoOpt, UrnDelimiter, DbCheckKeysTuple, DbExecOpt, DbMeta, DbRepoExtensionLambda, DbQueryResultOne, DbQueryResultMore } from "./index.types.js";
|
|
2
2
|
import { DefDims, Entity, IdDocLike, Pair, Portion, UrnDocLike, UrnTuple, View } from "@samet-it/be-base-common";
|
|
3
3
|
import { DbConnectionLike, UserFetcherLambda } from "../connection/index.js";
|
|
4
|
-
import { KeyValue, Logger, Opt, StrKey } from "@
|
|
4
|
+
import { KeyValue, Logger, Opt, StrKey } from "@samet-it/be-base-common";
|
|
5
5
|
import { QueryAny, QueryRegular } from "@leyyo/query";
|
|
6
6
|
import { CacheConnectionLike, CacheChannelLike, CacheExecOpt } from "@samet-it/be-cache-common";
|
|
7
7
|
import { DbLines } from "../line/index.js";
|
package/dist/repo/db.repo.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
-
import { errorHandler } from "@samet-it/be-base-common";
|
|
3
|
-
import { errorCommon, isFilledObj, isText } from "@
|
|
2
|
+
import { errorHandler, setFqn } from "@samet-it/be-base-common";
|
|
3
|
+
import { errorCommon, isFilledObj, isText } from "@samet-it/be-base-common";
|
|
4
4
|
import { queryParser } from "@leyyo/query";
|
|
5
|
-
import { assertArray, assertInteger, assertMessage, assertObject, assertText
|
|
5
|
+
import { assertArray, assertInteger, assertMessage, assertObject, assertText } from "@samet-it/be-base-common";
|
|
6
6
|
import { DbError, DbInvalidValueError, DbNotSupportedError } from "../error/index.js";
|
|
7
|
+
import { isBareObject } from "@samet-it/be-base-common";
|
|
8
|
+
import { FQN } from "../internal.js";
|
|
7
9
|
const FORBIDDEN_KEYS = ['id', 'urn', '_trashId', 'createdAt', 'createdBy', 'updatedAt', 'updatedBy', "_rev", '_search', '_alpha', '_irregular'];
|
|
8
10
|
const STRICT_KEYS = ['id', 'urn', '_trashId', "_rev", '_irregular'];
|
|
9
11
|
// noinspection JSUnusedGlobalSymbols
|
|
@@ -1235,3 +1237,4 @@ export class DbRepo {
|
|
|
1235
1237
|
return items;
|
|
1236
1238
|
}
|
|
1237
1239
|
}
|
|
1240
|
+
setFqn(DbRepo, FQN);
|
|
@@ -2,7 +2,7 @@ import { DefDims, Entity, IdDocLike, Pair, Portion, UrnDef, UrnDocLike, UrnTuple
|
|
|
2
2
|
import { DbConnectionLike, UserFetcherLambda } from "../connection/index.js";
|
|
3
3
|
import { QueryAny, QueryRegular } from "@leyyo/query";
|
|
4
4
|
import { CacheChannelLike, CacheConnectionLike, CacheExecOpt } from "@samet-it/be-cache-common";
|
|
5
|
-
import { KeyValue, OmitError, Opt, StrKey } from "@
|
|
5
|
+
import { KeyValue, OmitError, Opt, StrKey } from "@samet-it/be-base-common";
|
|
6
6
|
import { DbLines } from "../line/index.js";
|
|
7
7
|
/**
|
|
8
8
|
* DB repository interface
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@samet-it/be-db-common",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
4
4
|
"description": "Backend DB Common",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -64,10 +64,8 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@leyyo/
|
|
68
|
-
"@
|
|
69
|
-
"@
|
|
70
|
-
"@samet-it/be-base-common": "^1.3.1",
|
|
71
|
-
"@samet-it/be-cache-common": "^1.3.1"
|
|
67
|
+
"@leyyo/query": "^1.3.4",
|
|
68
|
+
"@samet-it/be-base-common": "^1.3.4",
|
|
69
|
+
"@samet-it/be-cache-common": "^1.3.5"
|
|
72
70
|
}
|
|
73
71
|
}
|
package/dist/assets/.gitkeep
DELETED
|
File without changes
|