BREAKING CHANGE(core): replace the TypeScript database engine with a Rust-backed embedded server and bridge
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import * as plugins from './plugins.js';
|
||||
import * as crypto from 'crypto';
|
||||
import * as path from 'path';
|
||||
import * as os from 'os';
|
||||
@@ -10,7 +9,7 @@ import { SmartdbServer } from '../ts_smartdb/index.js';
|
||||
export interface ILocalSmartDbConnectionInfo {
|
||||
/** The Unix socket file path */
|
||||
socketPath: string;
|
||||
/** MongoDB connection URI ready for MongoClient */
|
||||
/** Connection URI (mongodb:// scheme) ready for MongoClient */
|
||||
connectionUri: string;
|
||||
}
|
||||
|
||||
@@ -25,8 +24,8 @@ export interface ILocalSmartDbOptions {
|
||||
* LocalSmartDb - Lightweight local MongoDB-compatible database using Unix sockets
|
||||
*
|
||||
* This class wraps SmartdbServer and provides a simple interface for
|
||||
* starting a local file-based MongoDB-compatible server. Returns connection
|
||||
* info that you can use with your own MongoDB driver instance.
|
||||
* starting a local file-based database server. Returns connection
|
||||
* info that you can use with any compatible driver instance.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
@@ -36,11 +35,11 @@ export interface ILocalSmartDbOptions {
|
||||
* const db = new LocalSmartDb({ folderPath: './data' });
|
||||
* const { connectionUri } = await db.start();
|
||||
*
|
||||
* // Connect with your own MongoDB client
|
||||
* // Connect with the driver
|
||||
* const client = new MongoClient(connectionUri, { directConnection: true });
|
||||
* await client.connect();
|
||||
*
|
||||
* // Use the MongoDB client
|
||||
* // Use the client
|
||||
* const collection = client.db('mydb').collection('users');
|
||||
* await collection.insertOne({ name: 'Alice' });
|
||||
*
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
import * as smartpromise from '@push.rocks/smartpromise';
|
||||
|
||||
export { smartpromise };
|
||||
// Local module plugins - currently no external dependencies needed
|
||||
|
||||
Reference in New Issue
Block a user