Skip to content

Commit

Permalink
chore: rename distinctOn preview feature to nativeDistinct (#4518)
Browse files Browse the repository at this point in the history
  • Loading branch information
janpio committed Dec 4, 2023
1 parent 845c140 commit 0d724e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions psl/psl-core/src/common/preview_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ macro_rules! features {
};
}

// (Usually) Append-only list of features.
// (Usually) Append-only list of features. (alphabetically sorted)
features!(
AggregateApi,
AtomicNumberOperations,
Expand All @@ -43,7 +43,6 @@ features!(
ConnectOrCreate,
CreateMany,
DataProxy,
DistinctOn,
Deno,
Distinct,
DriverAdapters,
Expand All @@ -65,6 +64,7 @@ features!(
MultiSchema,
NamedConstraints,
NApi,
NativeDistinct,
NativeTypes,
OrderByAggregateGroup,
OrderByNulls,
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion psl/psl/tests/config/generators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ fn nice_error_for_unknown_generator_preview_feature() {
.unwrap_err();

let expectation = expect![[r#"
[1;91merror[0m: [1mThe preview feature "foo" is not known. Expected one of: distinctOn, deno, driverAdapters, fullTextIndex, fullTextSearch, metrics, multiSchema, postgresqlExtensions, tracing, views[0m
[1;91merror[0m: [1mThe preview feature "foo" is not known. Expected one of: deno, driverAdapters, fullTextIndex, fullTextSearch, metrics, multiSchema, nativeDistinct, postgresqlExtensions, tracing, views[0m
--> schema.prisma:3
 | 
 2 |  provider = "prisma-client-js"
Expand Down
2 changes: 1 addition & 1 deletion query-engine/query-structure/src/query_arguments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl QueryArguments {
.schema
.configuration
.preview_features()
.contains(PreviewFeature::DistinctOn);
.contains(PreviewFeature::NativeDistinct);

let connector_can_distinct_in_db = self
.model()
Expand Down

0 comments on commit 0d724e3

Please sign in to comment.