Table of Contents

Interface WindowFunctionBuilder.IFramePartFunction

Namespace
LinqToDB
Assembly
linq2db.dll

Provides frame type selection: ROWS, RANGE, or GROUPS with BETWEEN syntax.

public interface WindowFunctionBuilder.IFramePartFunction
Extension Methods

Properties

GroupsBetween

Starts a GROUPS BETWEEN frame specification. May not be supported by all providers.

WindowFunctionBuilder.IBoundaryPart<WindowFunctionBuilder.IRangePrecedingPartFunction> GroupsBetween { get; }

Property Value

WindowFunctionBuilder.IBoundaryPart<WindowFunctionBuilder.IRangePrecedingPartFunction>

RangeBetween

Starts a RANGE BETWEEN frame specification. Chain with boundary definitions.

WindowFunctionBuilder.IBoundaryPart<WindowFunctionBuilder.IRangePrecedingPartFunction> RangeBetween { get; }

Property Value

WindowFunctionBuilder.IBoundaryPart<WindowFunctionBuilder.IRangePrecedingPartFunction>

RowsBetween

Starts a ROWS BETWEEN frame specification. Chain with boundary definitions.

WindowFunctionBuilder.IBoundaryPart<WindowFunctionBuilder.IRangePrecedingPartFunction> RowsBetween { get; }

Property Value

WindowFunctionBuilder.IBoundaryPart<WindowFunctionBuilder.IRangePrecedingPartFunction>

Methods

GroupsBetweenValues(object?, object?)

Shortcut for the common GROUPS BETWEEN <preceding> PRECEDING AND <following> FOLLOWING frame. May not be supported by all providers.

WindowFunctionBuilder.IDefinedRangeFrameFunction GroupsBetweenValues(object? preceding, object? following)

Parameters

preceding object
following object

Returns

WindowFunctionBuilder.IDefinedRangeFrameFunction

Remarks

Syntax: GROUPS BETWEEN <preceding> PRECEDING AND <following> FOLLOWING
C# usage:

Sql.Window.Sum(t.Value, f => f.OrderBy(t.Id).GroupsBetweenValues(1, 2))

Generated SQL:

SUM(t.Value) OVER (ORDER BY t.Id GROUPS BETWEEN 1 PRECEDING AND 2 FOLLOWING)

RangeBetweenValues(object?, object?)

Shortcut for the common RANGE BETWEEN <preceding> PRECEDING AND <following> FOLLOWING frame.

WindowFunctionBuilder.IDefinedRangeFrameFunction RangeBetweenValues(object? preceding, object? following)

Parameters

preceding object
following object

Returns

WindowFunctionBuilder.IDefinedRangeFrameFunction

Remarks

Syntax: RANGE BETWEEN <preceding> PRECEDING AND <following> FOLLOWING
C# usage:

Sql.Window.Sum(t.Value, f => f.OrderBy(t.Id).RangeBetweenValues(1, 2))

Generated SQL:

SUM(t.Value) OVER (ORDER BY t.Id RANGE BETWEEN 1 PRECEDING AND 2 FOLLOWING)

RowsBetweenValues(object?, object?)

Shortcut for the common ROWS BETWEEN <preceding> PRECEDING AND <following> FOLLOWING frame.

WindowFunctionBuilder.IDefinedRangeFrameFunction RowsBetweenValues(object? preceding, object? following)

Parameters

preceding object
following object

Returns

WindowFunctionBuilder.IDefinedRangeFrameFunction

Remarks

Syntax: ROWS BETWEEN <preceding> PRECEDING AND <following> FOLLOWING
C# usage:

Sql.Window.Sum(t.Value, f => f.OrderBy(t.Id).RowsBetweenValues(1, 2))

Generated SQL:

SUM(t.Value) OVER (ORDER BY t.Id ROWS BETWEEN 1 PRECEDING AND 2 FOLLOWING)