Skip to content

feat(mongodb): visual Index Manager (#1028) - #1078

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1028-mongo-index-manager
Oct 5, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1028-mongo-index-manager

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #1028

Summary of Changes

  • MongoDB Service:
    • Added getIndexesWithStats retrieving collection indexes and augmenting them with on-disk index sizes from collStats.
    • Added createIndex supporting composite key directions (1, -1, text, 2dsphere), custom index name, unique, sparse, and expireAfterSeconds (TTL).
    • Added dropIndex with primary index guard (rejects dropping _id_).
  • Data Models:
    • Implemented MongoIndexInfo with metadata extraction, formatted keys, type badges (Primary, TTL, Text, Geospatial, Compound, Single Field), and readable size formatting.
  • UI:
    • Added MongoIndexesView with index list, badge indicators, on-disk size stats, refresh capability, and protected delete actions.
    • Added MongoCreateIndexDialog with interactive compound index builder, direction selectors, index options (Unique, Sparse), optional TTL input, and validation.
    • Integrated "Indexes" navigation button into MongoDocumentsView and breadcrumb routing in MongoExplorerView.
  • Testing:
    • Added unit tests in test/features/mongodb/mongo_index_info_test.dart.
    • Added widget tests in test/features/mongodb/mongo_indexes_view_test.dart covering index listing, primary key delete protection, drop confirmation, and index creation flows.

@github-actions github-actions Bot added enhancement New feature or request ui User interface components and widgets connections Database connections, URI parsing, pools backend Backend database driver execution and queries P2 Medium priority / Parity & Refactoring labels Oct 5, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 3c8dce2 into dev Oct 5, 2026
4 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/1028-mongo-index-manager branch October 5, 2026 11:38
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 connections Database connections, URI parsing, pools 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