Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ public virtual bool SupportsJsonType
=> EngineType switch
{
SqlServerEngineType.SqlServer => SqlServerCompatibilityLevel >= 170,
SqlServerEngineType.AzureSql => AzureSqlCompatibilityLevel >= 170,
// TODO: #36460
// At the time of writing, Azure SQL Database does not yet support OPENJSON over the JSON data type.
// This should get reenabled by the time we GA.
SqlServerEngineType.AzureSql => false,
// SqlServerEngineType.AzureSql => AzureSqlCompatibilityLevel >= 170,
SqlServerEngineType.AzureSynapse => false,
SqlServerEngineType.Unknown => false, // TODO: We shouldn't observe Unknown here, #36477
_ => throw new UnreachableException()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1588,8 +1588,13 @@ public void Json_is_mapped_to_json_type_with_UseAzureSql_by_default()
{
var typeMappingSource = CreateTypeMappingSource(o => o.UseAzureSql());

Assert.Equal("json", typeMappingSource.GetMapping(typeof(JsonTypePlaceholder)).StoreType);
Assert.Equal("json", typeMappingSource.GetMapping(typeof(int[])).StoreType);
// TODO: #36460
// At the time of writing, Azure SQL Database does not yet support OPENJSON over the JSON data type.
// This should get reenabled by the time we GA.
Assert.Equal("nvarchar(max)", typeMappingSource.GetMapping(typeof(JsonTypePlaceholder)).StoreType);
Assert.Equal("nvarchar(max)", typeMappingSource.GetMapping(typeof(int[])).StoreType);
// Assert.Equal("json", typeMappingSource.GetMapping(typeof(JsonTypePlaceholder)).StoreType);
// Assert.Equal("json", typeMappingSource.GetMapping(typeof(int[])).StoreType);
}

[ConditionalFact]
Expand Down
Loading