00001 #ifndef _IEXPRESSIONCAPABILITIES_H_
00002 #define _IEXPRESSIONCAPABILITIES_H_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifdef _WIN32
00023 #pragma once
00024 #endif
00025
00026 #include <FdoStd.h>
00027 #include <Fdo/Expression/ExpressionType.h>
00028 #include <Fdo/Connections/Capabilities/FunctionDefinitionCollection.h>
00029
00030
00031
00032 #define FDO_FUNCTION_AVG L"Avg" // Returns the average value of an expression
00033 #define FDO_FUNCTION_COUNT L"Count" // Returns the number of objects in the query
00034 #define FDO_FUNCTION_MAX L"Max" // Returns the maximum value of an expression
00035 #define FDO_FUNCTION_MEDIAN L"Median" // Returns the middle value or an interpolated value that
00036
00037
00038 #define FDO_FUNCTION_MIN L"Min" // Returns the minimum value of an expression
00039 #define FDO_FUNCTION_SPATIALEXTENTS L"SpatialExtents" // Returns the minimum bounding rectangle of a geometry
00040
00041 #define FDO_FUNCTION_STDDEV L"Stddev" // Returns the standard deviation of an expression
00042 #define FDO_FUNCTION_SUM L"Sum" // Returns the sum of values of an expression
00043
00044
00045 #define FDO_FUNCTION_NULLVALUE L"NullValue" // Evaluates two expressions and returns the first one if it does not
00046
00047 #define FDO_FUNCTION_TODATE L"ToDate" // Converts a string to a date
00048 #define FDO_FUNCTION_TODOUBLE L"ToDouble" // Converts a numeric or string expression to a double
00049 #define FDO_FUNCTION_TOFLOAT L"ToFloat" // Converts a numeric or string expression to a float
00050 #define FDO_FUNCTION_TOINT32 L"ToInt32" // Converts a numeric or string expression to an int32
00051 #define FDO_FUNCTION_TOINT64 L"ToInt64" // Converts a numeric or string expression to an int64
00052 #define FDO_FUNCTION_TOSTRING L"ToString" // Converts a numeric or date expression to a string
00053
00054
00055 #define FDO_FUNCTION_ADDMONTHS L"AddMonths" // Adds a specified number of months to a date expression
00056 #define FDO_FUNCTION_CURRENTDATE L"CurrentDate" // Returns the current date
00057 #define FDO_FUNCTION_EXTRACT L"Extract" // Extracts a specified portion of a date
00058 #define FDO_FUNCTION_EXTRACTTODOUBLE L"ExtractToDouble" // Extracts a specified portion of a date to a double
00059 #define FDO_FUNCTION_EXTRACTTOINT L"ExtractToInt" // Extracts a specified portion of a date to an integer
00060 #define FDO_FUNCTION_MONTHSBETWEEN L"MonthsBetween" // Returns the number of months between two date expressions
00061
00062
00063 #define FDO_FUNCTION_ABS L"Abs" // Returns the absolute value of a numeric expression
00064 #define FDO_FUNCTION_ACOS L"Acos" // Returns the arc cosine of a numeric expression
00065 #define FDO_FUNCTION_ASIN L"Asin" // Returns the arc sine of a numeric expression
00066 #define FDO_FUNCTION_ATAN L"Atan" // Returns the arc tangent of a numeric expression
00067 #define FDO_FUNCTION_ATAN2 L"Atan2" // Returns the arc tangent calculated of two numeric expressions
00068 #define FDO_FUNCTION_COS L"Cos" // Returns the cosine of a numeric expression
00069 #define FDO_FUNCTION_EXP L"Exp" // Returns e raised to the power of a numeric expression
00070 #define FDO_FUNCTION_LN L"Ln" // Returns the natural logarithm of a numeric expression
00071 #define FDO_FUNCTION_LOG L"Log" // Returns the logarithm of a numeric expression calculated on a given
00072
00073 #define FDO_FUNCTION_MOD L"Mod" // Returns the remainder of a division of two numeric expressions
00074 #define FDO_FUNCTION_POWER L"Power" // Returns the result of one numeric expression raised to the power of
00075
00076 #define FDO_FUNCTION_REMAINDER L"Remainder" // Returns the remainder of a division of two numeric expressions
00077 #define FDO_FUNCTION_SIN L"Sin" // Returns the sine of a numeric expression
00078 #define FDO_FUNCTION_SQRT L"Sqrt" // Returns the square root of a numeric expression
00079 #define FDO_FUNCTION_TAN L"Tan" // Returns the tangent of a numeric expression
00080
00081
00082 #define FDO_FUNCTION_CEIL L"Ceil" // Returns the smallest integer greater than or equal to the expression value
00083 #define FDO_FUNCTION_FLOOR L"Floor" // Returns the largest integer equal to or less than the expression value
00084 #define FDO_FUNCTION_ROUND L"Round" // Returns the rounded value of an expression
00085 #define FDO_FUNCTION_SIGN L"Sign" // Returns -1 if a numeric expression evaluates to a value less than 0, 0
00086
00087
00088 #define FDO_FUNCTION_TRUNC L"Trunc" // Truncates a numeric or date expression
00089
00090
00091 #define FDO_FUNCTION_CONCAT L"Concat" // Returns the string concatenation of 2 expressions
00092 #define FDO_FUNCTION_INSTR L"Instr" // Returns the position of a substring in a string expression
00093 #define FDO_FUNCTION_LENGTH L"Length" // Returns the length of a string expression
00094 #define FDO_FUNCTION_LOWER L"Lower" // Returns strings with all lowercase letters
00095 #define FDO_FUNCTION_LPAD L"Lpad" // Pads a string expression to the left to defined length
00096 #define FDO_FUNCTION_LTRIM L"Ltrim" // Removes leading blanks from a string expression
00097 #define FDO_FUNCTION_RPAD L"Rpad" // Pads a string expression to the right to defined length
00098 #define FDO_FUNCTION_RTRIM L"Rtrim" // Removes trailing blanks from a string expression
00099 #define FDO_FUNCTION_SOUNDEX L"Soundex" // Returns the phonetic representation of a string expression
00100 #define FDO_FUNCTION_SUBSTR L"Substr" // Extracts a substring from a string expression
00101 #define FDO_FUNCTION_TRANSLATE L"Translate" // Replaces a set of letters in a string expression
00102 #define FDO_FUNCTION_TRIM L"Trim" // Removes leading and/or trailing blanks from a string expression
00103 #define FDO_FUNCTION_UPPER L"Upper" // Returns strings with all letters uppercase
00104
00105
00106 #define FDO_FUNCTION_AREA2D L"Area2D" // Returns the area of a geometry expression
00107 #define FDO_FUNCTION_LENGTH2D L"Length2D" // Returns the length of a geometry expression
00108 #define FDO_FUNCTION_X L"X" // Returns the X coordinate of a point geometry
00109 #define FDO_FUNCTION_Y L"Y" // Returns the Y coordinate of a point geometry
00110 #define FDO_FUNCTION_Z L"Z" // Returns the Z coordinate of a point geometry
00111 #define FDO_FUNCTION_M L"M" // Returns the M coordinate of a point geometry
00112
00113
00114
00115
00116 class FdoIExpressionCapabilities : public FdoIDisposable
00117 {
00118 protected:
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128 FDO_API static FdoFunctionDefinitionCollection *GetWellKnownFunctions ();
00129
00130 public:
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140 FDO_API virtual FdoExpressionType *GetExpressionTypes (FdoInt32& length) = 0;
00141
00142
00143
00144
00145
00146
00147
00148 FDO_API virtual FdoFunctionDefinitionCollection *GetFunctions () = 0;
00149
00150 };
00151 #endif
00152
00153