Skip to content

feat(mongodb): Aggregation Pipeline Builder & Runner (#1027) - #1077

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1027-mongo-aggregation-pipeline
Oct 5, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1027-mongo-aggregation-pipeline

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #1027

Summary

  • MongoService: Stream documents via aggregateToStream(pipe) with fallback to cursor firstBatch / result array extraction to return raw result documents.
  • MongoAggregationStage: Data model for stages with operators ($match, $group, $project, $sort, $limit, $skip, $lookup, $unwind, $addFields, $count, etc.), templates, JSON/EJSON validator, and code exporter (MongoAggregationExporter) for mongosh, Node.js, and Python.
  • MongoAggregationWorkspace: Interactive visual & text stage builder supporting:
    • Add, remove, reorder (move up/down), duplicate, and enable/disable toggle for stages
    • Operator selection via QueryaDropdown with syntax validation and inline error banner
    • "Run up to here" per-stage execution and full pipeline execution with stopwatch execution metrics (docs count and ms)
    • Results preview in both Table Grid and JSON View
    • Export dialog with clipboard copy for mongosh, Node.js, and Python
  • Navigation Integration:
    • Added Aggregation button to MongoDocumentsView toolbar
    • Added _Level.aggregation breadcrumb support to MongoExplorerView
  • Tests:
    • Unit tests for stage validation, parsing, pipeline building, and code generation (test/features/mongodb/mongo_aggregation_stage_test.dart)
    • Full widget test suite for MongoAggregationWorkspace (test/features/mongodb/mongo_aggregation_workspace_test.dart)
    • All tests and architectural guards passed.

@github-actions github-actions Bot added enhancement New feature or request editor Code/SQL editor ui User interface components and widgets backend Backend database driver execution and queries P2 Medium priority / Parity & Refactoring labels Oct 5, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit e952b15 into dev Oct 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend database driver execution and queries editor Code/SQL editor enhancement New feature or request P2 Medium priority / Parity & Refactoring ui User interface components and widgets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant