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