Table of Contents

Enum FunctionType

Namespace
YndigoBlue.Velocity.Enums
Assembly
YndigoBlue.Velocity.dll

Specifies database functions supported by Velocity across different database systems.

public enum FunctionType

Fields

Abs = 0

Returns the absolute (positive) value of a number. ABS(-0.8) => 0.8. See Abs.

Acos = 1

Returns the arc cosine (inverse cosine) in radians. ACOS(-1) => PI(). See Acos.

All = 2

Returns true if all rows in a subquery meet the condition. See All.

Any = 3

Returns true if any row in a subquery meets the condition. See Any.

Asin = 4

Returns the arc sine (inverse sine) in radians. ASIN(1) => PI()/2. See Asin.

Atan = 5

Returns the arc tangent (inverse tangent) in radians. ATAN(1) => PI()/4. See Atan.

Atan2 = 6

Returns the arc tangent of y/x in radians, considering the signs of both arguments. ATAN2(1, 1) => PI()/4. See Atan2.

Average = 7

Returns the average of numeric values. See Average.

Ceiling = 8

Rounds up to the nearest whole number. 1.2 => 2, 1.5 => 2, -1.2 => -1, -1.5 => -1, -1.8 => -1. See Ceiling.

Coalesce = 9

Returns the first non-null value from a list of arguments. COALESCE(NULL, 'A', 'B') => 'A'. See Coalesce.

Concat = 10

Concatenates two or more strings together. See Concat.

Cos = 11

Returns the cosine of the angle in radians. COS(PI()) => -1. See Cos.

Count = 12

Returns the count of rows or non-null values. See Count.

CountDistinct = 13

Returns the count of distinct non-null values. See CountDistinct.

DateAdd = 14

Adds or subtracts a specified number of date/time units to a date, datetime, or timestamp value. DateAdd(DatePart, amount, date) → date shifted by amount units. See DateAdd.

DateDiff = 15

Returns the integer difference between two date, datetime, or timestamp values in the specified unit. DateDiff(DatePart, date1, date2) → date2 − date1 in the requested units. See DateDiff.

DateSubtract = 16

Subtracts a specified number of date/time units from a date, datetime, or timestamp value. DateSubtract(DatePart, amount, date) → date shifted back by amount units. See DateSubtract.

DateTimeAddInterval = 17

Adds a TimeSpan/Interval value to a DateTime, returning a new DateTime. DateTimeAddInterval(datetime, interval) → datetime shifted by the interval duration. Accepts both column references and literals. See DateTimeAddInterval.

DateTimeAddTime = 18

Adds a Time-of-day value to a DateTime as a duration from midnight, returning a new DateTime. DateTimeAddTime(datetime, time) → datetime shifted by the time duration. Accepts both column references and literals. See DateTimeAddTime.

DateTimeSubtractInterval = 19

Subtracts a TimeSpan/Interval value from a DateTime, returning a new DateTime. DateTimeSubtractInterval(datetime, interval) → datetime shifted back by the interval duration. Accepts both column references and literals. See DateTimeSubtractInterval.

DateTimeSubtractTime = 20

Subtracts a Time-of-day value from a DateTime as a duration from midnight, returning a new DateTime. DateTimeSubtractTime(datetime, time) → datetime shifted back by the time duration. Accepts both column references and literals. See DateTimeSubtractTime.

Day = 21

Extracts the day component (1-31) from a date or datetime value. See Day.

Degrees = 22

Converts radians to degrees. DEGREES(PI()) => 180. See Degrees.

Exists = 23

Returns true if a subquery returns any rows. See Exists.

Floor = 24

Rounds down to the nearest whole number. 1.2 => 1, 1.5 => 1, -1.2 => -2, -1.5 => -2, -1.8 => -2. See Floor.

Greatest = 25

Returns the largest of two or more values compared across a row, not down a column. GREATEST(3, 9, 5) => 9. See Greatest.

Hour = 26

Extracts the hour component (0-23) from a datetime value. See Hour.

IndexOf = 27

Returns the 1-based position of the first occurrence of a substring within a string. Returns 0 if not found. See IndexOf.

Int = 28

Returns the integer part of the number. 1.2 => 1, 1.5 => 1, -1.2 => -1, -1.5 => -1, -1.8 => -1. See Int.

Least = 29

Returns the smallest of two or more values compared across a row, not down a column. LEAST(3, 9, 5) => 3. See Least.

Left = 30

Returns the leftmost N characters from a string. See Left.

Length = 31

Returns the length of a string in characters. See Length.

Lower = 32

Converts a string to lowercase. See Lower.

Max = 33

Returns the maximum value. See Max.

Min = 34

Returns the minimum value. See Min.

Minute = 35

Extracts the minute component (0-59) from a datetime value. See Minute.

Mod = 36

Returns the remainder of a division operation (modulo). See Mod.

Month = 37

Extracts the month component (1-12) from a date or datetime value. See Month.

NotExists = 38

Returns true if a subquery returns no rows. See NotExists.

Now = 39

Returns the current date and time. See Now.

NullIf = 40

Returns NULL if two expressions are equal, otherwise returns the first expression. See NullIf.

Power = 41

Returns a number raised to a specified power. POWER(2, 3) => 8. See Power.

Radians = 42

Converts degrees to radians. RADIANS(180) => PI(). See Radians.

Random = 43

Returns a random number. With no arguments, returns a floating-point value in [0, 1). With two arguments (lower, upper), returns a random value within that range. See Random.

Replace = 44

Replaces all occurrences of a substring with another string. REPLACE('Hello World', 'World', 'There') => 'Hello There'. See Replace.

Right = 45

Returns the rightmost N characters from a string. See Right.

Round = 46

Rounds to the nearest whole number. 1.2 => 1, 1.5 => 2, -1.2 => -1, -1.5 => -1, -1.8 => -2. See Round.

Second = 47

Extracts the second component (0-59) from a datetime value. See Second.

Sin = 48

Returns the sine of the angle in radians. SIN(PI()/2) => 1. See Sin.

SpatialArea = 49

Returns the area of a geometry as a double. See SpatialArea.

SpatialBoundary = 50

Returns the boundary of a geometry (POLYGON returns LINESTRING, LINESTRING returns MULTIPOINT). See SpatialBoundary.

SpatialBuffer = 51

Creates a buffer polygon around a geometry at a specified distance. See SpatialBuffer.

SpatialCentroid = 52

Returns the centroid (center of mass) of a geometry as a POINT. See SpatialCentroid.

SpatialConcaveHull = 53

Returns the smallest concave shape that encloses a geometry. See SpatialConcaveHull.

SpatialContains = 54

Tests whether geometry g1 completely contains geometry g2. See SpatialContains.

SpatialConvexHull = 55

Returns the smallest convex shape that encloses a geometry. See SpatialConvexHull.

SpatialCovers = 56

Tests whether geometry g1 covers geometry g2 (no points of g2 are outside g1). See SpatialCovers.

SpatialCrosses = 57

Tests whether two geometries spatially cross (share some but not all interior points). See SpatialCrosses.

SpatialDifference = 58

Returns the portion of geometry g1 that does not intersect with geometry g2. See SpatialDifference.

SpatialDimension = 59

Returns the dimensionality of a geometry (0=point, 1=line, 2=surface). See SpatialDimension.

SpatialDisjoint = 60

Tests whether two geometries are spatially disjoint (do not intersect). See SpatialDisjoint.

SpatialDistance = 61

Returns the distance between the closest points of two geometries. See SpatialDistance.

SpatialDWithin = 62

Tests whether the distance between two geometries is within a specified threshold. PostgreSQL only. See SpatialDWithin.

SpatialEndPoint = 63

Returns the endpoint of a linestring geometry. See SpatialEndPoint.

SpatialEnvelope = 64

Returns the minimum bounding rectangle (envelope) of a geometry. See SpatialEnvelope.

SpatialEquals = 65

Tests whether two geometries are spatially equal (same set of points). See SpatialEquals.

SpatialExteriorRing = 66

Returns the exterior ring of a polygon geometry. See SpatialExteriorRing.

SpatialGeometryType = 67

Returns the OGC type name of a geometry (e.g., Point, Polygon, MultiPoint). See SpatialGeometryType.

SpatialInteriorRingN = 68

Returns the Nth interior ring (hole) of a polygon geometry. See SpatialInteriorRingN.

SpatialIntersection = 69

Returns the geometry representing the intersection of two geometries. See SpatialIntersection.

SpatialIntersects = 70

Tests whether two geometries spatially intersect. See SpatialIntersects.

SpatialIsClosed = 71

Tests whether a geometry is closed (start point equals end point). See SpatialIsClosed.

SpatialIsEmpty = 72

Tests whether a geometry is empty (contains no points). See SpatialIsEmpty.

SpatialIsRing = 73

Tests whether a geometry is a ring (a closed and simple linestring). See SpatialIsRing.

SpatialIsSimple = 74

Tests whether a geometry is simple (no self-intersections). See SpatialIsSimple.

SpatialIsValid = 75

Tests whether a geometry is valid (well-formed according to OGC rules). See SpatialIsValid.

SpatialLength = 76

Returns the length of a linestring or perimeter of a polygon. See SpatialLength.

SpatialNumGeometries = 77

Returns the number of geometries in a geometry collection. See SpatialNumGeometries.

SpatialNumInteriorRing = 78

Returns the number of interior rings (holes) in a polygon. See SpatialNumInteriorRing.

SpatialNumPoints = 79

Returns the total number of points in a geometry. See SpatialNumPoints.

SpatialOverlaps = 80

Tests whether two geometries of the same dimension overlap. See SpatialOverlaps.

SpatialPointN = 81

Returns the Nth point in a geometry. See SpatialPointN.

SpatialPointOnSurface = 82

Returns an arbitrary point guaranteed to be on the surface of a geometry. See SpatialPointOnSurface.

SpatialRelate = 83

Tests spatial relationships using a DE-9IM intersection matrix pattern. See SpatialRelate.

SpatialSrid = 84

Returns the Spatial Reference System Identifier (SRID) of a geometry. See SpatialSrid.

SpatialStartPoint = 85

Returns the start point of a linestring geometry. See SpatialStartPoint.

SpatialSymDifference = 86

Returns the symmetric difference (points in either but not both geometries). See SpatialSymDifference.

SpatialTouches = 87

Tests whether two geometries touch (share boundary points but not interiors). See SpatialTouches.

SpatialUnion = 88

Returns the union of two geometries. See SpatialUnion.

SpatialWithin = 89

Tests whether geometry g1 is completely within geometry g2. See SpatialWithin.

SpatialX = 90

Returns the X coordinate of a point geometry. See SpatialX.

SpatialY = 91

Returns the Y coordinate of a point geometry. See SpatialY.

Sqrt = 92

Returns the square root of a number. SQRT(16) => 4. See Sqrt.

Substring = 93

Extracts a substring from a string starting at a specified position. See Substring.

Sum = 94

Returns the sum of numeric values. See Sum.

Tan = 95

Returns the tangent of the angle in radians. TAN(PI()/4) => 1. See Tan.

Today = 96

Returns the current date (without time component). See Today.

Trim = 97

Trims whitespace from both sides of a string. TRIM(' ABC ') => 'ABC'. See Trim.

TrimLeft = 98

Removes leading whitespace from a string. See TrimLeft.

TrimRight = 99

Removes trailing whitespace from a string. See TrimRight.

Upper = 100

Converts a string to uppercase. See Upper.

Year = 101

Extracts the year component from a date or datetime value. See Year.

Remarks

Velocity provides a unified function abstraction layer that maps to database-specific implementations. This includes mathematical, string, date/time, aggregate, and geospatial functions. Functions are database-agnostic and Velocity handles the translation to the appropriate SQL syntax for each database vendor.