-
Notifications
You must be signed in to change notification settings - Fork 4
Add strongly-typed aggregate result models and public API enhancements #265
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
Merged
Conversation
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
Summary - Weaviate C# Client CoverageSummary
CoverageWeaviate.Client - 60.9%
Weaviate.Client.Analyzers - 0%
|
bcb24aa to
9339d6a
Compare
- Introduced `AggregateResult<T>` and `AggregateGroupByResult<T>` for strongly-typed aggregate results. - Implemented mapping from untyped aggregate results to typed results in `TypedResultConverter`. - Added methods to extract aggregate metrics from types using `MetricsExtractor`. - Updated `TypedCollectionClient` documentation to clarify usage of aggregate operations. - Enhanced public API documentation to include new aggregate result types and methods.
…gregate and Weaviate.Client.Models.Typed namespaces
b8771a2 to
24eae37
Compare
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 adds strongly-typed aggregate result accessors and a
ToTyped<T>()extension method for mapping aggregation results to custom types, along with a Roslyn analyzer to validate suffix-based property mappings at compile time.Features
Typed accessor methods on
AggregateResultandAggregateGroupByResult.Group:Text(),Integer(),Number(),Boolean(),Date()TryGetText(),TryGetInteger(), etc.Match()andProperty<T>()for flexible type handlingToTyped<T>()extension method for mapping aggregate results to POCOs:Aggregate.*types (e.g.,Aggregate.Number? Price)double? PriceMean,long? QuantitySum)MetricsExtractor.FromType<T>()to automatically generatereturnMetricsfrom a type definition, ensuring the query and result mapping stay in syncRoslyn analyzer (WEAVIATE002, WEAVIATE003) that validates types at
ToTyped<T>()andMetricsExtractor.FromType<T>()call sites:string TitleSum)Example