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 = 0Returns the absolute (positive) value of a number. ABS(-0.8) => 0.8. See Abs.
Acos = 1Returns the arc cosine (inverse cosine) in radians. ACOS(-1) => PI(). See Acos.
All = 2Returns true if all rows in a subquery meet the condition. See All.
Any = 3Returns true if any row in a subquery meets the condition. See Any.
Asin = 4Returns the arc sine (inverse sine) in radians. ASIN(1) => PI()/2. See Asin.
Atan = 5Returns the arc tangent (inverse tangent) in radians. ATAN(1) => PI()/4. See Atan.
Atan2 = 6Returns the arc tangent of y/x in radians, considering the signs of both arguments. ATAN2(1, 1) => PI()/4. See Atan2.
Average = 7Returns the average of numeric values. See Average.
Cast = 8Converts a value from one data type to another. See Cast.
Ceiling = 9Rounds up to the nearest whole number. 1.2 => 2, 1.5 => 2, -1.2 => -1, -1.5 => -1, -1.8 => -1. See Ceiling.
Coalesce = 10Returns the first non-null value from a list of arguments. COALESCE(NULL, 'A', 'B') => 'A'. See Coalesce.
Concat = 11Concatenates two or more strings together. See Concat.
Cos = 12Returns the cosine of the angle in radians. COS(PI()) => -1. See Cos.
Count = 13Returns the count of rows or non-null values. See Count.
CountDistinct = 14Returns the count of distinct non-null values. See CountDistinct.
Day = 15Extracts the day component (1-31) from a date or datetime value. See Day.
Degrees = 16Converts radians to degrees. DEGREES(PI()) => 180. See Degrees.
Exists = 17Returns true if a subquery returns any rows. See Exists.
Floor = 18Rounds down to the nearest whole number. 1.2 => 1, 1.5 => 1, -1.2 => -2, -1.5 => -2, -1.8 => -2. See Floor.
Hour = 19Extracts the hour component (0-23) from a datetime value. See Hour.
IndexOf = 20Returns the 1-based position of the first occurrence of a substring within a string. Returns 0 if not found. See IndexOf.
Int = 21Returns the integer part of the number. 1.2 => 1, 1.5 => 1, -1.2 => -1, -1.5 => -1, -1.8 => -1. See Int.
Left = 22Returns the leftmost N characters from a string. See Left.
Length = 23Returns the length of a string in characters. See Length.
Lower = 24Converts a string to lowercase. See Lower.
Max = 25Returns the maximum value. See Max.
Min = 26Returns the minimum value. See Min.
Minute = 27Extracts the minute component (0-59) from a datetime value. See Minute.
Mod = 28Returns the remainder of a division operation (modulo). See Mod.
Month = 29Extracts the month component (1-12) from a date or datetime value. See Month.
NotExists = 30Returns true if a subquery returns no rows. See NotExists.
Now = 31Returns the current date and time. See Now.
NullIf = 32Returns NULL if two expressions are equal, otherwise returns the first expression. See NullIf.
Power = 33Returns a number raised to a specified power. POWER(2, 3) => 8. See Power.
Radians = 34Converts degrees to radians. RADIANS(180) => PI(). See Radians.
Rand = 35Returns a random floating-point number (alias for Random). See Rand.
Random = 36Returns a random floating-point number between 0 and 1. See Random.
Replace = 37Replaces all occurrences of a substring with another string. REPLACE('Hello World', 'World', 'There') => 'Hello There'. See Replace.
Right = 38Returns the rightmost N characters from a string. See Right.
Round = 39Rounds to the nearest whole number. 1.2 => 1, 1.5 => 2, -1.2 => -1, -1.5 => -1, -1.8 => -2. See Round.
Second = 40Extracts the second component (0-59) from a datetime value. See Second.
Sin = 41Returns the sine of the angle in radians. SIN(PI()/2) => 1. See Sin.
SpatialArea = 42Returns the area of a geometry as a double. See SpatialArea.
SpatialBoundary = 43Returns the boundary of a geometry (POLYGON returns LINESTRING, LINESTRING returns MULTIPOINT). See SpatialBoundary.
SpatialBuffer = 44Creates a buffer polygon around a geometry at a specified distance. See SpatialBuffer.
SpatialCentroid = 45Returns the centroid (center of mass) of a geometry as a POINT. See SpatialCentroid.
SpatialConcaveHull = 46Returns the smallest concave shape that encloses a geometry. See SpatialConcaveHull.
SpatialContains = 47Tests whether geometry g1 completely contains geometry g2. See SpatialContains.
SpatialConvexHull = 48Returns the smallest convex shape that encloses a geometry. See SpatialConvexHull.
SpatialCovers = 49Tests whether geometry g1 covers geometry g2 (no points of g2 are outside g1). See SpatialCovers.
SpatialCrosses = 50Tests whether two geometries spatially cross (share some but not all interior points). See SpatialCrosses.
SpatialDifference = 51Returns the portion of geometry g1 that does not intersect with geometry g2. See SpatialDifference.
SpatialDimension = 52Returns the dimensionality of a geometry (0=point, 1=line, 2=surface). See SpatialDimension.
SpatialDisjoint = 53Tests whether two geometries are spatially disjoint (do not intersect). See SpatialDisjoint.
SpatialDistance = 54Returns the distance between the closest points of two geometries. See SpatialDistance.
SpatialEndPoint = 55Returns the endpoint of a linestring geometry. See SpatialEndPoint.
SpatialEnvelope = 56Returns the minimum bounding rectangle (envelope) of a geometry. See SpatialEnvelope.
SpatialEquals = 57Tests whether two geometries are spatially equal (same set of points). See SpatialEquals.
SpatialExteriorRing = 58Returns the exterior ring of a polygon geometry. See SpatialExteriorRing.
SpatialGeometryType = 59Returns the OGC type name of a geometry (e.g., Point, Polygon, MultiPoint). See SpatialGeometryType.
SpatialInteriorRingN = 60Returns the Nth interior ring (hole) of a polygon geometry. See SpatialInteriorRingN.
SpatialIntersection = 61Returns the geometry representing the intersection of two geometries. See SpatialIntersection.
SpatialIntersects = 62Tests whether two geometries spatially intersect. See SpatialIntersects.
SpatialIsClosed = 63Tests whether a geometry is closed (start point equals end point). See SpatialIsClosed.
SpatialIsEmpty = 64Tests whether a geometry is empty (contains no points). See SpatialIsEmpty.
SpatialIsRing = 65Tests whether a geometry is a ring (a closed and simple linestring). See SpatialIsRing.
SpatialIsSimple = 66Tests whether a geometry is simple (no self-intersections). See SpatialIsSimple.
SpatialIsValid = 67Tests whether a geometry is valid (well-formed according to OGC rules). See SpatialIsValid.
SpatialLength = 68Returns the length of a linestring or perimeter of a polygon. See SpatialLength.
SpatialNumGeometries = 69Returns the number of geometries in a geometry collection. See SpatialNumGeometries.
SpatialNumInteriorRing = 70Returns the number of interior rings (holes) in a polygon. See SpatialNumInteriorRing.
SpatialNumPoints = 71Returns the total number of points in a geometry. See SpatialNumPoints.
SpatialOverlaps = 72Tests whether two geometries of the same dimension overlap. See SpatialOverlaps.
SpatialPointN = 73Returns the Nth point in a geometry. See SpatialPointN.
SpatialPointOnSurface = 74Returns an arbitrary point guaranteed to be on the surface of a geometry. See SpatialPointOnSurface.
SpatialRelate = 75Tests spatial relationships using a DE-9IM intersection matrix pattern. See SpatialRelate.
SpatialSrid = 76Returns the Spatial Reference System Identifier (SRID) of a geometry. See SpatialSrid.
SpatialStartPoint = 77Returns the start point of a linestring geometry. See SpatialStartPoint.
SpatialSymDifference = 78Returns the symmetric difference (points in either but not both geometries). See SpatialSymDifference.
SpatialTouches = 79Tests whether two geometries touch (share boundary points but not interiors). See SpatialTouches.
SpatialUnion = 80Returns the union of two geometries. See SpatialUnion.
SpatialWithin = 81Tests whether geometry g1 is completely within geometry g2. See SpatialWithin.
SpatialX = 82Returns the X coordinate of a point geometry. See SpatialX.
SpatialY = 83Returns the Y coordinate of a point geometry. See SpatialY.
Sqrt = 84Returns the square root of a number. SQRT(16) => 4. See Sqrt.
Substring = 85Extracts a substring from a string starting at a specified position. See Substring.
Sum = 86Returns the sum of numeric values. See Sum.
Tan = 87Returns the tangent of the angle in radians. TAN(PI()/4) => 1. See Tan.
Today = 88Returns the current date (without time component). See Today.
Trim = 89Trims whitespace from both sides of a string. TRIM(' ABC ') => 'ABC'. See Trim.
TrimLeft = 90Removes leading whitespace from a string. See TrimLeft.
TrimRight = 91Removes trailing whitespace from a string. See TrimRight.
Upper = 92Converts a string to uppercase. See Upper.
Year = 93Extracts 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.