@push.rocks/smartmongo 2.1.0 β 2.2.0
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_ts/00_commitinfo_data.js +1 -1
- package/package.json +1 -1
- package/readme.md +398 -44
- package/ts/00_commitinfo_data.ts +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@push.rocks/smartmongo',
|
|
6
|
-
version: '2.
|
|
6
|
+
version: '2.2.0',
|
|
7
7
|
description: 'A module for creating and managing a local MongoDB instance for testing purposes.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLG1GQUFtRjtDQUNqRyxDQUFBIn0=
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,104 +1,458 @@
|
|
|
1
1
|
# @push.rocks/smartmongo
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A powerful MongoDB toolkit for testing and development β featuring both a real MongoDB memory server (**SmartMongo**) and an ultra-fast, lightweight wire-protocol-compatible in-memory database server (**CongoDB**). π
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
-
To start using @push.rocks/smartmongo in your project, you first need to install it via npm. You can do this by running the following command in your terminal:
|
|
8
|
-
|
|
9
7
|
```bash
|
|
10
8
|
npm install @push.rocks/smartmongo --save-dev
|
|
9
|
+
# or
|
|
10
|
+
pnpm add -D @push.rocks/smartmongo
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Issue Reporting and Security
|
|
14
|
+
|
|
15
|
+
For reporting bugs, issues, or security vulnerabilities, please visit [community.foss.global/](https://community.foss.global/). This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a [code.foss.global/](https://code.foss.global/) account to submit Pull Requests directly.
|
|
16
|
+
|
|
17
|
+
## Overview
|
|
18
|
+
|
|
19
|
+
`@push.rocks/smartmongo` provides two powerful approaches for MongoDB in testing and development:
|
|
20
|
+
|
|
21
|
+
| Feature | SmartMongo | CongoDB |
|
|
22
|
+
|---------|------------|---------|
|
|
23
|
+
| **Type** | Real MongoDB (memory server) | Pure TypeScript wire protocol server |
|
|
24
|
+
| **Speed** | ~2-5s startup | β‘ Instant startup (~5ms) |
|
|
25
|
+
| **Compatibility** | 100% MongoDB | MongoDB driver compatible |
|
|
26
|
+
| **Dependencies** | Downloads MongoDB binary | Zero external dependencies |
|
|
27
|
+
| **Replication** | β
Full replica set support | Single node emulation |
|
|
28
|
+
| **Use Case** | Integration testing | Unit testing, CI/CD |
|
|
29
|
+
| **Persistence** | Dump to directory | Optional file/memory persistence |
|
|
30
|
+
|
|
31
|
+
## π Quick Start
|
|
32
|
+
|
|
33
|
+
### Option 1: SmartMongo (Real MongoDB)
|
|
34
|
+
|
|
35
|
+
Spin up a real MongoDB replica set in memory β perfect for integration tests that need full MongoDB compatibility.
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
import { SmartMongo } from '@push.rocks/smartmongo';
|
|
39
|
+
|
|
40
|
+
// Start a MongoDB replica set
|
|
41
|
+
const mongo = await SmartMongo.createAndStart();
|
|
42
|
+
|
|
43
|
+
// Get connection details
|
|
44
|
+
const descriptor = await mongo.getMongoDescriptor();
|
|
45
|
+
console.log(descriptor.mongoDbUrl); // mongodb://127.0.0.1:xxxxx/...
|
|
46
|
+
|
|
47
|
+
// Use with your MongoDB client or ORM
|
|
48
|
+
// ... run your tests ...
|
|
49
|
+
|
|
50
|
+
// Clean up
|
|
51
|
+
await mongo.stop();
|
|
11
52
|
```
|
|
12
53
|
|
|
13
|
-
|
|
54
|
+
### Option 2: CongoDB (Wire Protocol Server)
|
|
55
|
+
|
|
56
|
+
A lightweight, pure TypeScript MongoDB-compatible server that speaks the wire protocol β use the official `mongodb` driver directly!
|
|
14
57
|
|
|
15
|
-
|
|
58
|
+
```typescript
|
|
59
|
+
import { congodb } from '@push.rocks/smartmongo';
|
|
60
|
+
import { MongoClient } from 'mongodb';
|
|
61
|
+
|
|
62
|
+
// Start CongoDB server
|
|
63
|
+
const server = new congodb.CongoServer({ port: 27017 });
|
|
64
|
+
await server.start();
|
|
65
|
+
|
|
66
|
+
// Connect with the official MongoDB driver!
|
|
67
|
+
const client = new MongoClient('mongodb://127.0.0.1:27017');
|
|
68
|
+
await client.connect();
|
|
16
69
|
|
|
17
|
-
|
|
70
|
+
// Use exactly like real MongoDB
|
|
71
|
+
const db = client.db('myapp');
|
|
72
|
+
await db.collection('users').insertOne({ name: 'Alice', age: 30 });
|
|
73
|
+
|
|
74
|
+
const user = await db.collection('users').findOne({ name: 'Alice' });
|
|
75
|
+
console.log(user); // { _id: ObjectId(...), name: 'Alice', age: 30 }
|
|
76
|
+
|
|
77
|
+
// Clean up
|
|
78
|
+
await client.close();
|
|
79
|
+
await server.stop();
|
|
80
|
+
```
|
|
18
81
|
|
|
19
|
-
|
|
82
|
+
## π SmartMongo API
|
|
20
83
|
|
|
21
|
-
|
|
84
|
+
### Creating an Instance
|
|
22
85
|
|
|
23
86
|
```typescript
|
|
24
87
|
import { SmartMongo } from '@push.rocks/smartmongo';
|
|
88
|
+
|
|
89
|
+
// Default: single replica
|
|
90
|
+
const mongo = await SmartMongo.createAndStart();
|
|
91
|
+
|
|
92
|
+
// Multiple replicas for testing replication
|
|
93
|
+
const mongo = await SmartMongo.createAndStart(3);
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Getting Connection Details
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
const descriptor = await mongo.getMongoDescriptor();
|
|
100
|
+
// {
|
|
101
|
+
// mongoDbName: 'smartmongo_testdatabase',
|
|
102
|
+
// mongoDbUrl: 'mongodb://127.0.0.1:xxxxx/?replicaSet=testset'
|
|
103
|
+
// }
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Stopping & Cleanup
|
|
107
|
+
|
|
108
|
+
```typescript
|
|
109
|
+
// Simple stop (data discarded)
|
|
110
|
+
await mongo.stop();
|
|
111
|
+
|
|
112
|
+
// Stop and dump data to disk for inspection
|
|
113
|
+
await mongo.stopAndDumpToDir('./test-data');
|
|
114
|
+
|
|
115
|
+
// With custom file naming
|
|
116
|
+
await mongo.stopAndDumpToDir('./test-data', (doc) => `${doc.collection}-${doc._id}.bson`);
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## π§ CongoDB API
|
|
120
|
+
|
|
121
|
+
### Server Configuration
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
import { congodb } from '@push.rocks/smartmongo';
|
|
125
|
+
|
|
126
|
+
const server = new congodb.CongoServer({
|
|
127
|
+
port: 27017, // Default MongoDB port
|
|
128
|
+
host: '127.0.0.1', // Bind address
|
|
129
|
+
storage: 'memory', // 'memory' or 'file'
|
|
130
|
+
storagePath: './data', // For file-based storage
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
await server.start();
|
|
134
|
+
console.log(server.getConnectionUri()); // mongodb://127.0.0.1:27017
|
|
135
|
+
|
|
136
|
+
// Server properties
|
|
137
|
+
console.log(server.running); // true
|
|
138
|
+
console.log(server.getUptime()); // seconds
|
|
139
|
+
console.log(server.getConnectionCount()); // active connections
|
|
140
|
+
|
|
141
|
+
await server.stop();
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Supported MongoDB Operations
|
|
145
|
+
|
|
146
|
+
CongoDB supports the core MongoDB operations via the wire protocol:
|
|
147
|
+
|
|
148
|
+
#### πΉ CRUD Operations
|
|
149
|
+
```typescript
|
|
150
|
+
// Insert
|
|
151
|
+
await collection.insertOne({ name: 'Bob' });
|
|
152
|
+
await collection.insertMany([{ a: 1 }, { a: 2 }]);
|
|
153
|
+
|
|
154
|
+
// Find
|
|
155
|
+
const doc = await collection.findOne({ name: 'Bob' });
|
|
156
|
+
const docs = await collection.find({ age: { $gte: 18 } }).toArray();
|
|
157
|
+
|
|
158
|
+
// Update
|
|
159
|
+
await collection.updateOne({ name: 'Bob' }, { $set: { age: 25 } });
|
|
160
|
+
await collection.updateMany({ active: false }, { $set: { archived: true } });
|
|
161
|
+
|
|
162
|
+
// Delete
|
|
163
|
+
await collection.deleteOne({ name: 'Bob' });
|
|
164
|
+
await collection.deleteMany({ archived: true });
|
|
165
|
+
|
|
166
|
+
// Replace
|
|
167
|
+
await collection.replaceOne({ _id: id }, { name: 'New Bob', age: 30 });
|
|
168
|
+
|
|
169
|
+
// Find and Modify
|
|
170
|
+
const result = await collection.findOneAndUpdate(
|
|
171
|
+
{ name: 'Bob' },
|
|
172
|
+
{ $inc: { visits: 1 } },
|
|
173
|
+
{ returnDocument: 'after' }
|
|
174
|
+
);
|
|
25
175
|
```
|
|
26
176
|
|
|
27
|
-
|
|
177
|
+
#### πΉ Query Operators
|
|
178
|
+
```typescript
|
|
179
|
+
// Comparison
|
|
180
|
+
{ age: { $eq: 25 } }
|
|
181
|
+
{ age: { $ne: 25 } }
|
|
182
|
+
{ age: { $gt: 18, $lt: 65 } }
|
|
183
|
+
{ age: { $gte: 18, $lte: 65 } }
|
|
184
|
+
{ status: { $in: ['active', 'pending'] } }
|
|
185
|
+
{ status: { $nin: ['deleted'] } }
|
|
186
|
+
|
|
187
|
+
// Logical
|
|
188
|
+
{ $and: [{ age: { $gte: 18 } }, { active: true }] }
|
|
189
|
+
{ $or: [{ status: 'active' }, { admin: true }] }
|
|
190
|
+
{ $not: { status: 'deleted' } }
|
|
191
|
+
|
|
192
|
+
// Element
|
|
193
|
+
{ email: { $exists: true } }
|
|
194
|
+
{ type: { $type: 'string' } }
|
|
195
|
+
|
|
196
|
+
// Array
|
|
197
|
+
{ tags: { $all: ['mongodb', 'database'] } }
|
|
198
|
+
{ scores: { $elemMatch: { $gte: 80, $lt: 90 } } }
|
|
199
|
+
{ tags: { $size: 3 } }
|
|
200
|
+
```
|
|
28
201
|
|
|
29
|
-
|
|
202
|
+
#### πΉ Update Operators
|
|
203
|
+
```typescript
|
|
204
|
+
{ $set: { name: 'New Name' } }
|
|
205
|
+
{ $unset: { tempField: '' } }
|
|
206
|
+
{ $inc: { count: 1 } }
|
|
207
|
+
{ $mul: { price: 1.1 } }
|
|
208
|
+
{ $min: { lowScore: 50 } }
|
|
209
|
+
{ $max: { highScore: 100 } }
|
|
210
|
+
{ $push: { tags: 'new-tag' } }
|
|
211
|
+
{ $pull: { tags: 'old-tag' } }
|
|
212
|
+
{ $addToSet: { tags: 'unique-tag' } }
|
|
213
|
+
{ $pop: { queue: 1 } } // Remove last
|
|
214
|
+
{ $pop: { queue: -1 } } // Remove first
|
|
215
|
+
```
|
|
30
216
|
|
|
217
|
+
#### πΉ Aggregation Pipeline
|
|
31
218
|
```typescript
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
219
|
+
const results = await collection.aggregate([
|
|
220
|
+
{ $match: { status: 'active' } },
|
|
221
|
+
{ $group: { _id: '$category', total: { $sum: '$amount' } } },
|
|
222
|
+
{ $sort: { total: -1 } },
|
|
223
|
+
{ $limit: 10 },
|
|
224
|
+
{ $project: { category: '$_id', total: 1, _id: 0 } }
|
|
225
|
+
]).toArray();
|
|
226
|
+
```
|
|
36
227
|
|
|
37
|
-
|
|
228
|
+
Supported stages: `$match`, `$project`, `$group`, `$sort`, `$limit`, `$skip`, `$unwind`, `$lookup`, `$addFields`, `$count`, `$facet`, and more.
|
|
229
|
+
|
|
230
|
+
#### πΉ Index Operations
|
|
231
|
+
```typescript
|
|
232
|
+
await collection.createIndex({ email: 1 }, { unique: true });
|
|
233
|
+
await collection.createIndex({ name: 1, age: -1 });
|
|
234
|
+
const indexes = await collection.listIndexes().toArray();
|
|
235
|
+
await collection.dropIndex('email_1');
|
|
38
236
|
```
|
|
39
237
|
|
|
40
|
-
|
|
238
|
+
#### πΉ Database Operations
|
|
239
|
+
```typescript
|
|
240
|
+
// List databases
|
|
241
|
+
const dbs = await client.db().admin().listDatabases();
|
|
242
|
+
|
|
243
|
+
// List collections
|
|
244
|
+
const collections = await db.listCollections().toArray();
|
|
41
245
|
|
|
42
|
-
|
|
246
|
+
// Create/drop collections
|
|
247
|
+
await db.createCollection('newcollection');
|
|
248
|
+
await db.dropCollection('oldcollection');
|
|
43
249
|
|
|
44
|
-
|
|
250
|
+
// Drop database
|
|
251
|
+
await db.dropDatabase();
|
|
252
|
+
```
|
|
45
253
|
|
|
254
|
+
#### πΉ Count & Distinct
|
|
46
255
|
```typescript
|
|
47
|
-
|
|
48
|
-
|
|
256
|
+
// Count documents
|
|
257
|
+
const total = await collection.countDocuments({});
|
|
258
|
+
const active = await collection.countDocuments({ status: 'active' });
|
|
259
|
+
const estimated = await collection.estimatedDocumentCount();
|
|
260
|
+
|
|
261
|
+
// Distinct values
|
|
262
|
+
const departments = await collection.distinct('department');
|
|
263
|
+
const activeDepts = await collection.distinct('department', { status: 'active' });
|
|
49
264
|
```
|
|
50
265
|
|
|
51
|
-
|
|
266
|
+
#### πΉ Bulk Operations
|
|
267
|
+
```typescript
|
|
268
|
+
const result = await collection.bulkWrite([
|
|
269
|
+
{ insertOne: { document: { name: 'Bulk1' } } },
|
|
270
|
+
{ updateOne: { filter: { name: 'John' }, update: { $set: { bulk: true } } } },
|
|
271
|
+
{ deleteOne: { filter: { name: 'Expired' } } },
|
|
272
|
+
{ replaceOne: { filter: { _id: id }, replacement: { name: 'Replaced' } } }
|
|
273
|
+
]);
|
|
274
|
+
|
|
275
|
+
console.log(result.insertedCount); // 1
|
|
276
|
+
console.log(result.modifiedCount); // 1
|
|
277
|
+
console.log(result.deletedCount); // 1
|
|
278
|
+
```
|
|
52
279
|
|
|
53
|
-
|
|
280
|
+
### Storage Adapters
|
|
54
281
|
|
|
55
|
-
|
|
282
|
+
CongoDB supports pluggable storage:
|
|
56
283
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
284
|
+
```typescript
|
|
285
|
+
// In-memory (default) - fast, data lost on stop
|
|
286
|
+
const server = new congodb.CongoServer({ storage: 'memory' });
|
|
287
|
+
|
|
288
|
+
// In-memory with persistence - periodic snapshots to disk
|
|
289
|
+
const server = new congodb.CongoServer({
|
|
290
|
+
storage: 'memory',
|
|
291
|
+
persistPath: './data/snapshot.json',
|
|
292
|
+
persistIntervalMs: 30000 // Save every 30 seconds
|
|
293
|
+
});
|
|
60
294
|
|
|
61
|
-
|
|
295
|
+
// File-based - persistent storage
|
|
296
|
+
const server = new congodb.CongoServer({
|
|
297
|
+
storage: 'file',
|
|
298
|
+
storagePath: './data/congodb'
|
|
299
|
+
});
|
|
300
|
+
```
|
|
62
301
|
|
|
63
|
-
|
|
64
|
-
await myDbInstance.stopAndDumpToDir('./path/to/dump');
|
|
65
|
-
```
|
|
302
|
+
### π Supported Wire Protocol Commands
|
|
66
303
|
|
|
67
|
-
|
|
304
|
+
| Category | Commands |
|
|
305
|
+
|----------|----------|
|
|
306
|
+
| **Handshake** | `hello`, `isMaster` |
|
|
307
|
+
| **CRUD** | `find`, `insert`, `update`, `delete`, `findAndModify`, `getMore`, `killCursors` |
|
|
308
|
+
| **Aggregation** | `aggregate`, `count`, `distinct` |
|
|
309
|
+
| **Indexes** | `createIndexes`, `dropIndexes`, `listIndexes` |
|
|
310
|
+
| **Admin** | `ping`, `listDatabases`, `listCollections`, `drop`, `dropDatabase`, `create`, `serverStatus`, `buildInfo` |
|
|
68
311
|
|
|
69
|
-
|
|
312
|
+
CongoDB supports MongoDB wire protocol versions 0-21, compatible with MongoDB 3.6 through 7.0 drivers.
|
|
70
313
|
|
|
71
|
-
|
|
314
|
+
## π§ͺ Testing Examples
|
|
72
315
|
|
|
73
|
-
|
|
316
|
+
### Jest/Mocha with CongoDB
|
|
74
317
|
|
|
75
318
|
```typescript
|
|
76
|
-
|
|
77
|
-
|
|
319
|
+
import { congodb } from '@push.rocks/smartmongo';
|
|
320
|
+
import { MongoClient } from 'mongodb';
|
|
321
|
+
|
|
322
|
+
let server: congodb.CongoServer;
|
|
323
|
+
let client: MongoClient;
|
|
324
|
+
let db: Db;
|
|
325
|
+
|
|
326
|
+
beforeAll(async () => {
|
|
327
|
+
server = new congodb.CongoServer({ port: 27117 });
|
|
328
|
+
await server.start();
|
|
329
|
+
|
|
330
|
+
client = new MongoClient('mongodb://127.0.0.1:27117');
|
|
331
|
+
await client.connect();
|
|
332
|
+
db = client.db('test');
|
|
333
|
+
});
|
|
334
|
+
|
|
335
|
+
afterAll(async () => {
|
|
336
|
+
await client.close();
|
|
337
|
+
await server.stop();
|
|
338
|
+
});
|
|
339
|
+
|
|
340
|
+
beforeEach(async () => {
|
|
341
|
+
// Clean slate for each test
|
|
342
|
+
await db.dropDatabase();
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
test('should insert and find user', async () => {
|
|
346
|
+
const users = db.collection('users');
|
|
347
|
+
await users.insertOne({ name: 'Alice', email: 'alice@example.com' });
|
|
348
|
+
|
|
349
|
+
const user = await users.findOne({ name: 'Alice' });
|
|
350
|
+
expect(user?.email).toBe('alice@example.com');
|
|
78
351
|
});
|
|
79
352
|
```
|
|
80
353
|
|
|
81
|
-
|
|
354
|
+
### With @push.rocks/tapbundle
|
|
82
355
|
|
|
83
|
-
|
|
356
|
+
```typescript
|
|
357
|
+
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
|
358
|
+
import { congodb } from '@push.rocks/smartmongo';
|
|
359
|
+
import { MongoClient } from 'mongodb';
|
|
360
|
+
|
|
361
|
+
let server: congodb.CongoServer;
|
|
362
|
+
let client: MongoClient;
|
|
363
|
+
|
|
364
|
+
tap.test('setup', async () => {
|
|
365
|
+
server = new congodb.CongoServer({ port: 27117 });
|
|
366
|
+
await server.start();
|
|
367
|
+
client = new MongoClient('mongodb://127.0.0.1:27117');
|
|
368
|
+
await client.connect();
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
tap.test('should perform CRUD operations', async () => {
|
|
372
|
+
const db = client.db('test');
|
|
373
|
+
const col = db.collection('items');
|
|
84
374
|
|
|
85
|
-
|
|
375
|
+
// Create
|
|
376
|
+
const result = await col.insertOne({ name: 'Widget', price: 9.99 });
|
|
377
|
+
expect(result.insertedId).toBeTruthy();
|
|
378
|
+
|
|
379
|
+
// Read
|
|
380
|
+
const item = await col.findOne({ name: 'Widget' });
|
|
381
|
+
expect(item?.price).toEqual(9.99);
|
|
382
|
+
|
|
383
|
+
// Update
|
|
384
|
+
await col.updateOne({ name: 'Widget' }, { $set: { price: 12.99 } });
|
|
385
|
+
const updated = await col.findOne({ name: 'Widget' });
|
|
386
|
+
expect(updated?.price).toEqual(12.99);
|
|
387
|
+
|
|
388
|
+
// Delete
|
|
389
|
+
await col.deleteOne({ name: 'Widget' });
|
|
390
|
+
const deleted = await col.findOne({ name: 'Widget' });
|
|
391
|
+
expect(deleted).toBeNull();
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
tap.test('teardown', async () => {
|
|
395
|
+
await client.close();
|
|
396
|
+
await server.stop();
|
|
397
|
+
});
|
|
398
|
+
|
|
399
|
+
export default tap.start();
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
## ποΈ Architecture
|
|
403
|
+
|
|
404
|
+
### CongoDB Wire Protocol Stack
|
|
405
|
+
|
|
406
|
+
```
|
|
407
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
408
|
+
β Official MongoDB Driver β
|
|
409
|
+
β (mongodb npm) β
|
|
410
|
+
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
|
|
411
|
+
β TCP + OP_MSG/BSON
|
|
412
|
+
βΌ
|
|
413
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
414
|
+
β CongoServer β
|
|
415
|
+
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββββββ β
|
|
416
|
+
β β WireProtocol ββ βCommandRouter ββ β Handlers β β
|
|
417
|
+
β β (OP_MSG) β β β β (Find, Insert..) β β
|
|
418
|
+
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββββββ β
|
|
419
|
+
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
|
|
420
|
+
β
|
|
421
|
+
βΌ
|
|
422
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
423
|
+
β Engines β
|
|
424
|
+
β βββββββββββββ ββββββββββββββ ββββββββββββββ βββββββββββββ β
|
|
425
|
+
β β Query β β Update β βAggregation β β Index β β
|
|
426
|
+
β β Engine β β Engine β β Engine β β Engine β β
|
|
427
|
+
β βββββββββββββ ββββββββββββββ ββββββββββββββ βββββββββββββ β
|
|
428
|
+
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
|
|
429
|
+
β
|
|
430
|
+
βΌ
|
|
431
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
432
|
+
β Storage Adapters β
|
|
433
|
+
β ββββββββββββββββββββ ββββββββββββββββββββ β
|
|
434
|
+
β β MemoryStorage β β FileStorage β β
|
|
435
|
+
β ββββββββββββββββββββ ββββββββββββββββββββ β
|
|
436
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
437
|
+
```
|
|
86
438
|
|
|
87
439
|
## License and Legal Information
|
|
88
440
|
|
|
89
|
-
This repository contains open-source code
|
|
441
|
+
This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [LICENSE](./LICENSE) file.
|
|
90
442
|
|
|
91
443
|
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
|
|
92
444
|
|
|
93
445
|
### Trademarks
|
|
94
446
|
|
|
95
|
-
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein.
|
|
447
|
+
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.
|
|
448
|
+
|
|
449
|
+
Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.
|
|
96
450
|
|
|
97
451
|
### Company Information
|
|
98
452
|
|
|
99
|
-
Task Venture Capital GmbH
|
|
100
|
-
Registered at District
|
|
453
|
+
Task Venture Capital GmbH
|
|
454
|
+
Registered at District Court Bremen HRB 35230 HB, Germany
|
|
101
455
|
|
|
102
|
-
For any legal inquiries or
|
|
456
|
+
For any legal inquiries or further information, please contact us via email at hello@task.vc.
|
|
103
457
|
|
|
104
458
|
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
|