@samet-it/be-db-common 1.3.2 → 1.3.3
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 +2 -0
- package/dist/connection/db.connection.d.ts +1 -1
- package/dist/connection/db.connection.js +41 -46
- package/dist/connection/index.d.ts +2 -2
- package/dist/connection/index.js +2 -18
- package/dist/connection/index.types.js +1 -2
- package/dist/error/db-execute.error.d.ts +1 -1
- package/dist/error/db-execute.error.js +3 -7
- package/dist/error/db-invalid-value.error.d.ts +1 -1
- package/dist/error/db-invalid-value.error.js +3 -7
- package/dist/error/db-not-supported.error.d.ts +1 -1
- package/dist/error/db-not-supported.error.js +3 -7
- package/dist/error/db.error.js +2 -6
- package/dist/error/index.d.ts +4 -4
- package/dist/error/index.js +4 -20
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -20
- package/dist/line/db-lines.impl.d.ts +1 -1
- package/dist/line/db-lines.impl.js +7 -10
- package/dist/line/index.d.ts +2 -2
- package/dist/line/index.js +2 -18
- package/dist/line/index.types.js +1 -2
- package/dist/repo/db.repo.d.ts +5 -3
- package/dist/repo/db.repo.js +654 -665
- package/dist/repo/index.d.ts +2 -2
- package/dist/repo/index.js +2 -18
- package/dist/repo/index.types.d.ts +20 -2
- package/dist/repo/index.types.js +1 -2
- package/package.json +3 -3
package/dist/repo/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './index.types';
|
|
2
|
-
export * from './db.repo';
|
|
1
|
+
export * from './index.types.js';
|
|
2
|
+
export * from './db.repo.js';
|
package/dist/repo/index.js
CHANGED
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./index.types"), exports);
|
|
18
|
-
__exportStar(require("./db.repo"), exports);
|
|
1
|
+
export * from './index.types.js';
|
|
2
|
+
export * from './db.repo.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DefDims, Entity, IdDocLike, Pair, Portion, UrnDef, UrnDocLike, UrnTuple, View } from "@samet-it/be-base-common";
|
|
2
|
-
import { DbConnectionLike, UserFetcherLambda } from "../connection";
|
|
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
5
|
import { KeyValue, OmitError, Opt, StrKey } from "@leyyo/common";
|
|
6
|
-
import { DbLines } from "../line";
|
|
6
|
+
import { DbLines } from "../line/index.js";
|
|
7
7
|
/**
|
|
8
8
|
* DB repository interface
|
|
9
9
|
*
|
|
@@ -245,6 +245,24 @@ export interface DbRepoLike<CONN extends DbConnectionLike, OPT extends DbExecOpt
|
|
|
245
245
|
* @return {string} - urn
|
|
246
246
|
* */
|
|
247
247
|
toUrn(urnRec: URN): string;
|
|
248
|
+
/**
|
|
249
|
+
|
|
250
|
+
* Extract core urn key from document without prefix
|
|
251
|
+
* - It returns code part of urn `<prefix>:<code>`;
|
|
252
|
+
*
|
|
253
|
+
* @param {Partial<Entity>} doc - document
|
|
254
|
+
* @return {string} - key
|
|
255
|
+
* */
|
|
256
|
+
toUrnKey(doc: Partial<ENT>): string;
|
|
257
|
+
/**
|
|
258
|
+
|
|
259
|
+
* Extract core urn key from urn without prefix
|
|
260
|
+
* - It returns code part of urn `<prefix>:<code>`;
|
|
261
|
+
*
|
|
262
|
+
* @param {string} urn - urn
|
|
263
|
+
* @return {string} - key
|
|
264
|
+
* */
|
|
265
|
+
toUrnKey(urn: string): string;
|
|
248
266
|
/**
|
|
249
267
|
* Generates urn tuple
|
|
250
268
|
*
|
package/dist/repo/index.types.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
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.3",
|
|
4
4
|
"description": "Backend DB Common",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
"email": "mustafay@samet.com.tr"
|
|
17
17
|
},
|
|
18
18
|
"main": "dist/index.js",
|
|
19
|
-
"type": "
|
|
19
|
+
"type": "module",
|
|
20
20
|
"scripts": {
|
|
21
21
|
"clear": "rimraf dist && rimraf coverage",
|
|
22
22
|
"clear:nm": "rimraf node_modules && npm run clear",
|
|
23
23
|
"lint": "eslint src/**/*.ts --quiet",
|
|
24
24
|
"lint:verbose": "eslint src/**/*.ts",
|
|
25
|
-
"asset": "node -r ts-node/register commands/assets.
|
|
25
|
+
"asset": "node -r ts-node/register commands/assets.js",
|
|
26
26
|
"build": "npm run clear && tsc && npm run asset",
|
|
27
27
|
"test": "jest --config=jest.json --detectOpenHandles",
|
|
28
28
|
"coverage": "rimraf coverage && jest --config=jest.json --coverage --coverageDirectory=coverage",
|