axiodb 1.0.12 → 1.0.14
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/lib/Caching/cache.operation.d.ts +2 -0
- package/lib/Caching/cache.operation.js +6 -0
- package/lib/Caching/cache.operation.js.map +1 -0
- package/lib/Operation/Indexation.operation.d.ts +2 -1
- package/lib/Operation/Indexation.operation.js +14 -1
- package/lib/Operation/Indexation.operation.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.operation.js","sourceRoot":"","sources":["../../source/Caching/cache.operation.ts"],"names":[],"mappings":";;AAAA,MAAqB,aAAa;CAAG;AAArC,gCAAqC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SuccessInterface, ErrorInterface } from "../config/Interfaces/Helper/response.helper.interface";
|
|
1
2
|
export default class AxioDB {
|
|
2
3
|
#private;
|
|
3
4
|
private readonly collectionName;
|
|
@@ -13,7 +14,7 @@ export default class AxioDB {
|
|
|
13
14
|
setEncryptionKey(key: string): void;
|
|
14
15
|
setEncryptionStatus(status: boolean): void;
|
|
15
16
|
getConfiguration(): object | any;
|
|
16
|
-
Insert(data: object | any): Promise<
|
|
17
|
+
Insert(data: object | any): Promise<SuccessInterface | ErrorInterface>;
|
|
17
18
|
CreateTreeRoot(): Promise<void>;
|
|
18
19
|
private createCollection;
|
|
19
20
|
}
|
|
@@ -28,6 +28,7 @@ const FolderManager_1 = __importDefault(require("../Storage/FolderManager"));
|
|
|
28
28
|
const Keys_1 = require("../config/Keys/Keys");
|
|
29
29
|
const path_1 = __importDefault(require("path"));
|
|
30
30
|
const Create_operation_1 = __importDefault(require("./Create.operation"));
|
|
31
|
+
const response_helper_1 = __importDefault(require("../Helper/response.helper"));
|
|
31
32
|
class AxioDB {
|
|
32
33
|
constructor(collectionName, Schema, isEncrypted = false, ClusterName = Keys_1.General.DBMS_Name) {
|
|
33
34
|
_AxioDB_encryptionKey.set(this, void 0);
|
|
@@ -65,7 +66,19 @@ class AxioDB {
|
|
|
65
66
|
}
|
|
66
67
|
Insert(data) {
|
|
67
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
yield new Create_operation_1.default(this.collectionName, data).Save();
|
|
69
|
+
const response = yield new Create_operation_1.default(this.collectionName, data).Save();
|
|
70
|
+
if (response.status) {
|
|
71
|
+
return new response_helper_1.default().Success({
|
|
72
|
+
Message: "Data Inserted Successfully",
|
|
73
|
+
DocumentID: response.data.DocumentID,
|
|
74
|
+
Data: Object.assign({}, response.data.Data),
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
return new response_helper_1.default().Error({
|
|
79
|
+
Message: "Failed to Insert Data",
|
|
80
|
+
});
|
|
81
|
+
}
|
|
69
82
|
});
|
|
70
83
|
}
|
|
71
84
|
CreateTreeRoot() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Indexation.operation.js","sourceRoot":"","sources":["../../source/Operation/Indexation.operation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,6EAAqD;AACrD,8CAA8C;AAC9C,gDAAwB;AACxB,0EAA2C;
|
|
1
|
+
{"version":3,"file":"Indexation.operation.js","sourceRoot":"","sources":["../../source/Operation/Indexation.operation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,6EAAqD;AACrD,8CAA8C;AAC9C,gDAAwB;AACxB,0EAA2C;AAC3C,gFAAuD;AASvD,MAAqB,MAAM;IAiBzB,YACE,cAAsB,EACtB,MAAqB,EACrB,cAAuB,KAAK,EAC5B,cAAsB,cAAO,CAAC,SAAS;QAhBzC,wCAAuB;QAkBrB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,uBAAA,IAAI,yBAAkB,cA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AM,CAAC;gBACN,OAAO,IAAI,yBAAc,EAAE,CAAC,KAAK,CAAC;oBAChC,OAAO,EAAE,uBAAuB;iBACjC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KAAA;IAYY,cAAc;;YACzB,MAAM,IAAI,uBAAa,EAAE,CAAC,eAAe,CACvC,GAAG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,EAAE,CAC1C,CAAC;QACJ,CAAC;KAAA;IAMa,gBAAgB;;YAC5B,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;gBACrB,MAAM,IAAI,uBAAa,EAAE,CAAC,eAAe,CACvC,GAAG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,cAAc,YAAY,CAC3E,CAAC;gBACF,IAAI,CAAC,cAAc,GAAG,GAAG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,cAAc,YAAY,CAAC;YACnG,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,uBAAa,EAAE,CAAC,eAAe,CACvC,GAAG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,cAAc,EAAE,CACjE,CAAC;gBACF,IAAI,CAAC,cAAc,GAAG,GAAG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACzF,CAAC;QACH,CAAC;KAAA;CACF;;kBAjJoB,MAAM"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "axiodb",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "A fast, lightweight, and scalable open-source DBMS for modern apps. Supports JSON-based data storage, simple APIs, and secure data management. Ideal for projects needing efficient and flexible database solutions.",
|
|
5
5
|
"main": "./lib/config/DB.js",
|
|
6
6
|
"types": "./lib/config/DB.d.ts",
|