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.

Cast = 8

Converts a value from one data type to another. See Cast.

Ceiling = 9

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

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

Concat = 11

Concatenates two or more strings together. See Concat.

Cos = 12

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

Count = 13

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

CountDistinct = 14

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

Day = 15

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

Degrees = 16

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

Exists = 17

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

Floor = 18

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

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

IndexOf = 20

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

Int = 21

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

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

Length = 23

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

Lower = 24

Converts a string to lowercase. See Lower.

Max = 25

Returns the maximum value. See Max.

Min = 26

Returns the minimum value. See Min.

Minute = 27

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

Mod = 28

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

Month = 29

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

NotExists = 30

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

Now = 31

Returns the current date and time. See Now.

NullIf = 32

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

Power = 33

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

Radians = 34

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

Rand = 35

Returns a random floating-point number (alias for Random). See Rand.

Random = 36

Returns a random floating-point number between 0 and 1. See Random.

Replace = 37

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

Right = 38

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

Round = 39

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

Second = 40

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

Sin = 41

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

SpatialArea = 42

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

SpatialBoundary = 43

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

SpatialBuffer = 44

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

SpatialCentroid = 45

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

SpatialConcaveHull = 46

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

SpatialContains = 47

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

SpatialConvexHull = 48

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

SpatialCovers = 49

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

SpatialCrosses = 50

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

SpatialDifference = 51

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

SpatialDimension = 52

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

SpatialDisjoint = 53

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

SpatialDistance = 54

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

SpatialEndPoint = 55

Returns the endpoint of a linestring geometry. See SpatialEndPoint.

SpatialEnvelope = 56

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

SpatialEquals = 57

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

SpatialExteriorRing = 58

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

SpatialGeometryType = 59

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

SpatialInteriorRingN = 60

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

SpatialIntersection = 61

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

SpatialIntersects = 62

Tests whether two geometries spatially intersect. See SpatialIntersects.

SpatialIsClosed = 63

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

SpatialIsEmpty = 64

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

SpatialIsRing = 65

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

SpatialIsSimple = 66

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

SpatialIsValid = 67

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

SpatialLength = 68

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

SpatialNumGeometries = 69

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

SpatialNumInteriorRing = 70

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

SpatialNumPoints = 71

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

SpatialOverlaps = 72

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

SpatialPointN = 73

Returns the Nth point in a geometry. See SpatialPointN.

SpatialPointOnSurface = 74

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

SpatialRelate = 75

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

SpatialSrid = 76

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

SpatialStartPoint = 77

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

SpatialSymDifference = 78

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

SpatialTouches = 79

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

SpatialUnion = 80

Returns the union of two geometries. See SpatialUnion.

SpatialWithin = 81

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

SpatialX = 82

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

SpatialY = 83

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

Sqrt = 84

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

Substring = 85

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

Sum = 86

Returns the sum of numeric values. See Sum.

Tan = 87

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

Today = 88

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

Trim = 89

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

TrimLeft = 90

Removes leading whitespace from a string. See TrimLeft.

TrimRight = 91

Removes trailing whitespace from a string. See TrimRight.

Upper = 92

Converts a string to uppercase. See Upper.

Year = 93

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.