110 references to FunctionCall
System.Data.Linq (110)
SqlClient\Common\SqlFactory.cs (5)
168
return
FunctionCall
(typeof(int), "LEN", new SqlExpression[] { expr }, expr.SourceExpression);
176
return
FunctionCall
(typeof(int), "DATALENGTH", new SqlExpression[] { expr }, expr.SourceExpression);
188
return
FunctionCall
(
206
return
FunctionCall
(
224
return
FunctionCall
(
SqlClient\Query\QueryConverter.cs (1)
700
return sql.
FunctionCall
(typeof(DateTime), "CONVERT", new SqlExpression[2] { datetime2, expr }, expr.SourceExpression);
SqlClient\Query\SqlMethodCallConverter.cs (101)
722
return sql.
FunctionCall
(typeof(string), "REPLICATE", new SqlExpression[] { sox.Args[0], sox.Args[1] }, sox.SourceExpression);
734
SqlExpression char2 = sql.
FunctionCall
(typeof(void), "NCHAR", new SqlExpression[1] { sql.ValueFromObject(2, false, source) }, source);
735
SqlExpression char4 = sql.
FunctionCall
(typeof(void), "NCHAR", new SqlExpression[1] { sql.ValueFromObject(4, false, source) }, source);
736
SqlExpression year = sql.
FunctionCall
(typeof(string), "CONVERT", new SqlExpression[2] { char4, sox.Args[0] }, source);
737
SqlExpression month = sql.
FunctionCall
(typeof(string), "CONVERT", new SqlExpression[2] { char2, sox.Args[1] }, source);
738
SqlExpression day = sql.
FunctionCall
(typeof(string), "CONVERT", new SqlExpression[2] { char2, sox.Args[2] }, source);
742
return sql.
FunctionCall
(typeof(DateTime), "CONVERT", new SqlExpression[3] { datetime, date, sql.ValueFromObject(101, false, source) }, source);
749
SqlExpression hour = sql.
FunctionCall
(typeof(string), "CONVERT", new SqlExpression[2] { char2, sox.Args[3] }, source);
750
SqlExpression minute = sql.
FunctionCall
(typeof(string), "CONVERT", new SqlExpression[2] { char2, sox.Args[4] }, source);
751
SqlExpression second = sql.
FunctionCall
(typeof(string), "CONVERT", new SqlExpression[2] { char2, sox.Args[5] }, source);
756
return sql.
FunctionCall
(typeof(DateTime), "CONVERT", new SqlExpression[3] { datetime, dateAndTime, sql.ValueFromObject(120, false, source) }, source);
761
SqlExpression msRaw = sql.
FunctionCall
(typeof(string), "CONVERT", new SqlExpression[2] {char4,
766
SqlExpression len = sql.
FunctionCall
(typeof(int), "LEN", new SqlExpression[1] { msRaw }, source);
768
ms = sql.
FunctionCall
(typeof(string), "SUBSTRING", new SqlExpression[3] { msRaw, startIndex, sql.ValueFromObject(3, false, source) }, source);
771
ms = sql.
FunctionCall
(typeof(string), "RIGHT", new SqlExpression[2] { msRaw, sql.ValueFromObject(3, false, source) }, source);
774
return sql.
FunctionCall
(typeof(DateTime), "CONVERT", new SqlExpression[3] { datetime, dateAndTime, sql.ValueFromObject(121, false, source) }, source);
787
return sql.
FunctionCall
(typeof(DateTimeOffset), "TODATETIMEOFFSET",
794
return sql.
FunctionCall
(typeof(DateTimeOffset), "TODATETIMEOFFSET",
808
SqlExpression char2 = sql.
FunctionCall
(typeof(void), "NCHAR", new SqlExpression[1] { sql.ValueFromObject(2, false, source) }, source);
809
SqlExpression char4 = sql.
FunctionCall
(typeof(void), "NCHAR", new SqlExpression[1] { sql.ValueFromObject(4, false, source) }, source);
810
SqlExpression char5 = sql.
FunctionCall
(typeof(void), "NCHAR", new SqlExpression[1] { sql.ValueFromObject(5, false, source) }, source);
813
SqlExpression yyRaw = sql.
FunctionCall
(typeof(string), "CONVERT", new SqlExpression[2] {char5,
815
SqlExpression year = sql.
FunctionCall
(typeof(string), "RIGHT", new SqlExpression[2] { yyRaw, sql.ValueFromObject(4, false, source) }, source);
817
SqlExpression month = sql.
FunctionCall
(typeof(string), "CONVERT", new SqlExpression[2] { char2, sox.Args[1] }, source);
818
SqlExpression day = sql.
FunctionCall
(typeof(string), "CONVERT", new SqlExpression[2] { char2, sox.Args[2] }, source);
820
SqlExpression hour = sql.
FunctionCall
(typeof(string), "CONVERT", new SqlExpression[2] { char2, sox.Args[3] }, source);
821
SqlExpression minute = sql.
FunctionCall
(typeof(string), "CONVERT", new SqlExpression[2] { char2, sox.Args[4] }, source);
822
SqlExpression second = sql.
FunctionCall
(typeof(string), "CONVERT", new SqlExpression[2] { char2, sox.Args[5] }, source);
833
result = sql.
FunctionCall
(typeof(DateTimeOffset), "CONVERT", new SqlExpression[3] { datetimeoffset, dateAndTime, sql.ValueFromObject(120, false, source) }, source);
838
SqlExpression msRaw = sql.
FunctionCall
(typeof(string), "CONVERT", new SqlExpression[2] {char4,
840
SqlExpression ms = sql.
FunctionCall
(typeof(string), "RIGHT", new SqlExpression[2] { msRaw, sql.ValueFromObject(3, false, source) }, source);
842
result = sql.
FunctionCall
(typeof(DateTimeOffset), "CONVERT", new SqlExpression[3] { datetimeoffset, dateAndTime, sql.ValueFromObject(121, false, source) }, source);
848
return sql.
FunctionCall
(typeof(DateTimeOffset), "TODATETIMEOFFSET",
1020
return sql.
FunctionCall
(typeof(int), "DATEDIFF",
1190
returnValue = sql.
FunctionCall
(typeof(TimeSpan), "ABS", new SqlExpression[] { mc.Object }, source);
1299
SqlExpression intDays = sql.
FunctionCall
(typeof(int), "DATEDIFF",
1301
SqlExpression startPlusDays = sql.
FunctionCall
(
1303
SqlExpression intMSec = sql.
FunctionCall
(typeof(int), "DATEDIFF",
1320
SqlExpression intDays = sql.
FunctionCall
(typeof(int), "DATEDIFF", new SqlExpression[] { day, start, end }, bo.SourceExpression);
1321
SqlExpression startPlusDays = sql.
FunctionCall
(typeof(DateTimeOffset), "DATEADD", new SqlExpression[] { day, intDays, start }, bo.SourceExpression);
1322
SqlExpression intMSec = sql.
FunctionCall
(typeof(int), "DATEDIFF", new SqlExpression[] { ms, startPlusDays, end }, bo.SourceExpression);
1323
SqlExpression startPlusDaysPlusMsec = sql.
FunctionCall
(typeof(DateTimeOffset), "DATEADD", new SqlExpression[] { ms, intMSec, startPlusDays }, bo.SourceExpression);
1324
SqlExpression intUSec = sql.
FunctionCall
(typeof(int), "DATEDIFF", new SqlExpression[] { us, startPlusDaysPlusMsec, end }, bo.SourceExpression);
1325
SqlExpression startPlusDaysPlusMsecPlusUSec = sql.
FunctionCall
(typeof(DateTimeOffset), "DATEADD", new SqlExpression[] { us, intUSec, startPlusDaysPlusMsec }, bo.SourceExpression);
1326
SqlExpression intNSec = sql.
FunctionCall
(typeof(int), "DATEDIFF", new SqlExpression[] { ns, startPlusDaysPlusMsecPlusUSec, end }, bo.SourceExpression);
1327
SqlExpression startPlusDaysPlusMsecPlusUSecPlusNSec = sql.
FunctionCall
(typeof(DateTimeOffset), "DATEADD", new SqlExpression[] { ns, intNSec, startPlusDaysPlusMsecPlusUSec }, bo.SourceExpression);
1408
return sql.
FunctionCall
(mc.Method.ReturnType, "ROUND", mc.Arguments, mc.SourceExpression);
1418
return sql.
FunctionCall
(mc.Method.ReturnType, "ROUND",
1427
return sql.
FunctionCall
(mc.Method.ReturnType, "ROUND",
1492
return sql.
FunctionCall
(type, functionName, new SqlExpression[] { arguments[0] }, source);
1496
return sql.
FunctionCall
(type, functionName, new SqlExpression[] { arguments[0], arguments[1] }, source);
1613
SqlExpression @else = sql.Subtract(sql.
FunctionCall
(typeof(int), "CHARINDEX",
1633
SqlExpression @else = sql.Subtract(sql.
FunctionCall
(typeof(int), "CHARINDEX",
1656
SqlExpression substring = sql.
FunctionCall
(
1664
SqlExpression @else = sql.Subtract(sql.
FunctionCall
(typeof(int), "CHARINDEX",
1685
SqlExpression reverseS = sql.
FunctionCall
(typeof(string), "REVERSE", new SqlExpression[] { exprS }, source);
1686
SqlExpression reversePart = sql.
FunctionCall
(typeof(string), "REVERSE", new SqlExpression[] { exprPart }, source);
1687
SqlExpression charIndex = sql.
FunctionCall
(typeof(int), "CHARINDEX", new SqlExpression[] { exprPart, exprS }, source);
1688
SqlExpression charIndexOfReverse = sql.
FunctionCall
(typeof(int), "CHARINDEX", new SqlExpression[] { reversePart, reverseS }, source);
1718
SqlExpression first = sql.
FunctionCall
(typeof(string), "LEFT", new SqlExpression[] { s, sql.Add(i, 1) }, source);
1719
SqlExpression reverseFirst = sql.
FunctionCall
(typeof(string), "REVERSE", new SqlExpression[] { first }, source);
1720
SqlExpression reversePart = sql.
FunctionCall
(typeof(string), "REVERSE", new SqlExpression[] { part }, source);
1721
SqlExpression charIndex = sql.
FunctionCall
(typeof(int), "CHARINDEX", new SqlExpression[] { part, first }, source);
1722
SqlExpression charIndexOfReverse = sql.
FunctionCall
(typeof(int), "CHARINDEX", new SqlExpression[] { reversePart, reverseFirst }, source);
1755
SqlExpression first = sql.
FunctionCall
(typeof(string), "LEFT", new SqlExpression[] { s, sql.Add(i, 1) }, source);
1756
SqlExpression reverseFirst = sql.
FunctionCall
(typeof(string), "REVERSE", new SqlExpression[] { first }, source);
1757
SqlExpression reversePart = sql.
FunctionCall
(typeof(string), "REVERSE", new SqlExpression[] { part }, source);
1758
SqlExpression charIndex = sql.
FunctionCall
(typeof(int), "CHARINDEX", new SqlExpression[] { part, first }, source);
1759
SqlExpression charIndexOfReverse = sql.
FunctionCall
(typeof(int), "CHARINDEX", new SqlExpression[] { reversePart, reverseFirst }, source);
1784
SqlFunctionCall stuffCall = sql.
FunctionCall
(
1815
SqlExpression padding = sql.
FunctionCall
(typeof(string), "SPACE", new SqlExpression[] { numSpaces }, source);
1831
SqlExpression padding = sql.
FunctionCall
(typeof(string), "REPLICATE", new SqlExpression[] { exprC, numSpaces }, source);
1848
SqlExpression padding = sql.
FunctionCall
(typeof(string), "SPACE", new SqlExpression[] { numSpaces }, source);
1864
SqlExpression padding = sql.
FunctionCall
(typeof(string), "REPLICATE", new SqlExpression[] { exprC, numSpaces }, source);
1873
return sql.
FunctionCall
(
1884
return sql.
FunctionCall
(
1902
return sql.
FunctionCall
(
1912
return sql.
FunctionCall
(
1922
return sql.
FunctionCall
(
1934
return sql.
FunctionCall
(
1937
sql.
FunctionCall
(typeof(string), "RTRIM", new SqlExpression[] { mc.Object }, source)
1944
return sql.
FunctionCall
(typeof(string), "LOWER", new SqlExpression[] { mc.Object }, source);
1949
return sql.
FunctionCall
(typeof(string), "UPPER", new SqlExpression[] { mc.Object }, source);
1955
return sql.
FunctionCall
(typeof(char), "SUBSTRING", new SqlExpression[]
1979
return sql.
FunctionCall
(mc.Arguments[0].ClrType, "ABS", new SqlExpression[] { mc.Arguments[0] }, source);
2020
SqlExpression expX = sql.
FunctionCall
(typeof(double), "EXP", new SqlExpression[] { x }, source);
2022
SqlExpression expMinusX = sql.
FunctionCall
(typeof(double), "EXP", new SqlExpression[] { minusX }, source);
2044
SqlExpression log1 = sql.
FunctionCall
(typeof(double), "LOG", new SqlExpression[] { mc.Arguments[0] }, source);
2045
SqlExpression log2 = sql.
FunctionCall
(typeof(double), "LOG", new SqlExpression[] { mc.Arguments[1] }, source);
2097
return sql.
FunctionCall
(x.ClrType, "round", new SqlExpression[] { x, i }, source);
2105
SqlExpression roundX = sql.
FunctionCall
(type, "round", new SqlExpression[] { x, i }, source);
2107
SqlExpression round2X = sql.
FunctionCall
(type, "round", new SqlExpression[] { twiceX, i }, source);
2109
SqlExpression specialCase = sql.Multiply(sql.
FunctionCall
(type, "round", new SqlExpression[] { sql.Divide(x, 2), i }, source), 2);
2115
return sql.
FunctionCall
(typeof(int), "SIGN", new SqlExpression[] { mc.Arguments[0] }, source);
2126
SqlExpression exp = sql.
FunctionCall
(typeof(double), "EXP", new SqlExpression[] { x }, source);
2128
SqlExpression expMinus = sql.
FunctionCall
(typeof(double), "EXP", new SqlExpression[] { minusX }, source);
2145
SqlExpression expX = sql.
FunctionCall
(typeof(double), "EXP", new SqlExpression[] { x }, source);
2147
SqlExpression expMinusX = sql.
FunctionCall
(typeof(double), "EXP", new SqlExpression[] { minusX }, source);
2155
return sql.
FunctionCall
(mc.Method.ReturnType, "ROUND", new SqlExpression[] { x, sql.ValueFromObject(0, false, source), sql.ValueFromObject(1, false, source) }, source);
2186
return sql.
FunctionCall
(typeof(DateTime), "CONVERT", new SqlExpression[2] { date, exp }, source);
2211
return sql.
FunctionCall
(typeof(DateTime), "CONVERT", new SqlExpression[2] { datetime, exp }, source);
SqlClient\Query\SqlTypeConverter.cs (3)
88
return sql.
FunctionCall
(uo.ClrType, "NCHAR", new SqlExpression[] { uo.Operand }, uo.SourceExpression);
124
SqlExpression nvarchar = sql.
FunctionCall
(
129
return sql.
FunctionCall
(