chore: initial git load of code space
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using Strata.SqlTools.Rules.Rule.Expression;
|
||||
|
||||
namespace Strata.SqlTools.Rules.Rule.Groups;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a rule group with sequential rule evaluation (WITH semantics).
|
||||
/// </summary>
|
||||
public class With : Base
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the expressions from all rules, potentially with ordering applied.
|
||||
/// </summary>
|
||||
/// <returns>An enumerable of BoolExpr rule expressions.</returns>
|
||||
protected override IEnumerable<BoolExpr> GetExpressions()
|
||||
{
|
||||
// do some ordering here??
|
||||
return base.GetExpressions();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Merges two BoolExpr expressions using WITH semantics.
|
||||
/// </summary>
|
||||
/// <param name="left">The left BoolExpr expression.</param>
|
||||
/// <param name="right">The right BoolExpr expression.</param>
|
||||
/// <returns>A WITH expression combining both expressions.</returns>
|
||||
protected override BoolExpr Merge(BoolExpr left, BoolExpr right) => new Expression.With(left, right);
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="With"/> class.
|
||||
/// </summary>
|
||||
/// <param name="rules">The collection of rules to include in this WITH group.</param>
|
||||
public With(IEnumerable<IRule> rules) : base(rules) { }
|
||||
}
|
||||
Reference in New Issue
Block a user