Skip to content

Conversation

@kholdrex
Copy link
Owner

  • Add aggregation methods (count, sum, avg, min, max)
  • Add statistical functions (variance, stddev)
  • Add database-specific group_concat function
  • Add advanced stats() method for comprehensive column statistics
  • Add custom_aggregation() for custom SQL aggregations
  • Add convenient alias support for all aggregation methods
  • Add automatic alias sanitization for complex column names
  • Integrate aggregations seamlessly with existing query DSL
  • Add comprehensive test suite for all aggregation features
  • Update documentation with aggregation examples
  • Update RBS type definitions for new methods

- Add aggregation methods (count, sum, avg, min, max)
- Add statistical functions (variance, stddev)
- Add database-specific group_concat function
- Add advanced stats() method for comprehensive column statistics
- Add custom_aggregation() for custom SQL aggregations
- Add convenient alias support for all aggregation methods
- Add automatic alias sanitization for complex column names
- Integrate aggregations seamlessly with existing query DSL
- Add comprehensive test suite for all aggregation features
- Update documentation with aggregation examples
- Update RBS type definitions for new methods
Copilot AI review requested due to automatic review settings August 30, 2025 01:59
@kholdrex kholdrex added the enhancement New feature or request label Aug 30, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive aggregation support to SimpleQuery, enhancing the library with database-level aggregation functions that provide better performance and developer experience compared to loading full record sets for calculations.

Key changes:

  • Implements basic aggregation methods (count, sum, avg, min, max) and statistical functions (variance, stddev, group_concat)
  • Adds advanced aggregation features including a stats method for comprehensive column statistics and custom aggregation support
  • Integrates aggregations seamlessly with the existing query DSL, allowing chaining with other query methods

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/simple_query/clauses/aggregation_clause.rb Core aggregation functionality with database-specific implementations
lib/simple_query/builder.rb Integration of aggregations into the main query builder with fluent interface
spec/simple_query/clauses/aggregation_clause_spec.rb Comprehensive test coverage for aggregation clause functionality
spec/simple_query/builder_spec.rb Integration tests for aggregation methods within the query builder
sig/simple_query.rbs Type definitions for new aggregation methods
lib/simple_query.rb Module loading for the new aggregation clause
README.md Documentation updates with aggregation examples and usage guide
CHANGELOG.md Release notes detailing the new aggregation features

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kholdrex kholdrex self-assigned this Aug 30, 2025
@kholdrex kholdrex merged commit ccce32a into master Aug 30, 2025
20 checks passed
@kholdrex kholdrex deleted the feature/enhanced-aggregation-support branch August 30, 2025 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants