Skip to content

Commit 3f83219

Browse files
committed
refactor(qc): remove unused ScalarType::Param variant (#5737)
Remove unused `ScalarType::Param`. This was intended to be used for schema-driver parameterization in the initial prototype but it would not have been an adequate representation, and we have now chosen a better way to mark fields as parameterizable.
1 parent 251611e commit 3f83219

3 files changed

Lines changed: 0 additions & 5 deletions

File tree

query-compiler/core/src/query_document/parser.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,6 @@ impl QueryDocumentParser {
442442
// UUID coercion matchers
443443
(PrismaValue::Uuid(uuid), ScalarType::String) => Ok(PrismaValue::String(uuid.to_string())),
444444

445-
(pv @ PrismaValue::Placeholder { .. }, ScalarType::Param) => Ok(pv),
446-
447445
// All other combinations are value type mismatches.
448446
(_, _) => Err(ValidationError::invalid_argument_type(
449447
selection_path.segments(),

query-compiler/dmmf/src/ast_builders/schema_ast_builder/type_renderer.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ pub(super) fn render_output_type<'a>(output_type: &OutputType<'a>, ctx: &mut Ren
4646
ScalarType::UUID => "UUID",
4747
ScalarType::JsonList => "Json",
4848
ScalarType::Bytes => "Bytes",
49-
ScalarType::Param => unreachable!("output type must not be Param"),
5049
};
5150

5251
DmmfTypeReference {

query-compiler/schema/src/query_schema.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,6 @@ pub enum ScalarType {
373373
JsonList,
374374
UUID,
375375
Bytes,
376-
Param,
377376
}
378377

379378
impl fmt::Display for ScalarType {
@@ -391,7 +390,6 @@ impl fmt::Display for ScalarType {
391390
ScalarType::UUID => "UUID",
392391
ScalarType::JsonList => "Json",
393392
ScalarType::Bytes => "Bytes",
394-
ScalarType::Param => "Param",
395393
};
396394

397395
f.write_str(typ)

0 commit comments

Comments
 (0)