From 3ff83c4516e715147c39122813020243c2c8c8f2 Mon Sep 17 00:00:00 2001 From: Smit Patel Date: Mon, 23 May 2022 11:48:20 -0700 Subject: [PATCH] Add more cast nodes in multi-line breaks during migrations (#28064) Resolves #27206 --- .../Internal/SqlServerStringTypeMapping.cs | 14 ++++----- .../MigrationsSqlGeneratorTestBase.cs | 29 +++++++++++++++++++ .../SqlServerMigrationsSqlGeneratorTest.cs | 14 +++++++++ .../SqliteMigrationsSqlGeneratorTest.cs | 11 +++++++ 4 files changed, 59 insertions(+), 9 deletions(-) diff --git a/src/EFCore.SqlServer/Storage/Internal/SqlServerStringTypeMapping.cs b/src/EFCore.SqlServer/Storage/Internal/SqlServerStringTypeMapping.cs index ed8f75818ed..9525eb908aa 100644 --- a/src/EFCore.SqlServer/Storage/Internal/SqlServerStringTypeMapping.cs +++ b/src/EFCore.SqlServer/Storage/Internal/SqlServerStringTypeMapping.cs @@ -187,7 +187,7 @@ protected override string GenerateNonNullSqlLiteral(object value) var lastConcatStartPoint = 0; var concatCount = 1; var concatStartList = new List(); - var castApplied = false; + var insideConcat = false; for (i = 0; i < stringValue.Length; i++) { var lineFeed = stringValue[i] == '\n'; @@ -282,12 +282,7 @@ protected override string GenerateNonNullSqlLiteral(object value) for (var j = concatStartList.Count - 1; j >= 0; j--) { - if (castApplied && j == 0) - { - builder.Insert(concatStartList[j], "CAST("); - } - - builder.Insert(concatStartList[j], "CONCAT("); + builder.Insert(concatStartList[j], "CONCAT(CAST("); builder.Append(')'); } @@ -307,7 +302,7 @@ void AddConcatOperatorIfNeeded() { if (builder.Length != 0) { - if (!castApplied) + if (!insideConcat) { builder.Append(" AS "); if (_isUtf16) @@ -316,7 +311,7 @@ void AddConcatOperatorIfNeeded() } builder.Append("varchar(max))"); - castApplied = true; + insideConcat = true; } builder.Append(", "); @@ -331,6 +326,7 @@ void AddConcatOperatorIfNeeded() { lastConcatStartPoint = builder.Length; concatCount = 1; + insideConcat = false; } } } diff --git a/test/EFCore.Relational.Specification.Tests/Migrations/MigrationsSqlGeneratorTestBase.cs b/test/EFCore.Relational.Specification.Tests/Migrations/MigrationsSqlGeneratorTestBase.cs index 423e4293fe2..70d487b5021 100644 --- a/test/EFCore.Relational.Specification.Tests/Migrations/MigrationsSqlGeneratorTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Migrations/MigrationsSqlGeneratorTestBase.cs @@ -694,6 +694,35 @@ public virtual void DefaultValue_with_line_breaks(bool isUnicode) } }); + [ConditionalTheory] + [InlineData(false)] + [InlineData(true)] + public virtual void DefaultValue_with_line_breaks_2(bool isUnicode) + { + var defaultValue = Enumerable.Range(0, 300).Select(e => e.ToString()) + .Select(e => e + "\r\n") + .Join(""); + + Generate( + new CreateTableOperation + { + Name = "TestLineBreaks", + Schema = "dbo", + Columns = + { + new AddColumnOperation + { + Name = "TestDefaultValue", + Table = "TestLineBreaks", + Schema = "dbo", + ClrType = typeof(string), + DefaultValue = defaultValue, + IsUnicode = isUnicode + } + } + }); + } + private static void CreateGotModel(ModelBuilder b) => b.HasDefaultSchema("dbo").Entity( "Person", pb => diff --git a/test/EFCore.SqlServer.FunctionalTests/Migrations/SqlServerMigrationsSqlGeneratorTest.cs b/test/EFCore.SqlServer.FunctionalTests/Migrations/SqlServerMigrationsSqlGeneratorTest.cs index cfbce687f24..3102fc24af2 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Migrations/SqlServerMigrationsSqlGeneratorTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Migrations/SqlServerMigrationsSqlGeneratorTest.cs @@ -1009,6 +1009,20 @@ public override void DefaultValue_with_line_breaks(bool isUnicode) AssertSql(expectedSql); } + public override void DefaultValue_with_line_breaks_2(bool isUnicode) + { + base.DefaultValue_with_line_breaks_2(isUnicode); + + var storeType = isUnicode ? "nvarchar(max)" : "varchar(max)"; + var unicodePrefix = isUnicode ? "N" : string.Empty; + var unicodePrefixForType = isUnicode ? "n" : string.Empty; + var expectedSql = @$"CREATE TABLE [dbo].[TestLineBreaks] ( + [TestDefaultValue] {storeType} NOT NULL DEFAULT CONCAT(CAST({unicodePrefix}'0' AS {storeType}), {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'1', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'2', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'3', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'4', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'5', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'6', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'7', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'8', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'9', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'10', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'11', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'12', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'13', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'14', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'15', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'16', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'17', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'18', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'19', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'20', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'21', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'22', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'23', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'24', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'25', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'26', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'27', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'28', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'29', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'30', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'31', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'32', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'33', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'34', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'35', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'36', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'37', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'38', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'39', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'40', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'41', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'42', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'43', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'44', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'45', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'46', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'47', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'48', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'49', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'50', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'51', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'52', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'53', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'54', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'55', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'56', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'57', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'58', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'59', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'60', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'61', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'62', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'63', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'64', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'65', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'66', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'67', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'68', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'69', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'70', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'71', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'72', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'73', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'74', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'75', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'76', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'77', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'78', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'79', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'80', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'81', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'82', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'83', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'84', CONCAT(CAST({unicodePrefixForType}char(13) AS {storeType}), {unicodePrefixForType}char(10), {unicodePrefix}'85', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'86', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'87', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'88', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'89', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'90', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'91', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'92', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'93', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'94', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'95', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'96', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'97', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'98', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'99', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'100', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'101', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'102', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'103', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'104', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'105', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'106', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'107', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'108', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'109', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'110', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'111', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'112', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'113', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'114', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'115', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'116', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'117', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'118', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'119', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'120', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'121', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'122', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'123', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'124', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'125', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'126', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'127', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'128', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'129', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'130', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'131', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'132', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'133', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'134', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'135', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'136', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'137', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'138', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'139', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'140', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'141', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'142', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'143', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'144', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'145', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'146', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'147', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'148', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'149', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'150', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'151', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'152', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'153', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'154', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'155', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'156', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'157', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'158', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'159', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'160', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'161', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'162', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'163', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'164', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'165', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'166', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'167', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'168', {unicodePrefixForType}char(13), CONCAT(CAST({unicodePrefixForType}char(10) AS {storeType}), {unicodePrefix}'169', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'170', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'171', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'172', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'173', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'174', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'175', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'176', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'177', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'178', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'179', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'180', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'181', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'182', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'183', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'184', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'185', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'186', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'187', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'188', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'189', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'190', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'191', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'192', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'193', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'194', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'195', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'196', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'197', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'198', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'199', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'200', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'201', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'202', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'203', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'204', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'205', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'206', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'207', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'208', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'209', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'210', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'211', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'212', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'213', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'214', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'215', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'216', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'217', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'218', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'219', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'220', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'221', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'222', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'223', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'224', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'225', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'226', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'227', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'228', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'229', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'230', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'231', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'232', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'233', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'234', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'235', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'236', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'237', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'238', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'239', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'240', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'241', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'242', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'243', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'244', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'245', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'246', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'247', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'248', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'249', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'250', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'251', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'252', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), CONCAT(CAST({unicodePrefix}'253' AS {storeType}), {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'254', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'255', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'256', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'257', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'258', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'259', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'260', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'261', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'262', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'263', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'264', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'265', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'266', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'267', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'268', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'269', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'270', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'271', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'272', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'273', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'274', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'275', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'276', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'277', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'278', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'279', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'280', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'281', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'282', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'283', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'284', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'285', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'286', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'287', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'288', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'289', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'290', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'291', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'292', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'293', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'294', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'295', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'296', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'297', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'298', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10), {unicodePrefix}'299', {unicodePrefixForType}char(13), {unicodePrefixForType}char(10))))) +); +"; + AssertSql(expectedSql); + } + [ConditionalFact] public virtual void CreateIndex_generates_exec_when_legacy_filter_and_idempotent() { diff --git a/test/EFCore.Sqlite.FunctionalTests/Migrations/SqliteMigrationsSqlGeneratorTest.cs b/test/EFCore.Sqlite.FunctionalTests/Migrations/SqliteMigrationsSqlGeneratorTest.cs index 921372b163d..39253170cf3 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Migrations/SqliteMigrationsSqlGeneratorTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Migrations/SqliteMigrationsSqlGeneratorTest.cs @@ -80,6 +80,17 @@ public override void DefaultValue_with_line_breaks(bool isUnicode) "); } + public override void DefaultValue_with_line_breaks_2(bool isUnicode) + { + base.DefaultValue_with_line_breaks_2(isUnicode); + + AssertSql( + @"CREATE TABLE ""TestLineBreaks"" ( + ""TestDefaultValue"" TEXT NOT NULL DEFAULT ((((((((('0' || (CHAR(13) || CHAR(10))) || (('1' || CHAR(13)) || (CHAR(10) || '2'))) || ((CHAR(13) || (CHAR(10) || '3')) || ((CHAR(13) || CHAR(10)) || ('4' || CHAR(13))))) || (((CHAR(10) || ('5' || CHAR(13))) || ((CHAR(10) || '6') || (CHAR(13) || CHAR(10)))) || (('7' || (CHAR(13) || CHAR(10))) || (('8' || CHAR(13)) || (CHAR(10) || '9'))))) || ((((CHAR(13) || (CHAR(10) || '10')) || ((CHAR(13) || CHAR(10)) || ('11' || CHAR(13)))) || ((CHAR(10) || ('12' || CHAR(13))) || ((CHAR(10) || '13') || (CHAR(13) || CHAR(10))))) || ((('14' || (CHAR(13) || CHAR(10))) || (('15' || CHAR(13)) || (CHAR(10) || '16'))) || ((CHAR(13) || (CHAR(10) || '17')) || ((CHAR(13) || CHAR(10)) || ('18' || CHAR(13))))))) || (((((CHAR(10) || ('19' || CHAR(13))) || ((CHAR(10) || '20') || (CHAR(13) || CHAR(10)))) || (('21' || (CHAR(13) || CHAR(10))) || (('22' || CHAR(13)) || (CHAR(10) || '23')))) || (((CHAR(13) || (CHAR(10) || '24')) || ((CHAR(13) || CHAR(10)) || ('25' || CHAR(13)))) || ((CHAR(10) || ('26' || CHAR(13))) || ((CHAR(10) || '27') || (CHAR(13) || CHAR(10)))))) || (((('28' || (CHAR(13) || CHAR(10))) || (('29' || CHAR(13)) || (CHAR(10) || '30'))) || ((CHAR(13) || (CHAR(10) || '31')) || ((CHAR(13) || CHAR(10)) || ('32' || CHAR(13))))) || (((CHAR(10) || ('33' || CHAR(13))) || ((CHAR(10) || '34') || (CHAR(13) || CHAR(10)))) || (('35' || (CHAR(13) || CHAR(10))) || (('36' || CHAR(13)) || (CHAR(10) || '37'))))))) || ((((((CHAR(13) || (CHAR(10) || '38')) || ((CHAR(13) || CHAR(10)) || ('39' || CHAR(13)))) || ((CHAR(10) || ('40' || CHAR(13))) || ((CHAR(10) || '41') || (CHAR(13) || CHAR(10))))) || ((('42' || (CHAR(13) || CHAR(10))) || (('43' || CHAR(13)) || (CHAR(10) || '44'))) || ((CHAR(13) || (CHAR(10) || '45')) || ((CHAR(13) || CHAR(10)) || ('46' || CHAR(13)))))) || ((((CHAR(10) || ('47' || CHAR(13))) || ((CHAR(10) || '48') || (CHAR(13) || CHAR(10)))) || (('49' || (CHAR(13) || CHAR(10))) || (('50' || CHAR(13)) || (CHAR(10) || '51')))) || (((CHAR(13) || (CHAR(10) || '52')) || ((CHAR(13) || CHAR(10)) || ('53' || CHAR(13)))) || ((CHAR(10) || ('54' || CHAR(13))) || ((CHAR(10) || '55') || (CHAR(13) || CHAR(10))))))) || ((((('56' || (CHAR(13) || CHAR(10))) || (('57' || CHAR(13)) || (CHAR(10) || '58'))) || ((CHAR(13) || (CHAR(10) || '59')) || ((CHAR(13) || CHAR(10)) || ('60' || CHAR(13))))) || (((CHAR(10) || ('61' || CHAR(13))) || ((CHAR(10) || '62') || (CHAR(13) || CHAR(10)))) || (('63' || (CHAR(13) || CHAR(10))) || (('64' || CHAR(13)) || (CHAR(10) || '65'))))) || ((((CHAR(13) || (CHAR(10) || '66')) || ((CHAR(13) || CHAR(10)) || ('67' || CHAR(13)))) || ((CHAR(10) || ('68' || CHAR(13))) || ((CHAR(10) || '69') || (CHAR(13) || CHAR(10))))) || ((('70' || (CHAR(13) || CHAR(10))) || (('71' || CHAR(13)) || (CHAR(10) || '72'))) || (((CHAR(13) || CHAR(10)) || ('73' || CHAR(13))) || ((CHAR(10) || '74') || (CHAR(13) || CHAR(10))))))))) || ((((((('75' || (CHAR(13) || CHAR(10))) || (('76' || CHAR(13)) || (CHAR(10) || '77'))) || ((CHAR(13) || (CHAR(10) || '78')) || ((CHAR(13) || CHAR(10)) || ('79' || CHAR(13))))) || (((CHAR(10) || ('80' || CHAR(13))) || ((CHAR(10) || '81') || (CHAR(13) || CHAR(10)))) || (('82' || (CHAR(13) || CHAR(10))) || (('83' || CHAR(13)) || (CHAR(10) || '84'))))) || ((((CHAR(13) || (CHAR(10) || '85')) || ((CHAR(13) || CHAR(10)) || ('86' || CHAR(13)))) || ((CHAR(10) || ('87' || CHAR(13))) || ((CHAR(10) || '88') || (CHAR(13) || CHAR(10))))) || ((('89' || (CHAR(13) || CHAR(10))) || (('90' || CHAR(13)) || (CHAR(10) || '91'))) || ((CHAR(13) || (CHAR(10) || '92')) || ((CHAR(13) || CHAR(10)) || ('93' || CHAR(13))))))) || (((((CHAR(10) || ('94' || CHAR(13))) || ((CHAR(10) || '95') || (CHAR(13) || CHAR(10)))) || (('96' || (CHAR(13) || CHAR(10))) || (('97' || CHAR(13)) || (CHAR(10) || '98')))) || (((CHAR(13) || (CHAR(10) || '99')) || ((CHAR(13) || CHAR(10)) || ('100' || CHAR(13)))) || ((CHAR(10) || ('101' || CHAR(13))) || ((CHAR(10) || '102') || (CHAR(13) || CHAR(10)))))) || (((('103' || (CHAR(13) || CHAR(10))) || (('104' || CHAR(13)) || (CHAR(10) || '105'))) || ((CHAR(13) || (CHAR(10) || '106')) || ((CHAR(13) || CHAR(10)) || ('107' || CHAR(13))))) || (((CHAR(10) || ('108' || CHAR(13))) || ((CHAR(10) || '109') || (CHAR(13) || CHAR(10)))) || (('110' || (CHAR(13) || CHAR(10))) || (('111' || CHAR(13)) || (CHAR(10) || '112'))))))) || ((((((CHAR(13) || (CHAR(10) || '113')) || ((CHAR(13) || CHAR(10)) || ('114' || CHAR(13)))) || ((CHAR(10) || ('115' || CHAR(13))) || ((CHAR(10) || '116') || (CHAR(13) || CHAR(10))))) || ((('117' || (CHAR(13) || CHAR(10))) || (('118' || CHAR(13)) || (CHAR(10) || '119'))) || ((CHAR(13) || (CHAR(10) || '120')) || ((CHAR(13) || CHAR(10)) || ('121' || CHAR(13)))))) || ((((CHAR(10) || ('122' || CHAR(13))) || ((CHAR(10) || '123') || (CHAR(13) || CHAR(10)))) || (('124' || (CHAR(13) || CHAR(10))) || (('125' || CHAR(13)) || (CHAR(10) || '126')))) || (((CHAR(13) || (CHAR(10) || '127')) || ((CHAR(13) || CHAR(10)) || ('128' || CHAR(13)))) || ((CHAR(10) || ('129' || CHAR(13))) || ((CHAR(10) || '130') || (CHAR(13) || CHAR(10))))))) || ((((('131' || (CHAR(13) || CHAR(10))) || (('132' || CHAR(13)) || (CHAR(10) || '133'))) || ((CHAR(13) || (CHAR(10) || '134')) || ((CHAR(13) || CHAR(10)) || ('135' || CHAR(13))))) || (((CHAR(10) || ('136' || CHAR(13))) || ((CHAR(10) || '137') || (CHAR(13) || CHAR(10)))) || (('138' || (CHAR(13) || CHAR(10))) || (('139' || CHAR(13)) || (CHAR(10) || '140'))))) || ((((CHAR(13) || (CHAR(10) || '141')) || ((CHAR(13) || CHAR(10)) || ('142' || CHAR(13)))) || ((CHAR(10) || ('143' || CHAR(13))) || ((CHAR(10) || '144') || (CHAR(13) || CHAR(10))))) || ((('145' || (CHAR(13) || CHAR(10))) || (('146' || CHAR(13)) || (CHAR(10) || '147'))) || (((CHAR(13) || CHAR(10)) || ('148' || CHAR(13))) || ((CHAR(10) || '149') || (CHAR(13) || CHAR(10)))))))))) || (((((((('150' || (CHAR(13) || CHAR(10))) || (('151' || CHAR(13)) || (CHAR(10) || '152'))) || ((CHAR(13) || (CHAR(10) || '153')) || ((CHAR(13) || CHAR(10)) || ('154' || CHAR(13))))) || (((CHAR(10) || ('155' || CHAR(13))) || ((CHAR(10) || '156') || (CHAR(13) || CHAR(10)))) || (('157' || (CHAR(13) || CHAR(10))) || (('158' || CHAR(13)) || (CHAR(10) || '159'))))) || ((((CHAR(13) || (CHAR(10) || '160')) || ((CHAR(13) || CHAR(10)) || ('161' || CHAR(13)))) || ((CHAR(10) || ('162' || CHAR(13))) || ((CHAR(10) || '163') || (CHAR(13) || CHAR(10))))) || ((('164' || (CHAR(13) || CHAR(10))) || (('165' || CHAR(13)) || (CHAR(10) || '166'))) || ((CHAR(13) || (CHAR(10) || '167')) || ((CHAR(13) || CHAR(10)) || ('168' || CHAR(13))))))) || (((((CHAR(10) || ('169' || CHAR(13))) || ((CHAR(10) || '170') || (CHAR(13) || CHAR(10)))) || (('171' || (CHAR(13) || CHAR(10))) || (('172' || CHAR(13)) || (CHAR(10) || '173')))) || (((CHAR(13) || (CHAR(10) || '174')) || ((CHAR(13) || CHAR(10)) || ('175' || CHAR(13)))) || ((CHAR(10) || ('176' || CHAR(13))) || ((CHAR(10) || '177') || (CHAR(13) || CHAR(10)))))) || (((('178' || (CHAR(13) || CHAR(10))) || (('179' || CHAR(13)) || (CHAR(10) || '180'))) || ((CHAR(13) || (CHAR(10) || '181')) || ((CHAR(13) || CHAR(10)) || ('182' || CHAR(13))))) || (((CHAR(10) || ('183' || CHAR(13))) || ((CHAR(10) || '184') || (CHAR(13) || CHAR(10)))) || (('185' || (CHAR(13) || CHAR(10))) || (('186' || CHAR(13)) || (CHAR(10) || '187'))))))) || ((((((CHAR(13) || (CHAR(10) || '188')) || ((CHAR(13) || CHAR(10)) || ('189' || CHAR(13)))) || ((CHAR(10) || ('190' || CHAR(13))) || ((CHAR(10) || '191') || (CHAR(13) || CHAR(10))))) || ((('192' || (CHAR(13) || CHAR(10))) || (('193' || CHAR(13)) || (CHAR(10) || '194'))) || ((CHAR(13) || (CHAR(10) || '195')) || ((CHAR(13) || CHAR(10)) || ('196' || CHAR(13)))))) || ((((CHAR(10) || ('197' || CHAR(13))) || ((CHAR(10) || '198') || (CHAR(13) || CHAR(10)))) || (('199' || (CHAR(13) || CHAR(10))) || (('200' || CHAR(13)) || (CHAR(10) || '201')))) || (((CHAR(13) || (CHAR(10) || '202')) || ((CHAR(13) || CHAR(10)) || ('203' || CHAR(13)))) || ((CHAR(10) || ('204' || CHAR(13))) || ((CHAR(10) || '205') || (CHAR(13) || CHAR(10))))))) || ((((('206' || (CHAR(13) || CHAR(10))) || (('207' || CHAR(13)) || (CHAR(10) || '208'))) || ((CHAR(13) || (CHAR(10) || '209')) || ((CHAR(13) || CHAR(10)) || ('210' || CHAR(13))))) || (((CHAR(10) || ('211' || CHAR(13))) || ((CHAR(10) || '212') || (CHAR(13) || CHAR(10)))) || (('213' || (CHAR(13) || CHAR(10))) || (('214' || CHAR(13)) || (CHAR(10) || '215'))))) || ((((CHAR(13) || (CHAR(10) || '216')) || ((CHAR(13) || CHAR(10)) || ('217' || CHAR(13)))) || ((CHAR(10) || ('218' || CHAR(13))) || ((CHAR(10) || '219') || (CHAR(13) || CHAR(10))))) || ((('220' || (CHAR(13) || CHAR(10))) || (('221' || CHAR(13)) || (CHAR(10) || '222'))) || (((CHAR(13) || CHAR(10)) || ('223' || CHAR(13))) || ((CHAR(10) || '224') || (CHAR(13) || CHAR(10))))))))) || ((((((('225' || (CHAR(13) || CHAR(10))) || (('226' || CHAR(13)) || (CHAR(10) || '227'))) || ((CHAR(13) || (CHAR(10) || '228')) || ((CHAR(13) || CHAR(10)) || ('229' || CHAR(13))))) || (((CHAR(10) || ('230' || CHAR(13))) || ((CHAR(10) || '231') || (CHAR(13) || CHAR(10)))) || (('232' || (CHAR(13) || CHAR(10))) || (('233' || CHAR(13)) || (CHAR(10) || '234'))))) || ((((CHAR(13) || (CHAR(10) || '235')) || ((CHAR(13) || CHAR(10)) || ('236' || CHAR(13)))) || ((CHAR(10) || ('237' || CHAR(13))) || ((CHAR(10) || '238') || (CHAR(13) || CHAR(10))))) || ((('239' || (CHAR(13) || CHAR(10))) || (('240' || CHAR(13)) || (CHAR(10) || '241'))) || ((CHAR(13) || (CHAR(10) || '242')) || ((CHAR(13) || CHAR(10)) || ('243' || CHAR(13))))))) || (((((CHAR(10) || ('244' || CHAR(13))) || ((CHAR(10) || '245') || (CHAR(13) || CHAR(10)))) || (('246' || (CHAR(13) || CHAR(10))) || (('247' || CHAR(13)) || (CHAR(10) || '248')))) || (((CHAR(13) || (CHAR(10) || '249')) || ((CHAR(13) || CHAR(10)) || ('250' || CHAR(13)))) || ((CHAR(10) || ('251' || CHAR(13))) || ((CHAR(10) || '252') || (CHAR(13) || CHAR(10)))))) || (((('253' || (CHAR(13) || CHAR(10))) || (('254' || CHAR(13)) || (CHAR(10) || '255'))) || ((CHAR(13) || (CHAR(10) || '256')) || ((CHAR(13) || CHAR(10)) || ('257' || CHAR(13))))) || (((CHAR(10) || ('258' || CHAR(13))) || ((CHAR(10) || '259') || (CHAR(13) || CHAR(10)))) || (('260' || (CHAR(13) || CHAR(10))) || (('261' || CHAR(13)) || (CHAR(10) || '262'))))))) || ((((((CHAR(13) || (CHAR(10) || '263')) || ((CHAR(13) || CHAR(10)) || ('264' || CHAR(13)))) || ((CHAR(10) || ('265' || CHAR(13))) || ((CHAR(10) || '266') || (CHAR(13) || CHAR(10))))) || ((('267' || (CHAR(13) || CHAR(10))) || (('268' || CHAR(13)) || (CHAR(10) || '269'))) || ((CHAR(13) || (CHAR(10) || '270')) || ((CHAR(13) || CHAR(10)) || ('271' || CHAR(13)))))) || ((((CHAR(10) || ('272' || CHAR(13))) || ((CHAR(10) || '273') || (CHAR(13) || CHAR(10)))) || (('274' || (CHAR(13) || CHAR(10))) || (('275' || CHAR(13)) || (CHAR(10) || '276')))) || (((CHAR(13) || (CHAR(10) || '277')) || ((CHAR(13) || CHAR(10)) || ('278' || CHAR(13)))) || ((CHAR(10) || ('279' || CHAR(13))) || ((CHAR(10) || '280') || (CHAR(13) || CHAR(10))))))) || ((((('281' || (CHAR(13) || CHAR(10))) || (('282' || CHAR(13)) || (CHAR(10) || '283'))) || ((CHAR(13) || (CHAR(10) || '284')) || ((CHAR(13) || CHAR(10)) || ('285' || CHAR(13))))) || (((CHAR(10) || ('286' || CHAR(13))) || ((CHAR(10) || '287') || (CHAR(13) || CHAR(10)))) || (('288' || (CHAR(13) || CHAR(10))) || (('289' || CHAR(13)) || (CHAR(10) || '290'))))) || ((((CHAR(13) || (CHAR(10) || '291')) || ((CHAR(13) || CHAR(10)) || ('292' || CHAR(13)))) || ((CHAR(10) || ('293' || CHAR(13))) || ((CHAR(10) || '294') || (CHAR(13) || CHAR(10))))) || ((('295' || (CHAR(13) || CHAR(10))) || (('296' || CHAR(13)) || (CHAR(10) || '297'))) || (((CHAR(13) || CHAR(10)) || ('298' || CHAR(13))) || ((CHAR(10) || '299') || (CHAR(13) || CHAR(10))))))))))) +); +"); + } + [ConditionalTheory] [InlineData(true, null)] [InlineData(false, "PK_Id")]