Skip to content

Commit

Permalink
rename preview feature from joins to relationJoins
Browse files Browse the repository at this point in the history
  • Loading branch information
Weakky committed Dec 1, 2023
1 parent bc60a31 commit a84fe43
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions psl/psl-core/src/common/preview_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ features!(
TransactionApi,
UncheckedScalarInputs,
Views,
Joins
RelationJoins
);

/// Generator preview features
Expand All @@ -91,7 +91,7 @@ pub const ALL_PREVIEW_FEATURES: FeatureMap = FeatureMap {
| PostgresqlExtensions
| Tracing
| Views
| Joins
| RelationJoins
}),
deprecated: enumflags2::make_bitflags!(PreviewFeature::{
AtomicNumberOperations
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: deno, driverAdapters, fullTextIndex, fullTextSearch, metrics, multiSchema, postgresqlExtensions, tracing, views, joins[0m
[1;91merror[0m: [1mThe preview feature "foo" is not known. Expected one of: deno, driverAdapters, fullTextIndex, fullTextSearch, metrics, multiSchema, postgresqlExtensions, tracing, views, relationJoins[0m
--> schema.prisma:3
 | 
 2 |  provider = "prisma-client-js"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ mod isb {
// "batching of IN queries" should "work when having more than the specified amount of items"
// TODO(joins): Excluded because we have no support for batched queries with joins. In practice, it should happen under much less circumstances
// TODO(joins): than with the query-based strategy, because we don't issue `WHERE IN (parent_ids)` queries anymore to resolve relations.
#[connector_test(exclude_features("joins"))]
#[connector_test(exclude_features("relationJoins"))]
async fn in_more_items(runner: Runner) -> TestResult<()> {
create_test_data(&runner).await?;

Expand All @@ -55,7 +55,7 @@ mod isb {
// "ascending ordering of batched IN queries" should "work when having more than the specified amount of items"
// TODO(joins): Excluded because we have no support for batched queries with joins. In practice, it should happen under much less circumstances
// TODO(joins): than with the query-based strategy, because we don't issue `WHERE IN (parent_ids)` queries anymore to resolve relations.
#[connector_test(exclude_features("joins"))]
#[connector_test(exclude_features("relationJoins"))]
async fn asc_in_ordering(runner: Runner) -> TestResult<()> {
create_test_data(&runner).await?;

Expand All @@ -73,7 +73,7 @@ mod isb {
// "ascending ordering of batched IN queries" should "work when having more than the specified amount of items"
// TODO(joins): Excluded because we have no support for batched queries with joins. In practice, it should happen under much less circumstances
// TODO(joins): than with the query-based strategy, because we don't issue `WHERE IN (parent_ids)` queries anymore to resolve relations.
#[connector_test(exclude_features("joins"))]
#[connector_test(exclude_features("relationJoins"))]
async fn desc_in_ordering(runner: Runner) -> TestResult<()> {
create_test_data(&runner).await?;

Expand Down
4 changes: 2 additions & 2 deletions query-engine/core/src/query_graph_builder/read/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ where
T: Into<ParentContainer>,
{
let should_collect_relation_selection = query_schema.has_capability(ConnectorCapability::LateralJoin)
&& query_schema.has_feature(PreviewFeature::Joins);
&& query_schema.has_feature(PreviewFeature::RelationJoins);

let parent = parent.into();

Expand Down Expand Up @@ -248,7 +248,7 @@ pub(crate) fn get_relation_load_strategy(
aggregation_selections: &[RelAggregationSelection],
query_schema: &QuerySchema,
) -> RelationLoadStrategy {
if query_schema.has_feature(PreviewFeature::Joins)
if query_schema.has_feature(PreviewFeature::RelationJoins)
&& query_schema.has_capability(ConnectorCapability::LateralJoin)
&& args.cursor.is_none()
&& args.distinct.is_none()
Expand Down

0 comments on commit a84fe43

Please sign in to comment.