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

SpatialArea = 0

ST_Area(g) - The area of g as a double. https://blogs.msdn.microsoft.com/davidlean/2008/10/16/sql-2008-spatial-samples-part-9-of-9-handy-but-obvious-methods/

SpatialBoundary = 1

ST_Boundary(g) - Returns the boundary of g as a geometry. Boundary of a POLYGON is returned as LINESTRING Boundary of a LINESTRING is returned as a MULTIPOINT https://blogs.msdn.microsoft.com/davidlean/2008/10/25/sql-2008-spatial-samples-part-6-of-9-geometric-set-theory-methods/

SpatialBuffer = 2

ST_Buffer(g, d) - a buffer around the geometry g of distance d as a geometry (POLYGON). https://blogs.msdn.microsoft.com/davidlean/2008/10/24/sql-2008-spatial-samples-part-7-of-9-stbuffer-spatial-starts-here/

SpatialCentroid = 3

ST_Centroid(g) - The centroid of the geometry as a geometry (POINT). https://blogs.msdn.microsoft.com/davidlean/2008/10/25/sql-2008-spatial-samples-part-6-of-9-geometric-set-theory-methods/

SpatialConcaveHull = 4

ST_ConcaveHull(g) - Returns the smallest bounding shape that completely encloses a geometry with a concave area https://blogs.msdn.microsoft.com/davidlean/2008/10/26/sql-2008-spatial-samples-part-5-of-9-performance-improvement-methods/

SpatialContains = 5

ST_Contains(g1, g2) - Does g1 comlpetely contain g2 as a boolean. https://blogs.msdn.microsoft.com/davidlean/2008/10/24/sql-2008-spatial-samples-part-8-of-9-conditional-methods/

SpatialConvexHull = 6

ST_ConvexHull(g) - Returns the smallest bounding shape that completely encloses a geometry without a concave area https://blogs.msdn.microsoft.com/davidlean/2008/10/26/sql-2008-spatial-samples-part-5-of-9-performance-improvement-methods/

SpatialCovers = 7
SpatialCrosses = 8

ST_Crosses(g1, g2) - Does g2 spatially cross g1 (only true if the geometries have some but not all interior points in common. https://blogs.msdn.microsoft.com/davidlean/2008/10/24/sql-2008-spatial-samples-part-8-of-9-conditional-methods/

SpatialDifference = 9

ST_Difference(g1, g2) - Removes the parameter shape g1 from the shape g2. Order is important g1.STDifference(g2) yeilds a different result from g2.STDifference(g1). https://blogs.msdn.microsoft.com/davidlean/2008/10/25/sql-2008-spatial-samples-part-6-of-9-geometric-set-theory-methods/

SpatialDimension = 10

ST_Dimension(g) - Returns an integer to indicate the dimensionality of the spatial object. https://blogs.msdn.microsoft.com/davidlean/2008/10/29/sql-2008-spatial-sample-part-4-of-9-methods-for-drawing-spatial-shapes/

SpatialDisjoint = 11

ST_Disjoint(g1, g2) - Returns g2 if a geometry instance is spatially disjoint from another geometry instance. Returns g1 if it is not. https://blogs.msdn.microsoft.com/davidlean/2008/10/24/sql-2008-spatial-samples-part-8-of-9-conditional-methods/

SpatialDistance = 12

ST_Distance(g1, g2) - Distance between the closest parts of g1 and g2 Spatial Objects. https://blogs.msdn.microsoft.com/davidlean/2008/10/16/sql-2008-spatial-samples-part-9-of-9-handy-but-obvious-methods/

SpatialEndPoint = 13

ST_Endpoint(g) - This function returns a point. The point is the endpoint of a geometry Instance. https://msdn.microsoft.com/en-us/library/bb933879.aspx

SpatialEnvelope = 14

ST_Envelope(g) - This function is used to find the minimum rectangle that fits around the geometry instance. https://blogs.msdn.microsoft.com/davidlean/2008/10/26/sql-2008-spatial-samples-part-5-of-9-performance-improvement-methods/

SpatialEquals = 15
SpatialExteriorRing = 16
SpatialGeometryType = 17
SpatialInteriorRingN = 18
SpatialIntersection = 19
SpatialIntersects = 20
SpatialIsClosed = 21
SpatialIsEmpty = 22
SpatialIsRing = 23
SpatialIsSimple = 24
SpatialIsValid = 25
SpatialLength = 26
SpatialNumGeometries = 27
SpatialNumInteriorRing = 28
SpatialNumPoints = 29
SpatialOverlaps = 30
SpatialPointN = 31
SpatialPointOnSurface = 32
SpatialRelate = 33
SpatialSrid = 34
SpatialStartPoint = 35
SpatialSymDifference = 36
SpatialTouches = 37
SpatialUnion = 38
SpatialWithin = 39
SpatialX = 40
SpatialY = 41
Abs = 42

Returns the positive integer portion of a number. 1.2 => 1.2, -0.8 => 0.8

Power = 43
Sqrt = 44
Rand = 45
Round = 46

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

Ceiling = 47

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

Floor = 48

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

Substring = 49
Upper = 50
Lower = 51
Left = 52
TrimLeft = 53
Right = 54
TrimRight = 55
Trim = 56

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

Length = 57
Concat = 58
Replace = 59

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

IndexOf = 60

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

Day = 61
Month = 62
Year = 63
Hour = 64

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

Minute = 65

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

Second = 66

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

NullIf = 67
Count = 68
CountDistinct = 69
Average = 70
Sum = 71
Max = 72
Min = 73
Int = 74

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

Mod = 75
Sin = 76

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

Cos = 77

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

Tan = 78

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

Asin = 79

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

Acos = 80

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

Atan = 81

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

Atan2 = 82

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

Degrees = 83

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

Radians = 84

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

Random = 85
Now = 86
Any = 87
All = 88
Exists = 89
NotExists = 90
Cast = 91
Coalesce = 92

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

Today = 93

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.