- `SqlUtils.cs:43` and `StatementParser.cs:254,285` (CA1861 ×3): inline
`new[] { ' ' }` and `new[] { ';' }` Split delimiters hoisted to
`static readonly char[]` fields next to the existing `separator`
field. Distinct names (`spaceSeparator`, `semicolonSeparator`) avoid
collision.
- `SqlUtils.Filters.cs:27` (CA1806): `double.TryParse(value, out var
dblValue)` had its return value silently discarded — intentional
(downstream switch branches use `dblValue` only when relevant and
rely on the default `0.0` on failure). Now uses `_ =` to make the
discard explicit and extends the comment.
- `FilterCondition.cs:10` and `With.cs:10` (S1135 ×2): rewrite the
`todo:` / `TODO:` markers as plain "Future:" notes. Both comments
documented deliberate design choices ("inherit base for now",
"could be indexed later") rather than tracked work, so the marker
was misleading anyway.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
18 lines
530 B
C#
18 lines
530 B
C#
namespace Strata.SqlTools.Query;
|
|
|
|
public class FilterCondition
|
|
{
|
|
public FilterOperator Operator { get; set; }
|
|
|
|
public IEnumerable<object>? Values { get; set; }
|
|
|
|
// This is not hereditary to Values; it is used for combination with the next FilterCondition in the set.
|
|
// Could be indexed in future to ensure accuracy if order-of-evaluation across siblings ever matters.
|
|
public LogicalOperator LogicalOperator { get; set; }
|
|
|
|
public bool IsValid()
|
|
{
|
|
return Values != null && Values.Any();
|
|
}
|
|
}
|