Struct QuerySegment
One part of a query template. It contains literal text or a handler that writes a value.
public record struct QuerySegment : IEquatable<QuerySegment>
- Implements
- Inherited Members
- Extension Methods
Constructors
QuerySegment(int, int, int, bool, IQuerySegmentHandler?)
One part of a query template. It contains literal text or a handler that writes a value.
public QuerySegment(int Start, int Length, int ExcessOrInd, bool IsSection, IQuerySegmentHandler? Handler)
Parameters
StartintThe absolute start position within the normalized
Querystring.LengthintThe total length of the segment (including potential excess).
ExcessOrIndintThe value index when
Handleris present. Otherwise the number of trailing characters to remove when the segment ends its section.IsSectionboolWhether this segment starts a SQL section such as
WHEREorSELECT.HandlerIQuerySegmentHandlerThe handler that writes a value into the SQL. Use null for literal text.
Properties
ExcessOrInd
The value index when Handler is present.
Otherwise the number of trailing characters to remove when the segment ends its section.
public int ExcessOrInd { readonly get; set; }
Property Value
Handler
The handler that writes a value into the SQL. Use null for literal text.
public IQuerySegmentHandler? Handler { readonly get; set; }
Property Value
IsSection
Whether this segment starts a SQL section such as WHERE or SELECT.
public bool IsSection { readonly get; set; }
Property Value
Length
The total length of the segment (including potential excess).
public int Length { readonly get; set; }
Property Value
Start
The absolute start position within the normalized Query string.
public int Start { readonly get; set; }