DbExpressions.SqlQueryTranslator.GetMathematicalFunctionBody C# (CSharp) Method

GetMathematicalFunctionBody() protected method

Returns the name of the function as it is defined in the target DBMS.
protected GetMathematicalFunctionBody ( DbMathematicalFunctionExpressionType mathematicalFunctionExpressionType ) : string
mathematicalFunctionExpressionType DbMathematicalFunctionExpressionType The that specifies the function name to return.
return string
        protected virtual string GetMathematicalFunctionBody(DbMathematicalFunctionExpressionType mathematicalFunctionExpressionType)
        {
            switch (mathematicalFunctionExpressionType)
            {
                case DbMathematicalFunctionExpressionType.Abs:
                    return "ABS({0})";
                case DbMathematicalFunctionExpressionType.Acos:
                    return "ACOS({0})";
                case DbMathematicalFunctionExpressionType.Asin:
                    return "ASIN({0})";
                case DbMathematicalFunctionExpressionType.Atan:
                    return "ATAN({0})";
                case DbMathematicalFunctionExpressionType.Atan2:
                    return "ATAN2({0})";
                case DbMathematicalFunctionExpressionType.Ceiling:
                    return "CEILING({0})";
                case DbMathematicalFunctionExpressionType.Cos:
                    return "COS({0})";
                case DbMathematicalFunctionExpressionType.Cot:
                    return "COT({0})";
                case DbMathematicalFunctionExpressionType.Degrees:
                    return "DEGREES({0})";
                case DbMathematicalFunctionExpressionType.Exp:
                    return "EXP({0})";
                case DbMathematicalFunctionExpressionType.Floor:
                    return "FLOOR({0})";
                case DbMathematicalFunctionExpressionType.Log:
                    return "LOG({0})";
                case DbMathematicalFunctionExpressionType.Log10:
                    return "LOG10({0})";
                case DbMathematicalFunctionExpressionType.PI:
                    return "PI()";
                case DbMathematicalFunctionExpressionType.Power:
                    return "POWER({0})";
                case DbMathematicalFunctionExpressionType.Radians:
                    return "RADIANS({0})";
                case DbMathematicalFunctionExpressionType.Rand:
                    return "RAND()";
                case DbMathematicalFunctionExpressionType.RandSeed:
                    return "RAND({0})";
                case DbMathematicalFunctionExpressionType.Round:
                    return "ROUND({0})";
                case DbMathematicalFunctionExpressionType.Sign:
                    return "SIGN({0})";
                case DbMathematicalFunctionExpressionType.Sin:
                    return "SIN({0})";
                case DbMathematicalFunctionExpressionType.Sqrt:
                    return "SQRT({0})";
                case DbMathematicalFunctionExpressionType.Square:
                    return "SQUARE({0})";
                case DbMathematicalFunctionExpressionType.Tan:
                    return "TAN({0})";
                default:
                    throw new ArgumentOutOfRangeException("mathematicalFunctionExpressionType", mathematicalFunctionExpressionType, " is not supported");
            }
        }