309 references to Append
System.Data.Entity (309)
System\Data\SqlClient\SqlGen\OptionalColumn.cs (1)
39
m_builder.
Append
(s);
System\Data\SqlClient\SqlGen\SqlFunctionCallHandler.cs (119)
487
result.
Append
(functionName);
632
result.
Append
(functionName);
644
result.
Append
(" CAST(");
651
result.
Append
(" AS ");
652
result.
Append
(returnType);
653
result.
Append
(")");
683
result.
Append
("(");
687
result.
Append
(separator);
688
result.
Append
(arg.Accept(sqlgen));
691
result.
Append
(")");
812
result.
Append
(instanceExpression.Accept(sqlgen));
814
result.
Append
(".");
815
result.
Append
(functionName);
846
result.
Append
("(");
848
result.
Append
(e.Arguments[0].Accept(sqlgen));
851
result.
Append
(")");
854
result.
Append
(" ");
856
result.
Append
(_functionNameToOperatorDictionary[e.Function.Name]);
857
result.
Append
(" ");
861
result.
Append
("(");
863
result.
Append
(e.Arguments[e.Arguments.Count - 1].Accept(sqlgen));
866
result.
Append
(")");
931
result.
Append
("(");
934
result.
Append
(datepart);
940
result.
Append
(separator);
941
result.
Append
(e.Arguments[i].Accept(sqlgen));
944
result.
Append
(")");
985
result.
Append
("DATEPART (");
986
result.
Append
(datepart);
987
result.
Append
(", ");
990
result.
Append
(e.Arguments[0].Accept(sqlgen));
992
result.
Append
(")");
1115
result.
Append
("DATEADD(year, ");
1117
result.
Append
(" - 1, ");
1120
result.
Append
("convert (");
1121
result.
Append
(typeName);
1122
result.
Append
(",");
1131
result.
Append
("'0001'");
1139
result.
Append
(" + '-' + ");
1143
result.
Append
(" + '-' + ");
1145
result.
Append
(" + ' ' + ");
1152
result.
Append
(" + ':' + ");
1156
result.
Append
(" + ':' + str(");
1157
result.
Append
(args[currentArgumentIndex++].Accept(sqlgen));
1161
result.
Append
(", 6, 3)");
1165
result.
Append
(", 10, 7)");
1171
result.
Append
(" + (CASE WHEN ");
1173
result.
Append
(" >= 0 THEN '+' ELSE '-' END) + convert(varchar(255), ABS(");
1175
result.
Append
("/60)) + ':' + convert(varchar(255), ABS(");
1177
result.
Append
("%60))");
1180
result.
Append
(", 121)");
1184
result.
Append
(")");
1196
result.
Append
("convert(varchar(255), ");
1197
result.
Append
(e.Accept(sqlgen));
1198
result.
Append
(")");
1239
result.
Append
("convert (");
1240
result.
Append
(typeName);
1241
result.
Append
(", convert(varchar(255), ");
1242
result.
Append
(e.Arguments[0].Accept(sqlgen));
1243
result.
Append
(", 102) ");
1247
result.
Append
("+ ' 00:00:00 ' + Right(convert(varchar(255), ");
1248
result.
Append
(e.Arguments[0].Accept(sqlgen));
1249
result.
Append
(", 121), 6) ");
1252
result.
Append
(", 102)");
1280
result.
Append
("DATEADD (");
1281
result.
Append
(_dateAddFunctionNameToDatepartDictionary[e.Function.Name]);
1282
result.
Append
(", ");
1283
result.
Append
(e.Arguments[1].Accept(sqlgen));
1284
result.
Append
(", ");
1285
result.
Append
(e.Arguments[0].Accept(sqlgen));
1286
result.
Append
(")");
1315
result.
Append
("DATEDIFF (");
1316
result.
Append
(_dateDiffFunctionNameToDatepartDictionary[e.Function.Name]);
1317
result.
Append
(", ");
1318
result.
Append
(e.Arguments[0].Accept(sqlgen));
1319
result.
Append
(", ");
1320
result.
Append
(e.Arguments[1].Accept(sqlgen));
1321
result.
Append
(")");
1407
result.
Append
(" CAST(");
1410
result.
Append
("ROUND(");
1413
result.
Append
(e.Arguments[0].Accept(sqlgen));
1414
result.
Append
(", ");
1418
result.
Append
(e.Arguments[1].Accept(sqlgen));
1422
result.
Append
("0");
1427
result.
Append
(", 1");
1430
result.
Append
(")");
1434
result.
Append
(" AS real)");
1451
result.
Append
(e.Arguments[0].Accept(sqlgen));
1470
result.
Append
("LTRIM(RTRIM(");
1473
result.
Append
(e.Arguments[0].Accept(sqlgen));
1475
result.
Append
("))");
1514
result.
Append
(targetExpression.Accept(sqlgen));
1515
result.
Append
(" LIKE ");
1528
result.
Append
(escapedSearchParamExpression.Accept(sqlgen));
1532
result.
Append
(" ESCAPE '" + SqlProviderManifest.LikeEscapeChar + "'");
1569
result.
Append
("CHARINDEX( ");
1570
result.
Append
(args[1].Accept(sqlgen));
1571
result.
Append
(", ");
1572
result.
Append
(args[0].Accept(sqlgen));
1573
result.
Append
(") > 0");
1612
result.
Append
("CHARINDEX( ");
1613
result.
Append
(args[1].Accept(sqlgen));
1614
result.
Append
(", ");
1615
result.
Append
(args[0].Accept(sqlgen));
1616
result.
Append
(") = 1");
1661
result.
Append
("CHARINDEX( REVERSE(");
1662
result.
Append
(args[1].Accept(sqlgen));
1663
result.
Append
("), REVERSE(");
1664
result.
Append
(args[0].Accept(sqlgen));
1665
result.
Append
(")) = 1");
1681
result.
Append
("CASE WHEN (");
1683
result.
Append
(") THEN cast(1 as bit) WHEN ( NOT (");
1685
result.
Append
(")) THEN cast(0 as bit) END");
1713
result.
Append
(storeFunctionName.ToUpperInvariant());
1717
result.
Append
(storeFunctionName);
1724
result.
Append
(SqlGenerator.QuoteIdentifier(function.NamespaceName));
1728
result.
Append
(SqlGenerator.QuoteIdentifier(function.Schema));
1730
result.
Append
(".");
1731
result.
Append
(SqlGenerator.QuoteIdentifier(storeFunctionName));
System\Data\SqlClient\SqlGen\SqlGenerator.cs (188)
533
sqlBuilder.
Append
("SELECT ");
534
sqlBuilder.
Append
(targetTree.Query.Accept(this));
649
result.
Append
(" -(");
650
result.
Append
(e.Arguments[0].Accept(this));
651
result.
Append
(")");
673
result.
Append
("CASE");
676
result.
Append
(" WHEN (");
677
result.
Append
(e.When[i].Accept(this));
678
result.
Append
(") THEN ");
679
result.
Append
(e.Then[i].Accept(this));
685
result.
Append
(" ELSE ");
686
result.
Append
(e.Else.Accept(this));
689
result.
Append
(" END");
708
result.
Append
(" CAST( ");
709
result.
Append
(e.Argument.Accept(this));
710
result.
Append
(" AS ");
711
result.
Append
(GetSqlPrimitiveType(e.ResultType));
712
result.
Append
(")");
918
result.
Append
(e.Value.ToString());
922
result.
Append
(" 0x");
923
result.
Append
(ByteArrayToBinaryString((Byte[])e.Value));
924
result.
Append
(" ");
938
result.
Append
("convert(");
939
result.
Append
(this.IsPreKatmai ? "datetime" : "datetime2");
940
result.
Append
(", ");
941
result.
Append
(EscapeSingleQuote(((System.DateTime)e.Value).ToString(this.IsPreKatmai ? "yyyy-MM-dd HH:mm:ss.fff" : "yyyy-MM-dd HH:mm:ss.fffffff", CultureInfo.InvariantCulture), false /* IsUnicode */));
942
result.
Append
(", 121)");
947
result.
Append
("convert(");
948
result.
Append
(e.ResultType.EdmType.Name);
949
result.
Append
(", ");
950
result.
Append
(EscapeSingleQuote(e.Value.ToString(), false /* IsUnicode */));
951
result.
Append
(", 121)");
956
result.
Append
("convert(");
957
result.
Append
(e.ResultType.EdmType.Name);
958
result.
Append
(", ");
959
result.
Append
(EscapeSingleQuote(((System.DateTimeOffset)e.Value).ToString("yyyy-MM-dd HH:mm:ss.fffffff zzz", CultureInfo.InvariantCulture), false /* IsUnicode */));
960
result.
Append
(", 121)");
1022
result.
Append
(EscapeSingleQuote(e.Value as string, isUnicode));
1075
result.
Append
(SqlFunctionCallHandler.GenerateFunctionCallSql(this, functionExpression));
1137
result.
Append
(value);
1141
result.
Append
("cast(");
1142
result.
Append
(value);
1143
result.
Append
(" as ");
1144
result.
Append
(typeName);
1145
result.
Append
(")");
1204
result.
Append
("(");
1205
result.
Append
(VisitExpressionEnsureSqlStatement(e.Argument));
1206
result.
Append
(")");
1250
result.
Append
(GetTargetTSql(target));
1257
result.From.
Append
(GetTargetTSql(target));
1469
result.GroupBy.
Append
(separator);
1476
result.Select.
Append
(separator);
1478
result.Select.
Append
(keySql);
1479
result.Select.
Append
(" AS ");
1480
result.Select.
Append
(alias);
1482
result.GroupBy.
Append
(keySql);
1487
innerQuery.Select.
Append
(separator);
1489
innerQuery.Select.
Append
(keySql);
1490
innerQuery.Select.
Append
(" AS ");
1491
innerQuery.Select.
Append
(alias);
1495
result.Select.
Append
(separator);
1497
result.Select.
Append
(fromSymbol);
1498
result.Select.
Append
(".");
1499
result.Select.
Append
(alias);
1500
result.Select.
Append
(" AS ");
1501
result.Select.
Append
(alias);
1503
result.GroupBy.
Append
(alias);
1525
wrappingAggregateArgument.
Append
(fromSymbol);
1526
wrappingAggregateArgument.
Append
(".");
1527
wrappingAggregateArgument.
Append
(alias);
1530
innerQuery.Select.
Append
(separator);
1532
innerQuery.Select.
Append
(translatedAggregateArgument);
1533
innerQuery.Select.
Append
(" AS ");
1534
innerQuery.Select.
Append
(alias);
1543
result.Select.
Append
(separator);
1545
result.Select.
Append
(aggregateResult);
1546
result.Select.
Append
(" AS ");
1547
result.Select.
Append
(alias);
1667
result.
Append
(e.Argument.Accept(this));
1668
result.
Append
(" LIKE ");
1669
result.
Append
(e.Pattern.Accept(this));
1675
result.
Append
(" ESCAPE ");
1676
result.
Append
(e.Escape.Accept(this));
1819
result.
Append
(" NOT (");
1820
result.
Append
(e.Argument.Accept(this));
1821
result.
Append
(")");
1835
result.
Append
("CAST(NULL AS ");
1847
result.
Append
("varchar(1)");
1850
result.
Append
("varbinary(1)");
1853
result.
Append
(GetSqlPrimitiveType(type));
1857
result.
Append
(")");
1914
sqlBuilder.
Append
(" OR ");
1941
sqlBuilder.
Append
(" = ");
1951
sqlBuilder.
Append
(" IN (");
1958
sqlBuilder.
Append
(",");
1966
sqlBuilder.
Append
(")");
1975
sqlBuilder.
Append
(" OR ");
1977
sqlBuilder.
Append
(VisitIsNullExpression(isNullExpression, false)); // We never try to build IN with a NOT in the tree
2018
sqlBuilder.
Append
(VisitConstant((DbConstantExpression)value, isSameEdmType));
2220
result.
Append
("@" + e.ParameterName);
2263
result.Select.
Append
(VisitNewInstanceExpression(newInstanceExpression, aliasesNeedRenaming, out newColumns));
2272
result.Select.
Append
(e.Projection.Accept(this));
2351
result.
Append
(symbolPair.Source);
2352
result.
Append
(".");
2355
result.
Append
(columnSymbol);
2363
result.
Append
(instanceSql);
2364
result.
Append
(".");
2373
result.
Append
(colSymbol);
2377
result.
Append
(QuoteIdentifier(e.Property.Name));
2384
result.
Append
(QuoteIdentifier(e.Property.Name));
2402
result.
Append
("EXISTS (");
2407
result.
Append
("NOT EXISTS (");
2416
result.
Append
(filter);
2417
result.
Append
(")");
2479
input.Select.
Append
("row_number() OVER (ORDER BY ");
2481
input.Select.
Append
(") AS ");
2490
input.Select.
Append
(row_numberSymbol);
2501
result.From.
Append
("( ");
2502
result.From.
Append
(input);
2504
result.From.
Append
(") ");
2540
result.Where.
Append
(resultFromSymbol);
2541
result.Where.
Append
(".");
2542
result.Where.
Append
(row_numberSymbol);
2543
result.Where.
Append
(" > ");
2544
result.Where.
Append
(HandleCountExpression(e.Count));
2665
aggregateResult.
Append
("COUNT_BIG");
2672
aggregateResult.
Append
("(");
2677
aggregateResult.
Append
("DISTINCT ");
2680
aggregateResult.
Append
(aggregateArgument);
2682
aggregateResult.
Append
(")");
2695
result.
Append
("(");
2696
result.
Append
(e.Accept(this));
2697
result.
Append
(")");
2701
result.
Append
(e.Accept(this));
2729
result.
Append
(op);
2808
result.
Append
(VisitConstant((DbConstantExpression)left, isCastOptional));
2815
result.
Append
(op);
2819
result.
Append
(VisitConstant((DbConstantExpression)right, isCastOptional));
2894
result.
Append
(" NOT");
2896
result.
Append
(" EXISTS (");
2897
result.
Append
(VisitExpressionEnsureSqlStatement(e.Argument));
2899
result.
Append
(")");
2945
resultSql.
Append
(" SELECT CAST(null as ");
2946
resultSql.
Append
(GetSqlPrimitiveType(collectionType.TypeUsage));
2947
resultSql.
Append
(") AS X FROM (SELECT 1) AS Y WHERE 1=0");
2952
resultSql.
Append
(separator);
2953
resultSql.
Append
(" SELECT ");
2954
resultSql.
Append
(arg.Accept(this));
2958
resultSql.
Append
(" AS X ");
2979
result.
Append
(e.Argument.Accept(this));
2984
result.
Append
(" IS NULL");
2988
result.
Append
(" IS NOT NULL");
3052
result.From.
Append
(separator + " ");
3083
result.From.
Append
(" ON ");
3085
result.From.
Append
(joinCondition.Accept(this));
3193
result.From.
Append
(" (");
3194
result.From.
Append
(sqlSelectStatement);
3195
result.From.
Append
(" )");
3199
result.From.
Append
(fromExtentFragment);
3278
result.
Append
(separator);
3280
result.
Append
(argument.Accept(this));
3281
result.
Append
(" AS ");
3287
result.
Append
(column);
3292
result.
Append
(QuoteIdentifier(member.Name));
3326
setStatement.
Append
(leftSelectStatement);
3328
setStatement.
Append
(separator); // e.g. UNION ALL
3330
setStatement.
Append
(rightSelectStatement);
3347
selectStatement.From.
Append
("( ");
3348
selectStatement.From.
Append
(setStatement);
3350
selectStatement.From.
Append
(") ");
3670
selectStatement.From.
Append
(" AS ");
3671
selectStatement.From.
Append
(fromSymbol);
3695
orderByClause.
Append
(separator);
3696
orderByClause.
Append
(sortClause.Expression.Accept(this));
3701
orderByClause.
Append
(" COLLATE ");
3702
orderByClause.
Append
(sortClause.Collation);
3705
orderByClause.
Append
(sortClause.Ascending ? " ASC" : " DESC");
3786
selectStatement.From.
Append
("( ");
3787
selectStatement.From.
Append
(oldStatement);
3789
selectStatement.From.
Append
(") ");
3902
sqlBuilder.
Append
(((DbConstantExpression)e).Value.ToString());
4169
result.Where.
Append
("NOT (");
4171
result.Where.
Append
(predicate.Accept(this));
4174
result.Where.
Append
(")");
4202
result.From.
Append
(sqlFragment);
4206
result.From.
Append
(" (");
4207
result.From.
Append
(sqlFragment);
4208
result.From.
Append
(")");
System\Data\SqlClient\SqlGen\TopClause.cs (1)
67
sqlBuilder.
Append
(topCount.ToString(CultureInfo.InvariantCulture));