Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for parsing, inspecting and autocompleting in a project stage written using Spring Data MongoDB INTELLIJ-173 #118

Merged
merged 10 commits into from
Jan 16, 2025

Conversation

himanshusinghs
Copy link
Contributor

@himanshusinghs himanshusinghs commented Jan 16, 2025

Description

Adds support for parsing, inspecting and autocompleting field names in a project stage written using Aggregation.project(), chained ProjectionOptions calls (only andInclude and andExclude) and their variants:

  • Aggregation.project("field")
  • Aggregation.project(Fields.fields("field"))
  • Aggregation.project(Fields.from(Fields.field("field")))
  • Aggregation.project().andInclude("field")
  • Aggregation.project().andInclude(Fields.fields("field"))
  • Aggregation.project().andInclude(Fields.from(Fields.field("field")))
  • Aggregation.project().andExclude("field")

Checklist

Open Questions

This PR splits the current aggregation parsing logic into dedicated

stage based parsers.

@github-actions github-actions bot added the feat label Jan 16, 2025
Copy link

github-actions bot commented Jan 16, 2025

Coverage Report

Overall Project 78.84% -0.15%
Files changed 91.54%

File Coverage
MatchStageParser.kt 98.18%
ProjectStageParser.kt 92.03% -7.97%
AggregationStagesParser.kt 89.24% -4.43%
SpringCriteriaDialectParser.kt 88.54% -0.15%

Copy link

🤖 Benchmark Comparison for Merge remote-tracking branch 'origin/main' into feat/INTELLIJ-173-spring-project

Benchmark Previous Current Change
com.mongodb.jbplugin.jmh.SampleBenchmark.init 2,619,840,805.24 ops/s 2,619,470,537.38 ops/s -0.01%

@github-actions github-actions bot added feat and removed feat labels Jan 16, 2025
Copy link

🤖 Benchmark Comparison for chore: added tests for field existence inspection

Benchmark Previous Current Change
com.mongodb.jbplugin.jmh.SampleBenchmark.init 2,619,840,805.24 ops/s 2,619,201,800.09 ops/s -0.02%

@github-actions github-actions bot added feat and removed feat labels Jan 16, 2025
@github-actions github-actions bot added feat and removed feat labels Jan 16, 2025
@himanshusinghs himanshusinghs marked this pull request as ready for review January 16, 2025 15:24
@github-actions github-actions bot added feat and removed feat labels Jan 16, 2025
Copy link

🤖 Benchmark Comparison for feat: AC support in project and chained calls

Benchmark Previous Current Change
com.mongodb.jbplugin.jmh.SampleBenchmark.init 2,619,840,805.24 ops/s 2,665,052,092.73 ops/s 1.73%

Copy link

🤖 Benchmark Comparison for chore: add CHANGELOG entry

Benchmark Previous Current Change
com.mongodb.jbplugin.jmh.SampleBenchmark.init 2,619,840,805.24 ops/s 2,664,210,723.46 ops/s 1.69%

@github-actions github-actions bot added feat and removed feat labels Jan 16, 2025
Copy link

🤖 Benchmark Comparison for chore: minor refactors

Benchmark Previous Current Change
com.mongodb.jbplugin.jmh.SampleBenchmark.init 2,619,840,805.24 ops/s 2,662,718,456.75 ops/s 1.64%

@himanshusinghs himanshusinghs merged commit 0c984ec into main Jan 16, 2025
11 checks passed
@himanshusinghs himanshusinghs deleted the feat/INTELLIJ-173-spring-project branch January 16, 2025 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants