diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortIn_Expression_NET8_0.snap index 394d2cca7c5..5ffbfed8e62 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortIn_Expression_NET8_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortIn_Expression_NET8_0.snap @@ -16,9 +16,14 @@ 12and13 SQL: --------------- +.param set @__p_0 '[12,13]' + SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" IN (12, 13) +WHERE "d"."BarShort" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- 13and14 Result: @@ -39,9 +44,14 @@ WHERE "d"."BarShort" IN (12, 13) 13and14 SQL: --------------- +.param set @__p_0 '[13,14]' + SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" IN (13, 14) +WHERE "d"."BarShort" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- nullAnd14 diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotIn_Expression_NET8_0.snap index 651a83d5fd0..19bab4aea93 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotIn_Expression_NET8_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNotIn_Expression_NET8_0.snap @@ -13,9 +13,14 @@ 12and13 SQL: --------------- +.param set @__p_0 '[12,13]' + SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" NOT IN (12, 13) +WHERE "d"."BarShort" NOT IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- 13and14 Result: @@ -33,9 +38,14 @@ WHERE "d"."BarShort" NOT IN (12, 13) 13and14 SQL: --------------- +.param set @__p_0 '[13,14]' + SELECT "d"."Id", "d"."BarDecimal", "d"."BarDouble", "d"."BarFloat", "d"."BarInt", "d"."BarLong", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" NOT IN (13, 14) +WHERE "d"."BarShort" NOT IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- nullAnd14 diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableIn_Expression_NET8_0.snap index 7f139ada60d..f8be2ead8f9 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableIn_Expression_NET8_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableIn_Expression_NET8_0.snap @@ -16,9 +16,14 @@ 12and13 SQL: --------------- +.param set @__p_0 '[12,13]' + SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" IN (12, 13) +WHERE EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "d"."BarShort" OR ("p"."value" IS NULL AND "d"."BarShort" IS NULL)) --------------- 13and14 Result: @@ -39,9 +44,14 @@ WHERE "d"."BarShort" IN (12, 13) 13and14 SQL: --------------- +.param set @__p_0 '[13,14]' + SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" IN (13, 14) +WHERE EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "d"."BarShort" OR ("p"."value" IS NULL AND "d"."BarShort" IS NULL)) --------------- 13andNull Result: @@ -62,7 +72,12 @@ WHERE "d"."BarShort" IN (13, 14) 13andNull SQL: --------------- +.param set @__p_0 '[13,null]' + SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" IS NULL OR "d"."BarShort" = 13 +WHERE EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "d"."BarShort" OR ("p"."value" IS NULL AND "d"."BarShort" IS NULL)) --------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotIn_Expression_NET8_0.snap index 9992a6c6300..c3daaa470bf 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotIn_Expression_NET8_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorComparableTests.Create_ShortNullableNotIn_Expression_NET8_0.snap @@ -16,9 +16,14 @@ 12and13 SQL: --------------- +.param set @__p_0 '[12,13]' + SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" NOT IN (12, 13) OR "d"."BarShort" IS NULL +WHERE NOT EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "d"."BarShort" OR ("p"."value" IS NULL AND "d"."BarShort" IS NULL)) --------------- 13and14 Result: @@ -39,9 +44,14 @@ WHERE "d"."BarShort" NOT IN (12, 13) OR "d"."BarShort" IS NULL 13and14 SQL: --------------- +.param set @__p_0 '[13,14]' + SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" NOT IN (13, 14) OR "d"."BarShort" IS NULL +WHERE NOT EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "d"."BarShort" OR ("p"."value" IS NULL AND "d"."BarShort" IS NULL)) --------------- 13andNull Result: @@ -62,7 +72,12 @@ WHERE "d"."BarShort" NOT IN (13, 14) OR "d"."BarShort" IS NULL 13andNull SQL: --------------- +.param set @__p_0 '[13,null]' + SELECT "d"."Id", "d"."BarShort" FROM "Data" AS "d" -WHERE "d"."BarShort" IS NOT NULL AND "d"."BarShort" <> 13 +WHERE NOT EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "d"."BarShort" OR ("p"."value" IS NULL AND "d"."BarShort" IS NULL)) --------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumIn_Expression_NET8_0.snap index 91a377a9fe2..d6888cdaefc 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumIn_Expression_NET8_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumIn_Expression_NET8_0.snap @@ -16,9 +16,14 @@ BarAndFoo Result: BarAndFoo SQL: --------------- +.param set @__p_0 '[1,0]' + SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" IN (1, 0) +WHERE "d"."BarEnum" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- FOO Result: @@ -36,9 +41,14 @@ FOO Result: FOO SQL: --------------- +.param set @__p_0 '[0]' + SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" = 0 +WHERE "d"."BarEnum" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- nullAndFoo Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotIn_Expression_NET8_0.snap index 405e67be74b..c914d77cb14 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotIn_Expression_NET8_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_EnumNotIn_Expression_NET8_0.snap @@ -16,9 +16,14 @@ BarAndFoo Result: BarAndFoo SQL: --------------- +.param set @__p_0 '[1,0]' + SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" NOT IN (1, 0) +WHERE "d"."BarEnum" NOT IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- FOO Result: @@ -42,9 +47,14 @@ FOO Result: FOO SQL: --------------- +.param set @__p_0 '[0]' + SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" <> 0 +WHERE "d"."BarEnum" NOT IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- nullAndFoo Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumIn_Expression_NET8_0.snap index 53659e9b258..0869eb82899 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumIn_Expression_NET8_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumIn_Expression_NET8_0.snap @@ -16,9 +16,14 @@ BarAndFoo Result: BarAndFoo SQL: --------------- +.param set @__p_0 '[1,0]' + SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" IN (1, 0) +WHERE EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "d"."BarEnum" OR ("p"."value" IS NULL AND "d"."BarEnum" IS NULL)) --------------- FOO Result: @@ -36,9 +41,14 @@ FOO Result: FOO SQL: --------------- +.param set @__p_0 '[0]' + SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" = 0 +WHERE EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "d"."BarEnum" OR ("p"."value" IS NULL AND "d"."BarEnum" IS NULL)) --------------- nullAndFoo Result: @@ -59,7 +69,12 @@ nullAndFoo Result: nullAndFoo SQL: --------------- +.param set @__p_0 '[null,0]' + SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" IS NULL OR "d"."BarEnum" = 0 +WHERE EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "d"."BarEnum" OR ("p"."value" IS NULL AND "d"."BarEnum" IS NULL)) --------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotIn_Expression_NET8_0.snap index 13a6421e041..1fa8754636c 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotIn_Expression_NET8_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorEnumTests.Create_NullableEnumNotIn_Expression_NET8_0.snap @@ -19,9 +19,14 @@ BarAndFoo Result: BarAndFoo SQL: --------------- +.param set @__p_0 '[1,0]' + SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" NOT IN (1, 0) OR "d"."BarEnum" IS NULL +WHERE NOT EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "d"."BarEnum" OR ("p"."value" IS NULL AND "d"."BarEnum" IS NULL)) --------------- FOO Result: @@ -48,9 +53,14 @@ FOO Result: FOO SQL: --------------- +.param set @__p_0 '[0]' + SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" <> 0 OR "d"."BarEnum" IS NULL +WHERE NOT EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "d"."BarEnum" OR ("p"."value" IS NULL AND "d"."BarEnum" IS NULL)) --------------- nullAndFoo Result: @@ -74,7 +84,12 @@ nullAndFoo Result: nullAndFoo SQL: --------------- +.param set @__p_0 '[null,0]' + SELECT "d"."Id", "d"."BarEnum" FROM "Data" AS "d" -WHERE "d"."BarEnum" IS NOT NULL AND "d"."BarEnum" <> 0 +WHERE NOT EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "d"."BarEnum" OR ("p"."value" IS NULL AND "d"."BarEnum" IS NULL)) --------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumIn_Expression_NET8_0.snap index 91a68889081..33f10d28d31 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumIn_Expression_NET8_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectEnumIn_Expression_NET8_0.snap @@ -25,10 +25,15 @@ BarAndFoo Result: BarAndFoo SQL: --------------- +.param set @__p_0 '[1,0]' + SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarEnum" IN (1, 0) +WHERE "f"."BarEnum" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- FOO Result: @@ -48,10 +53,15 @@ FOO Result: FOO SQL: --------------- +.param set @__p_0 '[0]' + SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarEnum" = 0 +WHERE "f"."BarEnum" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- nullAndFoo Result: diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableEnumIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableEnumIn_Expression_NET8_0.snap index 35183cfc7de..2fb24d69128 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableEnumIn_Expression_NET8_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableEnumIn_Expression_NET8_0.snap @@ -25,10 +25,15 @@ BarAndFoo Result: BarAndFoo SQL: --------------- +.param set @__p_0 '[1,0]' + SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarEnum" IN (1, 0) +WHERE EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "f"."BarEnum" OR ("p"."value" IS NULL AND "f"."BarEnum" IS NULL)) --------------- FOO Result: @@ -48,10 +53,15 @@ FOO Result: FOO SQL: --------------- +.param set @__p_0 '[0]' + SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarEnum" = 0 +WHERE EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "f"."BarEnum" OR ("p"."value" IS NULL AND "f"."BarEnum" IS NULL)) --------------- nullAndFoo Result: @@ -71,8 +81,13 @@ nullAndFoo Result: nullAndFoo SQL: --------------- +.param set @__p_0 '[null,0]' + SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarEnum" IS NULL OR "f"."BarEnum" = 0 +WHERE EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "f"."BarEnum" OR ("p"."value" IS NULL AND "f"."BarEnum" IS NULL)) --------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableShortIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableShortIn_Expression_NET8_0.snap index d621b91692e..f0487dbc5b2 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableShortIn_Expression_NET8_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectNullableShortIn_Expression_NET8_0.snap @@ -25,10 +25,15 @@ 12and13 SQL: --------------- +.param set @__p_0 '[12,13]' + SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarShort" IN (12, 13) +WHERE EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "f"."BarShort" OR ("p"."value" IS NULL AND "f"."BarShort" IS NULL)) --------------- 13and14 Result: @@ -58,10 +63,15 @@ WHERE "f"."BarShort" IN (12, 13) 13and14 SQL: --------------- +.param set @__p_0 '[13,14]' + SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarShort" IN (13, 14) +WHERE EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "f"."BarShort" OR ("p"."value" IS NULL AND "f"."BarShort" IS NULL)) --------------- 13andNull Result: @@ -91,8 +101,13 @@ WHERE "f"."BarShort" IN (13, 14) 13andNull SQL: --------------- +.param set @__p_0 '[13,null]' + SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" LEFT JOIN "FooNullable" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarShort" IS NULL OR "f"."BarShort" = 13 +WHERE EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "f"."BarShort" OR ("p"."value" IS NULL AND "f"."BarShort" IS NULL)) --------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortIn_Expression_NET8_0.snap index 6f608e5c5e4..8242046a275 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortIn_Expression_NET8_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectShortIn_Expression_NET8_0.snap @@ -25,10 +25,15 @@ 12and13 SQL: --------------- +.param set @__p_0 '[12,13]' + SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarShort" IN (12, 13) +WHERE "f"."BarShort" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- 13and14 Result: @@ -58,10 +63,15 @@ WHERE "f"."BarShort" IN (12, 13) 13and14 SQL: --------------- +.param set @__p_0 '[13,14]' + SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarShort" IN (13, 14) +WHERE "f"."BarShort" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- nullAnd14 diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringIn_Expression_NET8_0.snap index 4ccc690b20b..bb95e6c11d5 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringIn_Expression_NET8_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorObjectTests.Create_ObjectStringIn_Expression_NET8_0.snap @@ -30,10 +30,15 @@ testatestAndtestb Result: testatestAndtestb SQL: --------------- +.param set @__p_0 '["testatest","testbtest"]' + SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarString" IN ('testatest', 'testbtest') +WHERE "f"."BarString" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- testbtestAndNull @@ -86,8 +91,13 @@ testatest Result: testatest SQL: --------------- +.param set @__p_0 '["testatest"]' + SELECT "d"."Id", "d"."FooId" FROM "Data" AS "d" INNER JOIN "Foo" AS "f" ON "d"."FooId" = "f"."Id" -WHERE "f"."BarString" = 'testatest' +WHERE "f"."BarString" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringIn_Expression_NET8_0.snap index d805c740d6d..a856f9495ac 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringIn_Expression_NET8_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringIn_Expression_NET8_0.snap @@ -16,9 +16,14 @@ testatestAndtestb Result: testatestAndtestb SQL: --------------- +.param set @__p_0 '["testatest","testbtest"]' + SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" IN ('testatest', 'testbtest') +WHERE EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "d"."Bar" OR ("p"."value" IS NULL AND "d"."Bar" IS NULL)) --------------- testbtestAndNull Result: @@ -39,9 +44,14 @@ testbtestAndNull Result: testbtestAndNull SQL: --------------- +.param set @__p_0 '["testbtest",null]' + SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" IS NULL OR "d"."Bar" = 'testbtest' +WHERE EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "d"."Bar" OR ("p"."value" IS NULL AND "d"."Bar" IS NULL)) --------------- testatest Result: @@ -59,7 +69,12 @@ testatest Result: testatest SQL: --------------- +.param set @__p_0 '["testatest"]' + SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" = 'testatest' +WHERE EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "d"."Bar" OR ("p"."value" IS NULL AND "d"."Bar" IS NULL)) --------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotIn_Expression_NET8_0.snap index 666bc064c60..7dec89079f6 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotIn_Expression_NET8_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_NullableStringNotIn_Expression_NET8_0.snap @@ -13,9 +13,14 @@ testatestAndtestb Result: testatestAndtestb SQL: --------------- +.param set @__p_0 '["testatest","testbtest"]' + SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" NOT IN ('testatest', 'testbtest') OR "d"."Bar" IS NULL +WHERE NOT EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "d"."Bar" OR ("p"."value" IS NULL AND "d"."Bar" IS NULL)) --------------- testbtestAndNull Result: @@ -33,9 +38,14 @@ testbtestAndNull Result: testbtestAndNull SQL: --------------- +.param set @__p_0 '["testbtest",null]' + SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" IS NOT NULL AND "d"."Bar" <> 'testbtest' +WHERE NOT EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "d"."Bar" OR ("p"."value" IS NULL AND "d"."Bar" IS NULL)) --------------- testatest Result: @@ -56,7 +66,12 @@ testatest Result: testatest SQL: --------------- +.param set @__p_0 '["testatest"]' + SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" <> 'testatest' OR "d"."Bar" IS NULL +WHERE NOT EXISTS ( + SELECT 1 + FROM json_each(@__p_0) AS "p" + WHERE "p"."value" = "d"."Bar" OR ("p"."value" IS NULL AND "d"."Bar" IS NULL)) --------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringIn_Expression_NET8_0.snap index 1ad1c4b35de..1d36198f2f5 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringIn_Expression_NET8_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringIn_Expression_NET8_0.snap @@ -16,9 +16,14 @@ testatestAndtestb Result: testatestAndtestb SQL: --------------- +.param set @__p_0 '["testatest","testbtest"]' + SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" IN ('testatest', 'testbtest') +WHERE "d"."Bar" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- testbtestAndNull @@ -64,7 +69,12 @@ testatest Result: testatest SQL: --------------- +.param set @__p_0 '["testatest"]' + SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" = 'testatest' +WHERE "d"."Bar" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +) --------------- diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotIn_Expression_NET8_0.snap b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotIn_Expression_NET8_0.snap index fabe5386a6a..e80467042a4 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotIn_Expression_NET8_0.snap +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/QueryableFilterVisitorStringTests.Create_StringNotIn_Expression_NET8_0.snap @@ -9,9 +9,14 @@ testatestAndtestb Result: testatestAndtestb SQL: --------------- +.param set @__p_0 '["testatest","testbtest"]' + SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" NOT IN ('testatest', 'testbtest') +WHERE NOT (COALESCE("d"."Bar" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +), 0)) --------------- testbtestAndNull @@ -57,7 +62,12 @@ testatest Result: testatest SQL: --------------- +.param set @__p_0 '["testatest"]' + SELECT "d"."Id", "d"."Bar" FROM "Data" AS "d" -WHERE "d"."Bar" <> 'testatest' +WHERE NOT (COALESCE("d"."Bar" IN ( + SELECT "p"."value" + FROM json_each(@__p_0) AS "p" +), 0)) ---------------