From 0d724e37b36bf276aa095d4571213cd035eafad0 Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Mon, 4 Dec 2023 21:17:30 +0100 Subject: [PATCH] chore: rename distinctOn preview feature to nativeDistinct (#4518) --- psl/psl-core/src/common/preview_features.rs | 8 ++++---- psl/psl/tests/config/generators.rs | 2 +- query-engine/query-structure/src/query_arguments.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/psl/psl-core/src/common/preview_features.rs b/psl/psl-core/src/common/preview_features.rs index ca9da322933d..84caa7138e84 100644 --- a/psl/psl-core/src/common/preview_features.rs +++ b/psl/psl-core/src/common/preview_features.rs @@ -34,7 +34,7 @@ macro_rules! features { }; } -// (Usually) Append-only list of features. +// (Usually) Append-only list of features. (alphabetically sorted) features!( AggregateApi, AtomicNumberOperations, @@ -43,7 +43,6 @@ features!( ConnectOrCreate, CreateMany, DataProxy, - DistinctOn, Deno, Distinct, DriverAdapters, @@ -65,6 +64,7 @@ features!( MultiSchema, NamedConstraints, NApi, + NativeDistinct, NativeTypes, OrderByAggregateGroup, OrderByNulls, @@ -79,16 +79,16 @@ features!( Views, ); -/// Generator preview features +/// Generator preview features (alphabetically sorted) pub const ALL_PREVIEW_FEATURES: FeatureMap = FeatureMap { active: enumflags2::make_bitflags!(PreviewFeature::{ Deno - | DistinctOn | DriverAdapters | FullTextIndex | FullTextSearch | Metrics | MultiSchema + | NativeDistinct | PostgresqlExtensions | Tracing | Views diff --git a/psl/psl/tests/config/generators.rs b/psl/psl/tests/config/generators.rs index 2f0708b13dc9..c5380c271bf5 100644 --- a/psl/psl/tests/config/generators.rs +++ b/psl/psl/tests/config/generators.rs @@ -258,7 +258,7 @@ fn nice_error_for_unknown_generator_preview_feature() { .unwrap_err(); let expectation = expect![[r#" - error: The preview feature "foo" is not known. Expected one of: distinctOn, deno, driverAdapters, fullTextIndex, fullTextSearch, metrics, multiSchema, postgresqlExtensions, tracing, views + error: The preview feature "foo" is not known. Expected one of: deno, driverAdapters, fullTextIndex, fullTextSearch, metrics, multiSchema, nativeDistinct, postgresqlExtensions, tracing, views --> schema.prisma:3  |   2 |  provider = "prisma-client-js" diff --git a/query-engine/query-structure/src/query_arguments.rs b/query-engine/query-structure/src/query_arguments.rs index 16eaa189dd88..1d75866db67e 100644 --- a/query-engine/query-structure/src/query_arguments.rs +++ b/query-engine/query-structure/src/query_arguments.rs @@ -86,7 +86,7 @@ impl QueryArguments { .schema .configuration .preview_features() - .contains(PreviewFeature::DistinctOn); + .contains(PreviewFeature::NativeDistinct); let connector_can_distinct_in_db = self .model()