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.

Hour = 25

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

IndexOf = 26

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

Int = 27

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

Left = 28

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

Length = 29

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

Lower = 30

Converts a string to lowercase. See Lower.

Max = 31

Returns the maximum value. See Max.

Min = 32

Returns the minimum value. See Min.

Minute = 33

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

Mod = 34

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

Month = 35

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

NotExists = 36

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

Now = 37

Returns the current date and time. See Now.

NullIf = 38

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

Power = 39

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

Radians = 40

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

Random = 41

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 = 42

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

Right = 43

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

Round = 44

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

Second = 45

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

Sin = 46

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

SpatialArea = 47

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

SpatialBoundary = 48

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

SpatialBuffer = 49

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

SpatialCentroid = 50

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

SpatialConcaveHull = 51

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

SpatialContains = 52

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

SpatialConvexHull = 53

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

SpatialCovers = 54

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

SpatialCrosses = 55

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

SpatialDifference = 56

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

SpatialDimension = 57

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

SpatialDisjoint = 58

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

SpatialDistance = 59

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

SpatialEndPoint = 60

Returns the endpoint of a linestring geometry. See SpatialEndPoint.

SpatialEnvelope = 61

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

SpatialEquals = 62

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

SpatialExteriorRing = 63

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

SpatialGeometryType = 64

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

SpatialInteriorRingN = 65

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

SpatialIntersection = 66

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

SpatialIntersects = 67

Tests whether two geometries spatially intersect. See SpatialIntersects.

SpatialIsClosed = 68

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

SpatialIsEmpty = 69

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

SpatialIsRing = 70

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

SpatialIsSimple = 71

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

SpatialIsValid = 72

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

SpatialLength = 73

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

SpatialNumGeometries = 74

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

SpatialNumInteriorRing = 75

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

SpatialNumPoints = 76

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

SpatialOverlaps = 77

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

SpatialPointN = 78

Returns the Nth point in a geometry. See SpatialPointN.

SpatialPointOnSurface = 79

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

SpatialRelate = 80

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

SpatialSrid = 81

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

SpatialStartPoint = 82

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

SpatialSymDifference = 83

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

SpatialTouches = 84

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

SpatialUnion = 85

Returns the union of two geometries. See SpatialUnion.

SpatialWithin = 86

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

SpatialX = 87

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

SpatialY = 88

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

Sqrt = 89

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

Substring = 90

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

Sum = 91

Returns the sum of numeric values. See Sum.

Tan = 92

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

Today = 93

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

Trim = 94

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

TrimLeft = 95

Removes leading whitespace from a string. See TrimLeft.

TrimRight = 96

Removes trailing whitespace from a string. See TrimRight.

Upper = 97

Converts a string to uppercase. See Upper.

Year = 98

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.