axiodb 1.3.1 → 1.3.2
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.
|
@@ -13,6 +13,15 @@ export declare class AxioDB {
|
|
|
13
13
|
private Converter;
|
|
14
14
|
private ResponseHelper;
|
|
15
15
|
constructor(RootName?: string);
|
|
16
|
+
/**
|
|
17
|
+
* Initializes the root directory for the AxioDB.
|
|
18
|
+
*
|
|
19
|
+
* This method sets the `currentPATH` to include the `RootName` and checks if the AxioDB folder exists.
|
|
20
|
+
* If the folder does not exist, it attempts to create it. If the creation fails, an error is thrown.
|
|
21
|
+
*
|
|
22
|
+
* @throws {Error} If the AxioDB folder cannot be created.
|
|
23
|
+
* @returns {Promise<void>} A promise that resolves when the initialization is complete.
|
|
24
|
+
*/
|
|
16
25
|
private initializeRoot;
|
|
17
26
|
/**
|
|
18
27
|
* Creates a new database folder and updates the metadata file.
|
|
@@ -40,6 +40,15 @@ class AxioDB {
|
|
|
40
40
|
this.ResponseHelper = new response_helper_1.default(); // Initialize the ResponseHelper class
|
|
41
41
|
this.initializeRoot(); // Ensure root initialization
|
|
42
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Initializes the root directory for the AxioDB.
|
|
45
|
+
*
|
|
46
|
+
* This method sets the `currentPATH` to include the `RootName` and checks if the AxioDB folder exists.
|
|
47
|
+
* If the folder does not exist, it attempts to create it. If the creation fails, an error is thrown.
|
|
48
|
+
*
|
|
49
|
+
* @throws {Error} If the AxioDB folder cannot be created.
|
|
50
|
+
* @returns {Promise<void>} A promise that resolves when the initialization is complete.
|
|
51
|
+
*/
|
|
43
52
|
initializeRoot() {
|
|
44
53
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
54
|
this.currentPATH = path_1.default.join(this.currentPATH, this.RootName); // Correctly set the path
|
|
@@ -103,6 +112,9 @@ class AxioDB {
|
|
|
103
112
|
};
|
|
104
113
|
return this.ResponseHelper.Success(FinalDatabaseInfo);
|
|
105
114
|
}
|
|
115
|
+
else {
|
|
116
|
+
return this.ResponseHelper.Error("Failed to get database info");
|
|
117
|
+
}
|
|
106
118
|
});
|
|
107
119
|
}
|
|
108
120
|
// Delete Database
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Indexation.operation.js","sourceRoot":"","sources":["../../source/Operation/Indexation.operation.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;;;;;;;;;;;;;AAEvD,mBAAmB;AACnB,yEAAiD;AACjD,6EAAqD;AACrD,8CAA8C;AAC9C,gDAAwB;AACxB,uFAAqD;AACrD,kDAAkD;AAElD,iBAAiB;AACjB,kFAAmD;AACnD,mCAAqC;AACrC,gFAAuD;AASvD;;;;GAIG;AACH,MAAa,MAAM;IAQjB,YAAY,QAAiB;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,cAAO,CAAC,SAAS,CAAC,CAAC,oBAAoB;QACnE,IAAI,CAAC,WAAW,GAAG,cAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,oBAAoB;QAC1D,IAAI,CAAC,WAAW,GAAG,IAAI,qBAAW,EAAE,CAAC,CAAC,mCAAmC;QACzE,IAAI,CAAC,aAAa,GAAG,IAAI,uBAAa,EAAE,CAAC,CAAC,qCAAqC;QAC/E,IAAI,CAAC,SAAS,GAAG,IAAI,0BAAS,EAAE,CAAC,CAAC,iCAAiC;QACnE,IAAI,CAAC,cAAc,GAAG,IAAI,yBAAc,EAAE,CAAC,CAAC,sCAAsC;QAClF,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,6BAA6B;IACtD,CAAC;
|
|
1
|
+
{"version":3,"file":"Indexation.operation.js","sourceRoot":"","sources":["../../source/Operation/Indexation.operation.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;;;;;;;;;;;;;AAEvD,mBAAmB;AACnB,yEAAiD;AACjD,6EAAqD;AACrD,8CAA8C;AAC9C,gDAAwB;AACxB,uFAAqD;AACrD,kDAAkD;AAElD,iBAA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,GAAG,cAAc,CAAC,IAAI,CAAC,MAAM,YAAY;oBACzD,eAAe,EAAE,cAAc,CAAC,IAAI;oBACpC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAU,EAAE,EAAE,CACxD,cAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAChC;iBACF,CAAC;gBACF,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;YACxD,CAAC;iBAAM,CAAC;gBACN,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;YAClE,CAAC;QACH,CAAC;KAAA;IAED,kBAAkB;IAClB;;;;;;;;;;OAUG;IACU,cAAc,CACzB,MAAc;;YAEd,MAAM,MAAM,GAAG,cAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;YACnD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;YAEhE,IAAI,MAAM,CAAC,UAAU,KAAK,oBAAW,CAAC,EAAE,EAAE,CAAC;gBACzC,MAAM,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;gBACjD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAChC,aAAa,MAAM,uBAAuB,CAC3C,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,aAAa,MAAM,iBAAiB,CAAC,CAAC;YACzE,CAAC;QACH,CAAC;KAAA;CACF;AApID,wBAoIC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "axiodb",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
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",
|