Skip to content

Commit

Permalink
Remove unused stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
aqrln committed Jan 14, 2025
1 parent 0e6a694 commit 361de20
Showing 1 changed file with 1 addition and 30 deletions.
31 changes: 1 addition & 30 deletions query-engine/core/src/compiler/translate/query/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ use std::collections::HashSet;

use itertools::Itertools;
use query_structure::{
ConditionListValue, ConditionValue, Filter, ModelProjection, PlaceholderType, PrismaValue, QueryMode,
RelationField, ScalarCondition, ScalarField, ScalarFilter, ScalarProjection, SelectedField, SelectionResult,
ConditionValue, Filter, ModelProjection, PrismaValue, QueryMode, ScalarCondition, ScalarFilter, ScalarProjection,
};
use sql_query_connector::{
context::Context, model_extensions::AsColumns, query_arguments_ext::QueryArgumentsExt, query_builder,
Expand Down Expand Up @@ -124,34 +123,6 @@ fn add_inmemory_join(parent: Expression, nested: Vec<ReadQuery>, ctx: &Context<'
.map(|(left, right)| (left.name().to_owned(), right.name().to_owned()))
.collect_vec();

// let linking_placeholders = parent_fields
// .scalars()
// .map(|sf| {
// (
// sf.clone(),
// PrismaValue::placeholder(
// format!("@parent${}", sf.name()),
// sf.type_identifier().to_placeholder_type(),
// ),
// )
// })
// .collect::<Vec<_>>();
//
// // If constant values were already provided for some of the fields, merge the
// // placeholders for the missing fields. Otherwise, assign new `parent_results`.
// if let Some(parent_results) = &mut rrq.parent_results {
// for result in parent_results {
// for (sf, value) in &linking_placeholders {
// let field = SelectedField::from(sf.clone());
// if result.get(&field).is_none() {
// result.add((field, value.clone()));
// }
// }
// }
// } else {
// rrq.parent_results = Some(vec![SelectionResult::new(linking_placeholders)]);
// }

for (parent_field, child_field) in parent_fields.scalars().zip(child_fields.scalars()) {
let placeholder = PrismaValue::placeholder(
format!("@parent${}", parent_field.name()),
Expand Down

0 comments on commit 361de20

Please sign in to comment.