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