Repository navigation
feat(mongodb): add end-to-end MongoDB support with MQL workspace, visual aggregations, ER diagrams, migrations, and bulk operations - #92
Merged
Conversation
…query history - Step 1: Implement deterministic hybrid mongosh parser without JS eval - Tokenizer, AST parser, BSON EJSON v2 converter - Rejection of compound statements, assignments, and unsafe JavaScript - Step 2: Implement dual-mode results viewer and explain plan inspection - Collapsible JSON Tree (MongoTreeViewer) with BSON badges & node limit safeguards - Virtualized Document Table (DataTable with MongoDocumentCell) - Primitive metric cards for count and badged list/tree for distinct - Visual explain plan analysis (MongoExplainView) with COLLSCAN/IXSCAN warnings - Step 3: Implement privacy-first connection-scoped query history - Scoped storage under relwave_mql_history_\ with 50-entry FIFO - Default literal value redaction (<string>, <number>, <date>, <boolean>) - Mandatory template advisory for non-executable templates - Error message credential sanitization and zero document persistence - Step 4 & 5: Complete MongoWorkspacePanel integration & cross-phase audit - JSON and mongosh input mode switching with template synchronization - Direct mongosh AST to bridge RPC execution and explain pipelines - Active connection race guards and mutation cleanup on connection switch
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Yashh56
marked this pull request as ready for review
November 16, 2026 15:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces comprehensive, first-class MongoDB support to RelWave, expanding the platform beyond relational and columnar engines (PostgreSQL, MySQL, SQLite, DuckDB, ClickHouse) into document-oriented databases.
Implemented across 28 focused commits (~66k lines across 211 files), this feature set delivers a complete native experience: connection management, MQL query execution, visual aggregation pipelines, BSON fidelity, probabilistic schema intelligence, visual ER diagrams with layout persistence, declarative migration engine with distributed mutex locking, streaming bulk operations, and full Git status integration.
Key Features & Capabilities
1. Connection Topologies & Secure Lifecycle
mongodb://), Replica Sets (replicaSet=rs0), and MongoDB Atlas (mongodb+srv://).27017) and automatic Docker container detection for MongoDB instances.2. Strict BSON Fidelity & Extended JSON (EJSON)
ObjectId($oid)Date($date)Decimal128($numberDecimal)Long64-bit integers ($numberLong)Binary($binary)TimestampandRegex3. MQL Workspace & mongosh Parser
mongosh-compatible parser and tokenizer (db.collection.find(...),aggregate(...), etc.).executionStats, index usage, stage timings, documents examined vs. returned).AbortControllerand bridge timeout guards.4. Visual Aggregation Pipeline Builder
$match,$project,$group,$sort,$unwind,$lookup, and raw stage editor).5. Probabilistic Schema Intelligence
6. Visual ER Diagrams & Relationship Inference
<coll>_id), ObjectId targets, DBRefs, and embedded array references._id).x,y,width,height) and viewport coordinates (zoom,panX,panY) automatically persist to<projectDir>/diagrams/er.json, bypassing Dagre auto-layout on subsequent loads.7. Declarative MongoDB Migration Engine
YYYYMMDDHHMMSS_<name>.mql.json) containing steps:createCollection(with optional validator, collation, or capped size)createIndex/dropIndexcollMod(JSON Schema validation rules)renameCollectionbulkUpdate(data transformations)_relwave_migrations_lockwith heartbeat renewal and fencing tokens._relwave_migration_eventswith materialized summary projection in_relwave_migrations.8. Streaming Bulk Operations
updateMany,deleteMany) with preview validation and safety limits.9. Index Management
10. Production Safety & Guardrails
$out,$merge).$where,$function,$accumulator) in read-only and analytical query modes.11. Git Version Control & Project Integration
.gitignore, andREADME.md.diagrams/er.json), saved queries (queries/queries.json), and migration manifests (migrations/*.mql.json).Technical Stack & Architecture
mongodb^6.21.0queryHandlers,mongoBulkHandlers,mongoRelationshipHandlers,migrationHandlers.mongoVerification & Test Receipts
npx tsc --noEmitexit code0).npm run build(tsc && vite build) passed in 27.59s.bridge/__tests__/connectors/mongodb.test.tsbridge/__tests__/connectors/mongoMql.test.tsbridge/__tests__/connectors/mongoAggregation.test.tsbridge/__tests__/connectors/mongoDocuments.test.tsbridge/__tests__/connectors/mongoMutations.test.tsbridge/__tests__/connectors/mongoInferSchema.test.tsbridge/__tests__/connectors/mongoSecurity.test.tsbridge/__tests__/connectors/mongoBsonRoundTrip.test.tsbridge/__tests__/mongoBulkEngine.test.tsbridge/__tests__/mongoMigrationEngine.test.tssrc/features/mongodb/__tests__/MongoRelationships.test.tssrc/features/mongodb/__tests__/mongoshParser.test.tssrc/features/mongodb/__tests__/bsonParser.test.ts