Table of Contents

Struct TriggerAcquisitionSqlShape

Namespace
Quartz.Impl.AdoJobStore
Assembly
Quartz.dll

Everything about one acquisition attempt that changes the text of the statement, and nothing that does not.

public readonly record struct TriggerAcquisitionSqlShape : IEquatable<TriggerAcquisitionSqlShape>
Implements
Inherited Members

Remarks

This is what GetSelectNextTriggerToAcquireSql(TriggerAcquisitionSqlShape) is handed, and it is also the key the finished statement is cached under — the same object, because a statement is a pure function of its shape. Two attempts of the same shape are the same string, so the dialect builds it once.

It exists so that the next acquisition dimension adds a property here rather than a parameter to every dialect delegate that overrides the hook. A dialect that only splices in a row limit reads MaxCount and hands the whole shape to base, and so keeps working when a dimension it has never heard of is added.

Constructors

TriggerAcquisitionSqlShape(int, int)

Everything about one acquisition attempt that changes the text of the statement, and nothing that does not.

public TriggerAcquisitionSqlShape(int MaxCount, int ExcludedJobTypeBucket)

Parameters

MaxCount int

The most rows the statement may return, already clamped to at least one by the caller. A dialect splices this into its TOP, LIMIT, ROWS or rownum clause.

ExcludedJobTypeBucket int

How many NOT IN terms the job-type exclusion clause carries, or zero for no clause at all. It is a bucket rather than the caller's exact count because the parameter list is padded up to one of a few sizes, which is what keeps the statement cache — and the database's plan cache — from growing an entry per distinct exclusion count.

Remarks

This is what GetSelectNextTriggerToAcquireSql(TriggerAcquisitionSqlShape) is handed, and it is also the key the finished statement is cached under — the same object, because a statement is a pure function of its shape. Two attempts of the same shape are the same string, so the dialect builds it once.

It exists so that the next acquisition dimension adds a property here rather than a parameter to every dialect delegate that overrides the hook. A dialect that only splices in a row limit reads MaxCount and hands the whole shape to base, and so keeps working when a dimension it has never heard of is added.

Properties

ExcludedJobTypeBucket

How many NOT IN terms the job-type exclusion clause carries, or zero for no clause at all. It is a bucket rather than the caller's exact count because the parameter list is padded up to one of a few sizes, which is what keeps the statement cache — and the database's plan cache — from growing an entry per distinct exclusion count.

public int ExcludedJobTypeBucket { get; init; }

Property Value

int

MaxCount

The most rows the statement may return, already clamped to at least one by the caller. A dialect splices this into its TOP, LIMIT, ROWS or rownum clause.

public int MaxCount { get; init; }

Property Value

int