Table of Contents

Class Cast

Namespace
YndigoBlue.Velocity.Functions
Assembly
YndigoBlue.Velocity.dll

Represents the CAST type conversion function that explicitly converts a value to a specified data type.

public class Cast : Function, IElement, ICheckItem, IDefaultItem, IFilterItem
Inheritance
Cast
Implements

Remarks

The CAST function converts an expression from one data type to another. The target data type is typically specified separately in the query construction. CAST is useful for ensuring type compatibility, converting strings to numbers or dates, or preparing data for operations that require specific types. If the conversion fails (e.g., casting 'abc' to an integer), most databases will raise an error.

Constructors

Cast(IEnumerable<IElement>)

Initializes a new instance of CAST for multiple elements.

Cast(IElement)

Initializes a new instance of CAST for a single element.