Skip to content

Commit c891a75

Browse files
authored
Shout it out loud! Changing OpenJson to OPENJSON. (#30913)
1 parent 7deeb21 commit c891a75

File tree

34 files changed

+286
-286
lines changed

34 files changed

+286
-286
lines changed

src/EFCore.SqlServer/Query/Internal/SqlServerOpenJsonExpression.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public SqlServerOpenJsonExpression(
5959
SqlExpression jsonExpression,
6060
SqlExpression? path = null,
6161
IReadOnlyList<ColumnInfo>? columnInfos = null)
62-
: base(alias, "OpenJson", schema: null, builtIn: true, path is null ? new[] { jsonExpression } : new[] { jsonExpression, path })
62+
: base(alias, "OPENJSON", schema: null, builtIn: true, path is null ? new[] { jsonExpression } : new[] { jsonExpression, path })
6363
{
6464
ColumnInfos = columnInfos;
6565
}

src/EFCore.SqlServer/Query/Internal/SqlServerQuerySqlGenerator.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ protected virtual Expression VisitOpenJsonExpression(SqlServerOpenJsonExpression
483483

484484
// OPENJSON is a regular table-valued function with a special WITH clause at the end
485485
// Copy-paste from VisitTableValuedFunction, because that appends the 'AS <alias>' but we need to insert WITH before that
486-
Sql.Append("OpenJson(");
486+
Sql.Append("OPENJSON(");
487487

488488
GenerateList(openJsonExpression.Arguments, e => Visit(e));
489489

@@ -502,7 +502,7 @@ protected virtual Expression VisitOpenJsonExpression(SqlServerOpenJsonExpression
502502
Sql.Append(", ");
503503
}
504504

505-
Check.DebugAssert(columnInfo.StoreType is not null, "Unset OpenJson column store type");
505+
Check.DebugAssert(columnInfo.StoreType is not null, "Unset OPENJSON column store type");
506506

507507
Sql
508508
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier(columnInfo.Name))

src/EFCore.SqlServer/Query/Internal/SqlServerQueryableMethodTranslatingExpressionVisitor.cs

+15-15
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ protected override ShapedQueryExpression TranslateCollection(
124124
{
125125
var elementClrType = sqlExpression.Type.GetSequenceType();
126126

127-
// Generate the OpenJson function expression, and wrap it in a SelectExpression.
128-
// Note that we want to preserve the ordering of the element's, i.e. for the rows coming out of OpenJson to be the same as the
127+
// Generate the OPENJSON function expression, and wrap it in a SelectExpression.
128+
// Note that we want to preserve the ordering of the element's, i.e. for the rows coming out of OPENJSON to be the same as the
129129
// element order in the original JSON array.
130-
// Unfortunately, OpenJson with an explicit schema (with the WITH clause) doesn't support this; so we use the variant with the
130+
// Unfortunately, OPENJSON with an explicit schema (with the WITH clause) doesn't support this; so we use the variant with the
131131
// default schema, which returns a 'key' column containing the index, and order by that. This also means we need to explicitly
132-
// apply a conversion from the values coming out of OpenJson (always NVARCHAR(MAX)) to the required relational store type.
133-
var openJsonExpression = new TableValuedFunctionExpression(tableAlias, "OpenJson", new[] { sqlExpression });
132+
// apply a conversion from the values coming out of OPENJSON (always NVARCHAR(MAX)) to the required relational store type.
133+
var openJsonExpression = new TableValuedFunctionExpression(tableAlias, "OPENJSON", new[] { sqlExpression });
134134

135135
// TODO: When we have metadata to determine if the element is nullable, pass that here to SelectExpression
136136
var selectExpression = new SelectExpression(
@@ -140,7 +140,7 @@ protected override ShapedQueryExpression TranslateCollection(
140140
if (elementTypeMapping is { StoreType: not "nvarchar(max)" })
141141
{
142142
// For columns (where we know the type mapping), we need to overwrite the projection in order to insert a CAST() to the actual
143-
// relational store type we expect out of the JSON array (e.g. OpenJson returns strings, we want datetime2).
143+
// relational store type we expect out of the JSON array (e.g. OPENJSON returns strings, we want datetime2).
144144
// For parameters (where we don't yet know the type mapping), we'll need to do that later, after the type mapping has been
145145
// inferred.
146146
// TODO: Need to pass through the type mapping API for converting the JSON value (nvarchar) to the relational store type (e.g.
@@ -164,7 +164,7 @@ protected override ShapedQueryExpression TranslateCollection(
164164
});
165165
}
166166

167-
// Append an ordering for the OpenJson 'key' column, converting it from nvarchar to int.
167+
// Append an ordering for the OPENJSON 'key' column, converting it from nvarchar to int.
168168
selectExpression.AppendOrdering(
169169
new OrderingExpression(
170170
_sqlExpressionFactory.Convert(
@@ -211,7 +211,7 @@ protected override ShapedQueryExpression TranslateCollection(
211211
[
212212
TableValuedFunctionExpression
213213
{
214-
Name: "OpenJson", Schema: null, IsBuiltIn: true, Arguments: [var jsonArrayColumn]
214+
Name: "OPENJSON", Schema: null, IsBuiltIn: true, Arguments: [var jsonArrayColumn]
215215
} openJsonExpression
216216
],
217217
GroupBy: [],
@@ -246,7 +246,7 @@ protected override ShapedQueryExpression TranslateCollection(
246246
if (shaperExpression is ProjectionBindingExpression projectionBindingExpression
247247
&& selectExpression.GetProjection(projectionBindingExpression) is SqlExpression projection)
248248
{
249-
// OpenJson's value column is an nvarchar(max); if this is a collection column whose type mapping is know, the projection
249+
// OPENJSON's value column is an nvarchar(max); if this is a collection column whose type mapping is know, the projection
250250
// contains a CAST node which we unwrap
251251
var projectionColumn = projection switch
252252
{
@@ -273,7 +273,7 @@ protected override ShapedQueryExpression TranslateCollection(
273273
// If we have a type mapping (i.e. translating over a column rather than a parameter), apply any necessary server-side
274274
// conversions.
275275
// TODO: This should be part of #30677
276-
// OpenJson's value column has type nvarchar(max); apply a CAST() unless that's the inferred element type mapping
276+
// OPENJSON's value column has type nvarchar(max); apply a CAST() unless that's the inferred element type mapping
277277
if (projectionColumn.TypeMapping is { StoreType: not "nvarchar(max)"} typeMapping)
278278
{
279279
translation = _sqlExpressionFactory.Convert(translation, typeMapping.ClrType, typeMapping);
@@ -440,21 +440,21 @@ protected override Expression VisitExtension(Expression expression)
440440
{
441441
switch (expression)
442442
{
443-
case TableValuedFunctionExpression { Name: "OpenJson", Schema: null, IsBuiltIn: true } openJsonExpression
443+
case TableValuedFunctionExpression { Name: "OPENJSON", Schema: null, IsBuiltIn: true } openJsonExpression
444444
when InferredTypeMappings.TryGetValue((openJsonExpression, "value"), out var typeMapping):
445445
return ApplyTypeMappingsOnOpenJsonExpression(openJsonExpression, new[] { typeMapping });
446446

447-
// Above, we applied the type mapping the the parameter that OpenJson accepts as an argument.
447+
// Above, we applied the type mapping the the parameter that OPENJSON accepts as an argument.
448448
// But the inferred type mapping also needs to be applied as a SQL conversion on the column projections coming out of the
449-
// SelectExpression containing the OpenJson call. So we set state to know about OpenJson tables and their type mappings
449+
// SelectExpression containing the OPENJSON call. So we set state to know about OPENJSON tables and their type mappings
450450
// in the immediate SelectExpression, and continue visiting down (see ColumnExpression visitation below).
451451
case SelectExpression selectExpression:
452452
{
453453
Dictionary<TableExpressionBase, RelationalTypeMapping>? previousSelectInferredTypeMappings = null;
454454

455455
foreach (var table in selectExpression.Tables)
456456
{
457-
if (table is TableValuedFunctionExpression { Name: "OpenJson", Schema: null, IsBuiltIn: true } openJsonExpression
457+
if (table is TableValuedFunctionExpression { Name: "OPENJSON", Schema: null, IsBuiltIn: true } openJsonExpression
458458
&& InferredTypeMappings.TryGetValue((openJsonExpression, "value"), out var inferredTypeMapping))
459459
{
460460
if (previousSelectInferredTypeMappings is null)
@@ -534,7 +534,7 @@ protected virtual TableValuedFunctionExpression ApplyTypeMappingsOnOpenJsonExpre
534534
/// </summary>
535535
public virtual SqlExpression ApplyTypeMappingOnColumn(ColumnExpression columnExpression, RelationalTypeMapping typeMapping)
536536
// TODO: this should be part of #30677
537-
// OpenJson's value column has type nvarchar(max); apply a CAST() unless that's the inferred element type mapping
537+
// OPENJSON's value column has type nvarchar(max); apply a CAST() unless that's the inferred element type mapping
538538
=> typeMapping.StoreType is "nvarchar(max)"
539539
? columnExpression
540540
: _sqlExpressionFactory.Convert(columnExpression, typeMapping.ClrType, typeMapping);

src/EFCore.SqlServer/Storage/Internal/SqlServerTypeMappingSource.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ public SqlServerTypeMappingSource(
489489
stringTypeMapping = (SqlServerStringTypeMapping)stringTypeMapping
490490
.Clone(new CollectionToJsonStringConverter(mappingInfo.ClrType, elementTypeMapping));
491491

492-
// OpenJson was introduced in SQL Server 2016 (compatibility level 130). If the user configures an older compatibility level,
492+
// OPENJSON was introduced in SQL Server 2016 (compatibility level 130). If the user configures an older compatibility level,
493493
// we allow mapping the column, but don't set the element type mapping on the mapping, so that it isn't queryable.
494494
// This causes us to go into the old translation path for Contains over parameter via IN with constants.
495495
if (_supportsOpenJson)

test/EFCore.Specification.Tests/Query/PrimitiveCollectionsQueryTestBase.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ public virtual async Task Parameter_collection_in_subquery_Union_column_collecti
544544
[ConditionalFact]
545545
public virtual void Parameter_collection_in_subquery_and_Convert_as_compiled_query()
546546
{
547-
// The array indexing is translated as a subquery over e.g. OpenJson with LIMIT/OFFSET.
547+
// The array indexing is translated as a subquery over e.g. OPENJSON with LIMIT/OFFSET.
548548
// Since there's a CAST over that, the type mapping inference from the other side (p.String) doesn't propagate inside to the
549549
// subquery. In this case, the CAST operand gets the default CLR type mapping, but that's object in this case.
550550
// We should apply the default type mapping to the parameter, but need to figure out the exact rules when to do this.

test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsQuerySqlServerTest.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@ FROM [LevelOne] AS [l]
12251225
LEFT JOIN [LevelThree] AS [l1] ON [l0].[Id] = [l1].[OneToMany_Required_Inverse3Id]
12261226
WHERE EXISTS (
12271227
SELECT 1
1228-
FROM OpenJson(@__validIds_0) AS [v]
1228+
FROM OPENJSON(@__validIds_0) AS [v]
12291229
WHERE [v].[value] = [l].[Name] OR ([v].[value] IS NULL AND [l].[Name] IS NULL))
12301230
ORDER BY [l].[Id], [l0].[Id]
12311231
""");
@@ -2338,7 +2338,7 @@ SELECT [l].[Date]
23382338
FROM [LevelOne] AS [l]
23392339
WHERE EXISTS (
23402340
SELECT 1
2341-
FROM OpenJson(@__validIds_0) AS [v]
2341+
FROM OPENJSON(@__validIds_0) AS [v]
23422342
WHERE [v].[value] = [l].[Name] OR ([v].[value] IS NULL AND [l].[Name] IS NULL))
23432343
GROUP BY [l].[Date]
23442344
) AS [t]
@@ -2347,7 +2347,7 @@ LEFT JOIN (
23472347
FROM [LevelOne] AS [l0]
23482348
WHERE EXISTS (
23492349
SELECT 1
2350-
FROM OpenJson(@__validIds_0) AS [v0]
2350+
FROM OPENJSON(@__validIds_0) AS [v0]
23512351
WHERE [v0].[value] = [l0].[Name] OR ([v0].[value] IS NULL AND [l0].[Name] IS NULL))
23522352
) AS [t0] ON [t].[Date] = [t0].[Date]
23532353
ORDER BY [t].[Date]

test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSharedTypeQuerySqlServerTest.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2876,7 +2876,7 @@ WHEN [t0].[OneToOne_Required_PK_Date] IS NOT NULL AND [t0].[Level1_Required_Id]
28762876
END = [t1].[OneToMany_Required_Inverse3Id]
28772877
WHERE EXISTS (
28782878
SELECT 1
2879-
FROM OpenJson(@__validIds_0) AS [v]
2879+
FROM OPENJSON(@__validIds_0) AS [v]
28802880
WHERE [v].[value] = [l].[Name] OR ([v].[value] IS NULL AND [l].[Name] IS NULL))
28812881
ORDER BY [l].[Id], [t0].[Id], [t0].[Id0]
28822882
""");
@@ -3022,7 +3022,7 @@ SELECT [l].[Date]
30223022
FROM [Level1] AS [l]
30233023
WHERE EXISTS (
30243024
SELECT 1
3025-
FROM OpenJson(@__validIds_0) AS [v]
3025+
FROM OPENJSON(@__validIds_0) AS [v]
30263026
WHERE [v].[value] = [l].[Name] OR ([v].[value] IS NULL AND [l].[Name] IS NULL))
30273027
GROUP BY [l].[Date]
30283028
) AS [t]
@@ -3031,7 +3031,7 @@ LEFT JOIN (
30313031
FROM [Level1] AS [l0]
30323032
WHERE EXISTS (
30333033
SELECT 1
3034-
FROM OpenJson(@__validIds_0) AS [v0]
3034+
FROM OPENJSON(@__validIds_0) AS [v0]
30353035
WHERE [v0].[value] = [l0].[Name] OR ([v0].[value] IS NULL AND [l0].[Name] IS NULL))
30363036
) AS [t0] ON [t].[Date] = [t0].[Date]
30373037
ORDER BY [t].[Date]

test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsCollectionsSplitQuerySqlServerTest.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -3197,7 +3197,7 @@ FROM [LevelOne] AS [l]
31973197
LEFT JOIN [LevelTwo] AS [l0] ON [l].[Id] = [l0].[Level1_Required_Id]
31983198
WHERE EXISTS (
31993199
SELECT 1
3200-
FROM OpenJson(@__validIds_0) AS [v]
3200+
FROM OPENJSON(@__validIds_0) AS [v]
32013201
WHERE [v].[value] = [l].[Name] OR ([v].[value] IS NULL AND [l].[Name] IS NULL))
32023202
ORDER BY [l].[Id], [l0].[Id]
32033203
""",
@@ -3211,7 +3211,7 @@ FROM [LevelOne] AS [l]
32113211
INNER JOIN [LevelThree] AS [l1] ON [l0].[Id] = [l1].[OneToMany_Required_Inverse3Id]
32123212
WHERE EXISTS (
32133213
SELECT 1
3214-
FROM OpenJson(@__validIds_0) AS [v]
3214+
FROM OPENJSON(@__validIds_0) AS [v]
32153215
WHERE [v].[value] = [l].[Name] OR ([v].[value] IS NULL AND [l].[Name] IS NULL))
32163216
ORDER BY [l].[Id], [l0].[Id]
32173217
""");
@@ -3750,7 +3750,7 @@ SELECT [l].[Date]
37503750
FROM [LevelOne] AS [l]
37513751
WHERE EXISTS (
37523752
SELECT 1
3753-
FROM OpenJson(@__validIds_0) AS [v]
3753+
FROM OPENJSON(@__validIds_0) AS [v]
37543754
WHERE [v].[value] = [l].[Name] OR ([v].[value] IS NULL AND [l].[Name] IS NULL))
37553755
GROUP BY [l].[Date]
37563756
ORDER BY [l].[Date]
@@ -3765,7 +3765,7 @@ SELECT [l].[Date]
37653765
FROM [LevelOne] AS [l]
37663766
WHERE EXISTS (
37673767
SELECT 1
3768-
FROM OpenJson(@__validIds_0) AS [v]
3768+
FROM OPENJSON(@__validIds_0) AS [v]
37693769
WHERE [v].[value] = [l].[Name] OR ([v].[value] IS NULL AND [l].[Name] IS NULL))
37703770
GROUP BY [l].[Date]
37713771
) AS [t]
@@ -3774,7 +3774,7 @@ INNER JOIN (
37743774
FROM [LevelOne] AS [l0]
37753775
WHERE EXISTS (
37763776
SELECT 1
3777-
FROM OpenJson(@__validIds_0) AS [v0]
3777+
FROM OPENJSON(@__validIds_0) AS [v0]
37783778
WHERE [v0].[value] = [l0].[Name] OR ([v0].[value] IS NULL AND [l0].[Name] IS NULL))
37793779
) AS [t0] ON [t].[Date] = [t0].[Date]
37803780
ORDER BY [t].[Date]

test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsQuerySqlServerTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3083,7 +3083,7 @@ FROM [LevelOne] AS [l]
30833083
LEFT JOIN [LevelTwo] AS [l0] ON [l].[Id] = [l0].[Level1_Optional_Id]
30843084
WHERE NOT EXISTS (
30853085
SELECT 1
3086-
FROM OpenJson(@__names_0) AS [n]
3086+
FROM OPENJSON(@__names_0) AS [n]
30873087
WHERE ([l0].[Name] = [n].[value] AND [l0].[Name] IS NOT NULL AND [n].[value] IS NOT NULL) OR ([l0].[Name] IS NULL AND [n].[value] IS NULL))
30883088
""");
30893089
}

test/EFCore.SqlServer.FunctionalTests/Query/ComplexNavigationsSharedTypeQuerySqlServerTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5414,7 +5414,7 @@ WHERE [l0].[OneToOne_Required_PK_Date] IS NOT NULL AND [l0].[Level1_Required_Id]
54145414
) AS [t] ON [l].[Id] = [t].[Level1_Optional_Id]
54155415
WHERE NOT EXISTS (
54165416
SELECT 1
5417-
FROM OpenJson(@__names_0) AS [n]
5417+
FROM OPENJSON(@__names_0) AS [n]
54185418
WHERE ([t].[Level2_Name] = [n].[value] AND [t].[Level2_Name] IS NOT NULL AND [n].[value] IS NOT NULL) OR ([t].[Level2_Name] IS NULL AND [n].[value] IS NULL))
54195419
""");
54205420
}

test/EFCore.SqlServer.FunctionalTests/Query/GearsOfWarQuerySqlServerTest.cs

+13-13
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ FROM [Gears] AS [g]
218218
LEFT JOIN [Tags] AS [t] ON [g].[Nickname] = [t].[GearNickName] AND [g].[SquadId] = [t].[GearSquadId]
219219
WHERE [t].[Id] IS NOT NULL AND EXISTS (
220220
SELECT 1
221-
FROM OpenJson(@__tags_0) AS [t0]
221+
FROM OPENJSON(@__tags_0) AS [t0]
222222
WHERE CAST([t0].[value] AS uniqueidentifier) = [t].[Id] OR ([t0].[value] IS NULL AND [t].[Id] IS NULL))
223223
""");
224224
}
@@ -242,7 +242,7 @@ FROM [Gears] AS [g]
242242
LEFT JOIN [Tags] AS [t] ON [g].[Nickname] = [t].[GearNickName] AND [g].[SquadId] = [t].[GearSquadId]
243243
WHERE [c].[Location] IS NOT NULL AND EXISTS (
244244
SELECT 1
245-
FROM OpenJson(@__tags_0) AS [t0]
245+
FROM OPENJSON(@__tags_0) AS [t0]
246246
WHERE CAST([t0].[value] AS uniqueidentifier) = [t].[Id] OR ([t0].[value] IS NULL AND [t].[Id] IS NULL))
247247
""");
248248
}
@@ -265,7 +265,7 @@ FROM [Gears] AS [g]
265265
LEFT JOIN [Tags] AS [t] ON [g].[Nickname] = [t].[GearNickName] AND [g].[SquadId] = [t].[GearSquadId]
266266
WHERE [t].[Id] IS NOT NULL AND EXISTS (
267267
SELECT 1
268-
FROM OpenJson(@__tags_0) AS [t0]
268+
FROM OPENJSON(@__tags_0) AS [t0]
269269
WHERE CAST([t0].[value] AS uniqueidentifier) = [t].[Id] OR ([t0].[value] IS NULL AND [t].[Id] IS NULL))
270270
""");
271271
}
@@ -2106,7 +2106,7 @@ public override async Task Non_unicode_string_literals_in_contains_is_used_for_n
21062106
FROM [Cities] AS [c]
21072107
WHERE EXISTS (
21082108
SELECT 1
2109-
FROM OpenJson(@__cities_0) AS [c0]
2109+
FROM OPENJSON(@__cities_0) AS [c0]
21102110
WHERE CAST([c0].[value] AS varchar(100)) = [c].[Location] OR ([c0].[value] IS NULL AND [c].[Location] IS NULL))
21112111
""");
21122112
}
@@ -3108,7 +3108,7 @@ public override async Task Contains_with_local_nullable_guid_list_closure(bool a
31083108
FROM [Tags] AS [t]
31093109
WHERE EXISTS (
31103110
SELECT 1
3111-
FROM OpenJson(@__ids_0) AS [i]
3111+
FROM OPENJSON(@__ids_0) AS [i]
31123112
WHERE CAST([i].[value] AS uniqueidentifier) = [t].[Id])
31133113
""");
31143114
}
@@ -3632,7 +3632,7 @@ FROM [Gears] AS [g]
36323632
LEFT JOIN [Cities] AS [c] ON [g].[AssignedCityName] = [c].[Name]
36333633
WHERE [g].[SquadId] < 2 AND EXISTS (
36343634
SELECT 1
3635-
FROM OpenJson(@__cities_0) AS [c0]
3635+
FROM OPENJSON(@__cities_0) AS [c0]
36363636
WHERE CAST([c0].[value] AS nvarchar(450)) = [c].[Name] OR ([c0].[value] IS NULL AND [c].[Name] IS NULL))
36373637
""");
36383638
}
@@ -5924,7 +5924,7 @@ FROM [Gears] AS [g]
59245924
ORDER BY CASE
59255925
WHEN EXISTS (
59265926
SELECT 1
5927-
FROM OpenJson(@__nicknames_0) AS [n]
5927+
FROM OPENJSON(@__nicknames_0) AS [n]
59285928
WHERE CAST([n].[value] AS nvarchar(450)) = [g].[Nickname]) THEN CAST(1 AS bit)
59295929
ELSE CAST(0 AS bit)
59305930
END DESC, [g].[Nickname], [g].[SquadId]
@@ -6669,7 +6669,7 @@ public override async Task DateTimeOffset_Contains_Less_than_Greater_than(bool a
66696669
FROM [Missions] AS [m]
66706670
WHERE @__start_0 <= CAST(CONVERT(date, [m].[Timeline]) AS datetimeoffset) AND [m].[Timeline] < @__end_1 AND EXISTS (
66716671
SELECT 1
6672-
FROM OpenJson(@__dates_2) AS [d]
6672+
FROM OPENJSON(@__dates_2) AS [d]
66736673
WHERE CAST([d].[value] AS datetimeoffset) = [m].[Timeline])
66746674
""");
66756675
}
@@ -7384,7 +7384,7 @@ FROM [Gears] AS [g]
73847384
ORDER BY CASE
73857385
WHEN EXISTS (
73867386
SELECT 1
7387-
FROM OpenJson(@__ids_0) AS [i]
7387+
FROM OPENJSON(@__ids_0) AS [i]
73887388
WHERE CAST([i].[value] AS int) = [g].[SquadId]) THEN CAST(1 AS bit)
73897389
ELSE CAST(0 AS bit)
73907390
END
@@ -8145,7 +8145,7 @@ FROM [Weapons] AS [w]
81458145
LEFT JOIN [Weapons] AS [w0] ON [w].[SynergyWithId] = [w0].[Id]
81468146
WHERE [w0].[Id] IS NOT NULL AND EXISTS (
81478147
SELECT 1
8148-
FROM OpenJson(@__types_0) AS [t]
8148+
FROM OPENJSON(@__types_0) AS [t]
81498149
WHERE CAST([t].[value] AS int) = [w0].[AmmunitionType] OR ([t].[value] IS NULL AND [w0].[AmmunitionType] IS NULL))
81508150
""");
81518151
}
@@ -9381,7 +9381,7 @@ public override async Task Where_bool_column_and_Contains(bool async)
93819381
FROM [Gears] AS [g]
93829382
WHERE [g].[HasSoulPatch] = CAST(1 AS bit) AND EXISTS (
93839383
SELECT 1
9384-
FROM OpenJson(@__values_0) AS [v]
9384+
FROM OPENJSON(@__values_0) AS [v]
93859385
WHERE CAST([v].[value] AS bit) = [g].[HasSoulPatch])
93869386
""");
93879387
}
@@ -9398,7 +9398,7 @@ public override async Task Where_bool_column_or_Contains(bool async)
93989398
FROM [Gears] AS [g]
93999399
WHERE [g].[HasSoulPatch] = CAST(1 AS bit) AND EXISTS (
94009400
SELECT 1
9401-
FROM OpenJson(@__values_0) AS [v]
9401+
FROM OPENJSON(@__values_0) AS [v]
94029402
WHERE CAST([v].[value] AS bit) = [g].[HasSoulPatch])
94039403
""");
94049404
}
@@ -10118,7 +10118,7 @@ FROM [Gears] AS [g1]
1011810118
GROUP BY [s].[Name]
1011910119
""");
1012010120
}
10121-
10121+
1012210122
private void AssertSql(params string[] expected)
1012310123
=> Fixture.TestSqlLoggerFactory.AssertBaseline(expected);
1012410124
}

0 commit comments

Comments
 (0)