Table of Contents

Class Rand

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

Represents the RAND mathematical function that generates a random number.

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

Remarks

The RAND function generates a pseudo-random floating-point number, typically between 0 and 1 (exclusive or inclusive depending on the database). When provided with a seed value, it generates reproducible random sequences. This is useful for sampling data, randomizing sort orders, or generating test data. Note that RAND is not cryptographically secure and should not be used for security-sensitive operations.

Constructors

Rand(IEnumerable<IElement>)

Initializes a new instance of RAND with multiple elements.

Rand(IElement)

Initializes a new instance of RAND with an optional seed element.