rules-framework icon indicating copy to clipboard operation
rules-framework copied to clipboard

RQL (part 1) - Match and search expressions

Open luispfgarces opened this issue 9 months ago • 1 comments

Description

Creates the Rule Query Language core language on top of the Rules.Framework rules engine, adding support for match and search expressions.

Some examples of the language usage (using the integration tests scenario 8 - poker combinations):

MATCH ONE RULE FOR "TexasHoldemPokerSingleCombinations" ON $2023-01-01Z$;

match one rule for "TexasHoldemPokerSingleCombinations" on $2023-01-01Z$ when { @NumberOfKings is 1, @NumberOfQueens is 1, @NumberOfJacks is 1, @NumberOfTens is 1, @NumberOfNines is 1, @KingOfClubs is true, @QueenOfDiamonds is true, @JackOfClubs is true, @TenOfHearts is true, @NineOfSpades is true };

SEARCH RULES FOR "TexasHoldemPokerSingleCombinations" SINCE $2023-01-01Z$ UNTIL $2023-01-31Z$ when { @NumberOfKings is 3 };

search rules for "TexasHoldemPokerSingleCombinations" since $2023-01-01Z$ until $2023-01-31Z$ when { @NumberOfAces is 5 };

It is also added a simple RQL commands prompt to the Web UI (sample image using the Web UI sample on the solution).

rql-screenshot

Related to #152.

Change checklist

  • [x] Code follows the code rules guidelines of this project
  • [x] Commit messages follow the commit rules of this project
  • [ ] I have self-reviewed my changes before submitting this pull request
  • [x] I have covered new/changed code with new tests and/or adjusted existent ones
  • [ ] I have made changes necessary to update the documentation accordingly

Please also check the I want to contribute guidelines and make sure you have done accordingly.

Disclaimer

By sending us your contributions, you are agreeing that your contribution is made subject to the terms of our Contributor Ownership Statement

luispfgarces avatar May 19 '24 15:05 luispfgarces