Table of Contents

Class WorkingDaysValue

Namespace
The.SQL.QIR.Values
Assembly
Instagile.dll

Adds a whole number of working days to a date, skipping Saturdays and Sundays.

[MessagePackObject(false)]
public sealed class WorkingDaysValue : Value, IEquatable<Value>
Inheritance
WorkingDaysValue
Implements
Inherited Members

Constructors

WorkingDaysValue(Value, int, AttributeType)

Adds a whole number of working days to a date, skipping Saturdays and Sundays.

public WorkingDaysValue(Value operand, int amount, AttributeType type)

Parameters

operand Value
amount int
type AttributeType

Fields

Amount

[Key(1)]
public readonly int Amount

Field Value

int

Operand

[Key(0)]
public readonly Value Operand

Field Value

Value

Type

Type of the operand - Date, DateTime or Instant. Instants are stored in UTC, so their day of week is taken in the client's timezone.

[Key(2)]
public readonly AttributeType Type

Field Value

AttributeType

Properties

IsLiteral

Whether the value is self-paranthesing.

[IgnoreMember]
public override bool IsLiteral { get; }

Property Value

bool

IsNullable

Whether the value can be NULL at runtime.

[IgnoreMember]
public override bool IsNullable { get; }

Property Value

bool

Joins

Joins required to reach this value.

[IgnoreMember]
public override IEnumerable<Join> Joins { get; }

Property Value

IEnumerable<Join>

Methods

DaysToAdd(DayOfWeek, int)

Calendar days that move a date falling on dayOfWeek by workingDays working days: each step moves one day, then continues in the same direction past any Saturday or Sunday.

public static int DaysToAdd(DayOfWeek dayOfWeek, int workingDays)

Parameters

dayOfWeek DayOfWeek
workingDays int

Returns

int

Equals(Value?)

Indicates whether the current object is equal to another object of the same type.

public override bool Equals(Value? obj)

Parameters

obj Value

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Update(Value, int, AttributeType)

public WorkingDaysValue Update(Value operand, int amount, AttributeType type)

Parameters

operand Value
amount int
type AttributeType

Returns

WorkingDaysValue

WithSource(Table, Table)

public override Value WithSource(Table oldSource, Table newSource)

Parameters

oldSource Table
newSource Table

Returns

Value