axiodb 2.30.84 → 2.30.86

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.
@@ -126,7 +126,7 @@ exports.AvailableRoutes = [
126
126
  },
127
127
  {
128
128
  method: "POST",
129
- description: "Get all documents from a collection",
129
+ description: "Get all documents from a collection by query",
130
130
  path: "/api/operation/all/by-query/?dbName&collectionName&page&transactiontoken",
131
131
  payload: {
132
132
  query: "object",
@@ -134,7 +134,7 @@ exports.AvailableRoutes = [
134
134
  },
135
135
  {
136
136
  method: "GET",
137
- description: "Get all documents from a collection",
137
+ description: "Get specific documents from a collection by ID",
138
138
  path: "/api/operation/all/by-id/?dbName&collectionName&documentId&transactiontoken",
139
139
  },
140
140
  {
@@ -155,7 +155,7 @@ exports.AvailableRoutes = [
155
155
  },
156
156
  {
157
157
  method: "PUT",
158
- description: "Update an existing document in a collection",
158
+ description: "Update an existing document in a collection by ID",
159
159
  path: "/api/operation/update/by-id/?dbName&collectionName&documentId&transactiontoken",
160
160
  payload: {
161
161
  document: "full object with no key in body",
@@ -163,7 +163,7 @@ exports.AvailableRoutes = [
163
163
  },
164
164
  {
165
165
  method: "PUT",
166
- description: "Update an existing document in a collection",
166
+ description: "Update an existing document in a collection by query",
167
167
  path: "/api/operation/update/by-query/?dbName&isMany&collectionName&transactiontoken",
168
168
  payload: {
169
169
  query: "object",
@@ -172,12 +172,12 @@ exports.AvailableRoutes = [
172
172
  },
173
173
  {
174
174
  method: "DELETE",
175
- description: "Delete an existing document in a collection",
175
+ description: "Delete an existing document in a collection by ID",
176
176
  path: "/api/operation/delete/by-id/?dbName&collectionName&documentId&transactiontoken",
177
177
  },
178
178
  {
179
179
  method: "DELETE",
180
- description: "Delete an existing document in a collection",
180
+ description: "Delete an existing document in a collection by query",
181
181
  path: "/api/operation/delete/by-query/?dbName&collectionName&isMany&documentId&transactiontoken",
182
182
  payload: {
183
183
  query: "object",
@@ -185,7 +185,7 @@ exports.AvailableRoutes = [
185
185
  },
186
186
  {
187
187
  method: "POST",
188
- description: "Perform aggregation on documents in a collection",
188
+ description: "Perform aggregation on documents in a collection using an aggregation pipeline",
189
189
  path: "/api/operation/aggregate/?dbName&collectionName&transactiontoken",
190
190
  payload: {
191
191
  aggregation: "array",
@@ -1 +1 @@
1
- {"version":3,"file":"keys.js","sourceRoot":"","sources":["../../../source/server/config/keys.ts"],"names":[],"mappings":";;;;;;AAAA,uDAAuD;AACvD,gDAAwB;AAExB,IAAY,UASX;AATD,WAAY,UAAU;IACpB,+CAAY,CAAA;IACZ,mCAAqB,CAAA;IACrB,wCAA0B,CAAA;IAC1B,kDAAoC,CAAA;IACpC,oDAAsC,CAAA;IACtC,uEAAyD,CAAA;IACzD,iDAAwB,IAAI,CAAC,GAAG,EAAE,2BAAA,CAAA;IAClC,uEAAsB,CAAA;AACxB,CAAC,EATW,UAAU,0BAAV,UAAU,QASrB;AAED,kBAAkB;AACL,QAAA,WAAW,GAAG;IACzB,MAAM,EAAE,GAAG;IACX,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC;IAC1D,eAAe,EAAE,CAAC,cAAc,EAAE,eAAe,CAAC;IAClD,eAAe,EAAE,CAAC,gBAAgB,EAAE,kBAAkB,CAAC;IACvD,OAAO,EAAE,KAAK,EAAE,sBAAsB;IACtC,iBAAiB,EAAE,IAAI;CACxB,CAAC;AAEW,QAAA,UAAU,GAAW,cAAI,CAAC,OAAO,CAC5C,SAAS,EACT,uBAAuB,CACxB,CAAC;AAcF,SAAS;AACI,QAAA,eAAe,GAA0B;IACpD;QACE,SAAS,EAAE,aAAa;QACxB,WAAW,EAAE,uBAAuB;QACpC,KAAK,EAAE;YACL;gBACE,MAAM,EAAE,KAAK;gBACb,IAAI,EAAE,WAAW;gBACjB,WAAW,EAAE,2CAA2C;aACzD;YACD;gBACE,MAAM,EAAE,KAAK;gBACb,IAAI,EAAE,aAAa;g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ACF;YACD;gBACE,MAAM,EAAE,MAAM;gBACd,WAAW,EAAE,kDAAkD;gBAC/D,IAAI,EAAE,kEAAkE;gBACxE,OAAO,EAAE;oBACP,WAAW,EAAE,OAAO;iBACrB;aACF;SACF;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"keys.js","sourceRoot":"","sources":["../../../source/server/config/keys.ts"],"names":[],"mappings":";;;;;;AAAA,uDAAuD;AACvD,gDAAwB;AAExB,IAAY,UASX;AATD,WAAY,UAAU;IACpB,+CAAY,CAAA;IACZ,mCAAqB,CAAA;IACrB,wCAA0B,CAAA;IAC1B,kDAAoC,CAAA;IACpC,oDAAsC,CAAA;IACtC,uEAAyD,CAAA;IACzD,iDAAwB,IAAI,CAAC,GAAG,EAAE,2BAAA,CAAA;IAClC,uEAAsB,CAAA;AACxB,CAAC,EATW,UAAU,0BAAV,UAAU,QASrB;AAED,kBAAkB;AACL,QAAA,WAAW,GAAG;IACzB,MAAM,EAAE,GAAG;IACX,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC;IAC1D,eAAe,EAAE,CAAC,cAAc,EAAE,eAAe,CAAC;IAClD,eAAe,EAAE,CAAC,gBAAgB,EAAE,kBAAkB,CAAC;IACvD,OAAO,EAAE,KAAK,EAAE,sBAAsB;IACtC,iBAAiB,EAAE,IAAI;CACxB,CAAC;AAEW,QAAA,UAAU,GAAW,cAAI,CAAC,OAAO,CAC5C,SAAS,EACT,uBAAuB,CACxB,CAAC;AAcF,SAAS;AACI,QAAA,eAAe,GAA0B;IACpD;QACE,SAAS,EAAE,aAAa;QACxB,WAAW,EAAE,uBAAuB;QACpC,KAAK,EAAE;YACL;gBACE,MAAM,EAAE,KAAK;gBACb,IAAI,EAAE,WAAW;gBACjB,WAAW,EAAE,2CAA2C;aACzD;YACD;gBACE,MAAM,EAAE,KAAK;gBACb,IAAI,EAAE,aAAa;gBACnB,WAAW,EAAE,+CAA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,MAAM;gBACd,WAAW,EACT,gFAAgF;gBAClF,IAAI,EAAE,kEAAkE;gBACxE,OAAO,EAAE;oBACP,WAAW,EAAE,OAAO;iBACrB;aACF;SACF;KACF;CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axiodb",
3
- "version": "2.30.84",
3
+ "version": "2.30.86",
4
4
  "description": "A blazing-fast, lightweight, and scalable nodejs package based DBMS for modern application. Supports schemas, encryption, and advanced query capabilities.",
5
5
  "main": "./lib/config/DB.js",
6
6
  "types": "./lib/config/DB.d.ts",
package/Docker/Dockerfile DELETED
@@ -1,20 +0,0 @@
1
- # Use a specific version of Node.js Alpine with SHA digest
2
- FROM node:alpine
3
-
4
- # Set working directory
5
- WORKDIR /app
6
-
7
- # Copy the runner.js file
8
- COPY runner.js .
9
-
10
- # Copy lib folder with proper directory structure
11
- COPY lib/ ./lib/
12
-
13
- # Copy package.json and package-lock.json
14
- COPY package*.json ./
15
-
16
- # Install dependencies
17
- RUN npm install --force
18
-
19
- # Set the command to run the runner.js file
20
- CMD ["node", "runner.js"]
package/Docker/README.md DELETED
@@ -1,283 +0,0 @@
1
- # AxioDB Docker Image
2
-
3
- [![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white)](https://docker.com/)
4
- [![AxioDB](https://img.shields.io/badge/AxioDB-2.29.82-blue?style=for-the-badge)](https://www.npmjs.com/package/axiodb)
5
-
6
- This Docker image provides a REST API server for AxioDB, allowing you to interact with the AxioDB database management system through HTTP requests. The container includes a web-based GUI dashboard for visual database management and comprehensive API endpoints for programmatic access.
7
-
8
- ## =� What's Included
9
-
10
- - **REST API Server**: Full HTTP API for database operations
11
- - **Web GUI Dashboard**: Browser-based interface at `http://localhost:27018`
12
- - **API Documentation**: Interactive API reference at `http://localhost:27018/api`
13
- - **AxioDB Core**: Complete database management system
14
- - **Auto-start Configuration**: Ready-to-use setup with minimal configuration
15
-
16
- ## =� Quick Start
17
-
18
- ### Running the Container
19
-
20
- ```bash
21
- # Pull and run the AxioDB Docker container
22
- docker run -d \
23
- --name axiodb-server \
24
- -p 27018:27018 \
25
- <your-docker-image-name>
26
- ```
27
-
28
- ### Custom Port Mapping
29
-
30
- ```bash
31
- # Run on a different host port (e.g., 8080)
32
- docker run -d \
33
- --name axiodb-server \
34
- -p 8080:27018 \
35
- <your-docker-image-name>
36
-
37
- # Access via http://localhost:8080
38
- ```
39
-
40
- ### With Data Persistence
41
-
42
- ```bash
43
- # Mount a volume to persist data
44
- docker run -d \
45
- --name axiodb-server \
46
- -p 27018:27018 \
47
- -v axiodb-data:/app/AxioDB \
48
- <your-docker-image-name>
49
- ```
50
-
51
- ## < Accessing the Services
52
-
53
- Once the container is running:
54
-
55
- ### Web GUI Dashboard
56
- - **URL**: `http://localhost:27018`
57
- - **Description**: Interactive web interface for managing databases, collections, and documents
58
- - **Features**:
59
- - Database creation and management
60
- - Collection operations with schema validation
61
- - Document CRUD operations
62
- - Real-time statistics and monitoring
63
-
64
- ### API Documentation
65
- - **URL**: `http://localhost:27018/api`
66
- - **Description**: Complete REST API reference with examples
67
- - **Features**:
68
- - Interactive API explorer
69
- - Request/response examples
70
- - Authentication details
71
- - Endpoint documentation
72
-
73
- ### REST API Endpoints
74
- - **Base URL**: `http://localhost:27018/api`
75
- - **Content-Type**: `application/json`
76
- - **Available Operations**:
77
- - Database management (`/api/database/*`)
78
- - Collection operations (`/api/collection/*`)
79
- - Document CRUD (`/api/operation/*`)
80
- - Statistics and monitoring (`/api/stats/*`)
81
-
82
- ## =� For Node.js Developers
83
-
84
- ### Recommended: Use AxioDB NPM Package
85
-
86
- If you're building a **Node.js application**, we highly recommend using the official **AxioDB NPM package** instead of the Docker REST API for better performance and direct integration:
87
-
88
- ```bash
89
- npm install axiodb@latest --save
90
- ```
91
-
92
- **Benefits of the NPM package over Docker API:**
93
- - **Better Performance**: Direct in-process database operations
94
- - **No Network Overhead**: Eliminate HTTP request latency
95
- - **Type Safety**: Full TypeScript support with IntelliSense
96
- - **Advanced Features**: Access to all AxioDB features including encryption, caching, and aggregation
97
- - **Easier Development**: No need to manage Docker containers during development
98
-
99
- #### NPM Package Usage Example
100
-
101
- ```javascript
102
- const { AxioDB, SchemaTypes } = require("axiodb");
103
-
104
- // Create a single AxioDB instance
105
- const db = new AxioDB();
106
-
107
- const main = async () => {
108
- // Create database and collection
109
- const database = await db.createDB("myApp");
110
- const collection = await database.createCollection("users", true, {
111
- name: SchemaTypes.string().required(),
112
- email: SchemaTypes.string().required().email(),
113
- age: SchemaTypes.number().min(0).max(120)
114
- });
115
-
116
- // Insert document
117
- const result = await collection.insert({
118
- name: "John Doe",
119
- email: "john@example.com",
120
- age: 30
121
- });
122
-
123
- console.log(result);
124
- };
125
-
126
- main();
127
- ```
128
-
129
- ### When to Use Docker vs NPM Package
130
-
131
- | Use Case | Docker API | NPM Package |
132
- |----------|------------|-------------|
133
- | **Node.js Applications** | L Not recommended |  **Recommended** |
134
- | **Microservices Architecture** |  Good choice | � Consider service boundaries |
135
- | **Non-Node.js Applications** |  **Recommended** | L Not available |
136
- | **Development/Prototyping** |  Quick setup |  Better performance |
137
- | **Production Deployment** | � Network overhead |  **Recommended** |
138
-
139
- ## =' Configuration
140
-
141
- ### Environment Variables
142
-
143
- ```bash
144
- docker run -d \
145
- --name axiodb-server \
146
- -p 27018:27018 \
147
- -e AXIODB_PORT=27018 \
148
- -e AXIODB_HOST=0.0.0.0 \
149
- <your-docker-image-name>
150
- ```
151
-
152
- ### Docker Compose
153
-
154
- ```yaml
155
- version: '3.8'
156
-
157
- services:
158
- axiodb:
159
- image: <your-docker-image-name>
160
- container_name: axiodb-server
161
- ports:
162
- - "27018:27018"
163
- volumes:
164
- - axiodb-data:/app/AxioDB
165
- restart: unless-stopped
166
-
167
- volumes:
168
- axiodb-data:
169
- ```
170
-
171
- ## =� API Examples
172
-
173
- ### Create Database
174
-
175
- ```bash
176
- curl -X POST http://localhost:27018/api/database/create \
177
- -H "Content-Type: application/json" \
178
- -d '{"name": "myDatabase"}'
179
- ```
180
-
181
- ### Create Collection
182
-
183
- ```bash
184
- curl -X POST http://localhost:27018/api/collection/create \
185
- -H "Content-Type: application/json" \
186
- -d '{
187
- "database": "myDatabase",
188
- "name": "users",
189
- "schema": {
190
- "name": {"type": "string", "required": true},
191
- "email": {"type": "string", "required": true}
192
- }
193
- }'
194
- ```
195
-
196
- ### Insert Document
197
-
198
- ```bash
199
- curl -X POST http://localhost:27018/api/operation/insert \
200
- -H "Content-Type: application/json" \
201
- -d '{
202
- "database": "myDatabase",
203
- "collection": "users",
204
- "data": {
205
- "name": "John Doe",
206
- "email": "john@example.com"
207
- }
208
- }'
209
- ```
210
-
211
- ### Query Documents
212
-
213
- ```bash
214
- curl -X POST http://localhost:27018/api/operation/query \
215
- -H "Content-Type: application/json" \
216
- -d '{
217
- "database": "myDatabase",
218
- "collection": "users",
219
- "query": {"name": "John Doe"},
220
- "limit": 10
221
- }'
222
- ```
223
-
224
- ## =3 Building from Source
225
-
226
- If you want to build the Docker image yourself:
227
-
228
- ```bash
229
- # Clone the repository
230
- git clone https://github.com/AnkanSaha/AxioDB.git
231
- cd AxioDB/Docker
232
-
233
- # Build the Docker image
234
- docker build -t axiodb:latest .
235
-
236
- # Run the container
237
- docker run -d --name axiodb-server -p 27018:27018 axiodb:latest
238
- ```
239
-
240
- ## =
241
  Troubleshooting
242
-
243
- ### Container Won't Start
244
- ```bash
245
- # Check container logs
246
- docker logs axiodb-server
247
-
248
- # Check if port is already in use
249
- netstat -tulpn | grep :27018
250
- ```
251
-
252
- ### Port Already in Use
253
- ```bash
254
- # Use a different port
255
- docker run -d --name axiodb-server -p 8080:27018 <your-docker-image-name>
256
- ```
257
-
258
- ### Data Persistence Issues
259
- ```bash
260
- # Ensure proper volume mounting
261
- docker run -d \
262
- --name axiodb-server \
263
- -p 27018:27018 \
264
- -v "$(pwd)/axiodb-data":/app/AxioDB \
265
- <your-docker-image-name>
266
- ```
267
-
268
- ## =� Additional Resources
269
-
270
- - **Official Documentation**: [https://axiodb.site/](https://axiodb.site/)
271
- - **NPM Package**: [https://www.npmjs.com/package/axiodb](https://www.npmjs.com/package/axiodb)
272
- - **GitHub Repository**: [https://github.com/AnkanSaha/AxioDB](https://github.com/AnkanSaha/AxioDB)
273
- - **API Reference**: Access via `http://localhost:27018/api` when container is running
274
-
275
- ## > Support
276
-
277
- For support and questions:
278
- - Open an issue on [GitHub](https://github.com/AnkanSaha/AxioDB/issues)
279
- - Check the [documentation](https://axiodb.site/)
280
- - Visit the API reference at `http://localhost:27018/api`
281
-
282
- ---
283
-
284
- **Note**: This Docker image is designed for development, testing, and small-scale production use. For high-performance Node.js applications, consider using the AxioDB NPM package directly for optimal performance.
package/Docker/runner.js DELETED
@@ -1,3 +0,0 @@
1
- const { AxioDB } = require('./lib/config/DB.js')
2
-
3
- new AxioDB()