BREAKING CHANGE(core): replace the TypeScript database engine with a Rust-backed embedded server and bridge
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
use bson::{doc, Document};
|
||||
|
||||
use crate::context::CommandContext;
|
||||
use crate::error::CommandResult;
|
||||
|
||||
/// Handle `hello`, `ismaster`, and `isMaster` commands.
|
||||
///
|
||||
/// Returns server capabilities matching wire protocol expectations.
|
||||
pub async fn handle(
|
||||
_cmd: &Document,
|
||||
_db: &str,
|
||||
_ctx: &CommandContext,
|
||||
) -> CommandResult<Document> {
|
||||
Ok(doc! {
|
||||
"ismaster": true,
|
||||
"isWritablePrimary": true,
|
||||
"maxBsonObjectSize": 16_777_216_i32,
|
||||
"maxMessageSizeBytes": 48_000_000_i32,
|
||||
"maxWriteBatchSize": 100_000_i32,
|
||||
"localTime": bson::DateTime::now(),
|
||||
"logicalSessionTimeoutMinutes": 30_i32,
|
||||
"connectionId": 1_i32,
|
||||
"minWireVersion": 0_i32,
|
||||
"maxWireVersion": 21_i32,
|
||||
"readOnly": false,
|
||||
"ok": 1.0,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user