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

Group-by should support grouping rows' logic based on predicates #380

Closed
Seddryck opened this issue May 29, 2018 · 1 comment
Closed

Group-by should support grouping rows' logic based on predicates #380

Seddryck opened this issue May 29, 2018 · 1 comment

Comments

@Seddryck
Copy link
Owner

Seddryck commented May 29, 2018

The current implementation of group-by supports grouping by distinct values and equality (Two rows belong to the same group if they share the same value for the columns part of the group-by statement).

It should be possible to also group rows based on one or a combination of predicates defining one or more groups.

<group-by>
  <case>
     <predicate operand="colValue">
         <within-range>[0;1000[</within-range>
     </predicate>
  </case>
  <case>
     <predicate operand="colValue">
         <more-than>1000</more-than>
     </predicate>
  </case>
</group-by>

at no moment it should be mandatory that the predicates operate on a unique operand. This is valid …

<group-by>
  <case>
     <predicate operand="colValue">
         <within-range>[0;1000[</within-range>
     </predicate>
  </case>
  <case>
     <combination operator="and">
       <predicate operand="otherValue">
           <lower-case/>
       </predicate>
       <predicate operand="myValue">
           <any-of>
              <item>Saturday</item>
              <item>Sunday</item>
            </any-of>
       </predicate>
     <combination>
  </case>
</group-by>

All rows not validating any predicate will be part of an additional group automatically created.

@Seddryck Seddryck added this to the v1.19 milestone May 29, 2018
@Seddryck Seddryck modified the milestones: v1.19, v1.20 Nov 1, 2018
@Seddryck Seddryck modified the milestones: v1.20, v1.21 Jan 6, 2019
@Seddryck Seddryck modified the milestones: v1.21, v1.22 May 30, 2019
Seddryck pushed a commit that referenced this issue Nov 21, 2019
# Conflicts:
#	NBi.NUnit/Builder/ResultSetRowCountBuilder.cs
#	NBi.Testing/Acceptance/Resources/Positive/ResultSetConstraint.nbits
@Seddryck Seddryck closed this as completed Jan 8, 2020
@Seddryck
Copy link
Owner Author

Seddryck commented Jan 8, 2020

Beta available at NBi 1.22.0-beta.69

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant