Repository: prisma/prisma-engines
Pull request #5443: feat: MySQL insert support
Author: login: jacek-prisma
Created: 2025-05-29T17:02:35Z | Merged: 2025-05-30T12:13:06Z

[ORM-603](https://linear.app/prisma-company/issue/ORM-603/support-mysql-inserts)

/prisma-branch feat/extend-record-node


Diff:
diff --git a/libs/prisma-value/src/lib.rs b/libs/prisma-value/src/lib.rs
index 2cfbd6c2221c..5b457328ec50 100644
--- a/libs/prisma-value/src/lib.rs
+++ b/libs/prisma-value/src/lib.rs
@@ -104,6 +104,12 @@ pub struct Placeholder {
     pub r#type: PrismaValueType,
 }
 
+impl Placeholder {
+    pub fn new(name: String, r#type: PrismaValueType) -> Self {
+        Self { name, r#type }
+    }
+}
+
 /// Stringify a date to the following format
 /// 1999-05-01T00:00:00.000Z
 pub fn stringify_datetime(datetime: &DateTime<FixedOffset>) -> String {
diff --git a/quaint/src/ast/select.rs b/quaint/src/ast/select.rs
index 0ff161676044..cc5a42f72aa0 100644
--- a/quaint/src/ast/select.rs
+++ b/quaint/src/ast/select.rs
@@ -722,3 +722,9 @@ impl<'a> Select<'a> {
 }
 
 impl<'a> IntoCommonTableExpression<'a> for Select<'a> {}
+
+impl<'a> Extend<Expression<'a>> for Select<'a> {
+    fn extend<T: IntoIterator<Item = Expression<'a>>>(&mut self, iter: T) {
+        self.columns.extend(iter);
+    }
+}
diff --git a/query-compiler/query-compiler/src/expression.rs b/query-compiler/query-compiler/src/expression.rs
index 4475a243907e..aa507649127f 100644
--- a/query-compiler/query-compiler/src/expression.rs
+++ b/query-compiler/query-compiler/src/expression.rs
@@ -1,9 +1,9 @@
-use std::collections::HashMap;
+use std::collections::{BTreeMap, HashMap};
 
 use crate::result_node::ResultNode;
 use query_builder::DbQuery;
 use query_core::{DataExpectation, DataRule};
-use query_structure::PrismaValue;
+use query_structure::{PrismaValue, TaggedPrismaValue};
 use serde::Serialize;
 
 mod format;
@@ -124,6 +124,19 @@ pub enum Expression {
         expr: Box<Expression>,
         pagination: Pagination,
     },
+
+    /// Extends a record with additional values.
+    ExtendRecord {
+        expr: Box<Expression>,
+        values: BTreeMap<String, RecordValue>,
+    },
+}
+
+#[derive(Debug, Serialize)]
+#[serde(tag = "type", content = "value", rename_all = "camelCase")]
+pub enum RecordValue {
+    LastInsertId,
+    Value(#[serde(serialize_with = "serialize_tagged_value")] PrismaValue),
 }
 
 #[derive(Debug, Serialize)]
@@ -240,6 +253,7 @@ impl Expression {
             Expression::Diff { from, .. } => from.r#type(),
             Expression::DistinctBy { expr, .. } => expr.r#type(),
             Expression::Paginate { expr, .. } => expr.r#type(),
+            Expression::ExtendRecord { expr, .. } => expr.r#type(),
         }
     }
 
@@ -258,3 +272,10 @@ impl std::fmt::Display for Expression {
         self.pretty_print(false, 80).map_err(|_| std::fmt::Error)?.fmt(f)
     }
 }
+
+fn serialize_tagged_value<S>(obj: &PrismaValue, serializer: S) -> Result<S::Ok, S::Error>
+where
+    S: serde::Serializer,
+{
+    TaggedPrismaValue::from(obj).serialize(serializer)
+}
diff --git a/query-compiler/query-compiler/src/expression/format.rs b/query-compiler/query-compiler/src/expression/format.rs
index c219fba5b553..78b2ed01f8cf 100644
--- a/query-compiler/query-compiler/src/expression/format.rs
+++ b/query-compiler/query-compiler/src/expression/format.rs
@@ -1,4 +1,4 @@
-use super::{Binding, DbQuery, Expression, JoinExpression, Pagination};
+use super::{Binding, DbQuery, Expression, JoinExpression, Pagination, RecordValue};
 use crate::result_node::ResultNode;
 use pretty::{
     DocAllocator, DocBuilder,
@@ -6,7 +6,7 @@ use pretty::{
 };
 use query_core::DataRule;
 use query_structure::{Placeholder, PrismaValue};
-use std::borrow::Cow;
+use std::{borrow::Cow, collections::BTreeMap};
 
 fn color_kw() -> ColorSpec {
     ColorSpec::new().set_fg(Some(Color::Blue)).clone()
@@ -74,6 +74,7 @@ where
             Expression::Diff { from, to } => self.diff(from, to),
             Expression::DistinctBy { expr, fields } => self.distinct_by(expr, fields),
             Expression::Paginate { expr, pagination } => self.paginate(expr, pagination),
+            Expression::ExtendRecord { expr, values } => self.extend_record(expr, values),
         }
     }
 
@@ -460,6 +461,35 @@ where
 
         builder.append(self.expression(expr))
     }
+
+    fn extend_record(
+        &'a self,
+        expr: &'a Expression,
+        fields: &'a BTreeMap<String, RecordValue>,
+    ) -> DocBuilder<'a, PrettyPrinter<'a, D>, ColorSpec> {
+        self.keyword("extend")
+            .append(self.space())
+            .append(
+                self.intersperse(
+                    fields.iter().map(|(name, value)| {
+                        let value = match value {
+                            RecordValue::LastInsertId => self.keyword("lastInsertId"),
+                            RecordValue::Value(value) => self.value(value),
+                        };
+                        self.field_name(name)
+                            .append(self.text(":"))
+                            .append(self.space())
+                            .append(value)
+                    }),
+                    self.line(),
+                )
+                .append(self.line())
+                .indent(4)
+                .braces(),
+            )
+            .append(self.space())
+            .append(self.expression(expr))
+    }
 }
 
 impl<'a, D, A> DocAllocator<'a, A> for PrettyPrinter<'a, D>
diff --git a/query-compiler/query-compiler/src/translate/query/write.rs b/query-compiler/query-compiler/src/translate/query/write.rs
index 422a8b73c9d6..badcf8594e62 100644
--- a/query-compiler/query-compiler/src/translate/query/write.rs
+++ b/query-compiler/query-compiler/src/translate/query/write.rs
@@ -1,29 +1,92 @@
 use itertools::{Either, Itertools};
-use query_builder::QueryBuilder;
+use query_builder::{CreateRecord, CreateRecordDefaultsQuery, QueryBuilder};
 use query_core::{
     ConnectRecords, DeleteManyRecords, DeleteRecord, DisconnectRecords, RawQuery, UpdateManyRecords, UpdateRecord,
     UpdateRecordWithSelection, WriteQuery,
 };
-use query_structure::{QueryArguments, RelationLoadStrategy, Take};
+use query_structure::{PrismaValue, QueryArguments, RelationLoadStrategy, Take};
 use sql_query_builder::write::split_write_args_by_shape;
+use std::{collections::BTreeMap, iter};
 
-use crate::{TranslateError, expression::Expression, translate::TranslateResult};
+use crate::{
+    TranslateError,
+    expression::{Binding, Expression, RecordValue},
+    translate::TranslateResult,
+};
 
 use super::read::add_inmemory_join;
 
 pub(crate) fn translate_write_query(query: WriteQuery, builder: &dyn QueryBuilder) -> TranslateResult<Expression> {
     Ok(match query {
         WriteQuery::CreateRecord(cr) => {
-            // TODO: MySQL needs additional logic to generate IDs on our side.
-            // See sql_query_connector::database::operations::write::create_record
-            let query = builder
+            let CreateRecord {
+                select_defaults,
+                insert_query,
+                last_insert_id_field,
+                merge_values,
+            } = builder
                 .build_create_record(&cr.model, cr.args, &cr.selected_fields)
                 .map_err(TranslateError::QueryBuildFailure)?;
 
-            // TODO: we probably need some additional node type or extra info in the WriteQuery node
-            // to help the client executor figure out the returned ID in the case when it's inferred
-            // from the query arguments.
-            Expression::Unique(Box::new(Expression::Query(query)))
+            let mut extensions = merge_values
+                .into_iter()
+                .map(|(field, value)| (field.prisma_name().into_owned(), RecordValue::Value(value)))
+                .collect::<BTreeMap<_, _>>();
+
+            if let Some(last_insert_id_field) = last_insert_id_field {
+                extensions.insert(last_insert_id_field.name().into(), RecordValue::LastInsertId);
+            }
+
+            if let Some(defaults_query) = &select_defaults {
+                // Extend the result record with any defaults that are generated by the extra
+                // select query, since they can a part of the primary identifier.
+                for (field, placeholder) in &defaults_query.field_placeholders {
+                    let value = RecordValue::Value(PrismaValue::Placeholder(placeholder.clone()));
+                    extensions.insert(field.name().into(), value);
+                }
+            }
+
+            let mut expr = Expression::Unique(Expression::Query(insert_query).into());
+
+            if !extensions.is_empty() {
+                expr = Expression::ExtendRecord {
+                    expr: expr.into(),
+                    values: extensions,
+                };
+            }
+
+            if let Some(CreateRecordDefaultsQuery {
+                query,
+                field_placeholders,
+            }) = select_defaults
+            {
+                const DEFAULTS_BINDING_NAME: &str = "defaults";
+
+                let select_binding = Binding::new(
+                    DEFAULTS_BINDING_NAME.into(),
+                    Expression::Unique(Expression::Query(query).into()),
+                );
+
+                let field_bindings = field_placeholders.into_iter().map(|(field, ph)| {
+                    let get_defaults = Expression::Get {
+                        name: DEFAULTS_BINDING_NAME.into(),
+                    };
+                    Binding::new(
+                        ph.name,
+                        Expression::MapField {
+                            field: field.name().into(),
+                            records: get_defaults.into(),
+                        },
+                    )
+                });
+
+                expr = Expression::Let {
+                    bindings: iter::once(select_binding).chain(field_bindings).collect(),
+                    expr: expr.into(),
+                };
+            }
+
+            expr
         }
 
         WriteQuery::CreateManyRecords(cmr) => {
diff --git a/query-compiler/query-engine-tests-todo/planetscale/fail/query b/query-compiler/query-engine-tests-todo/planetscale/fail/query
index 29932194098b..b1aae0b23d32 100644
--- a/query-compiler/query-engine-tests-todo/planetscale/fail/query
+++ b/query-compiler/query-engine-tests-todo/planetscale/fail/query
@@ -1,51 +1,11 @@
-new::cursor::bigint_cursor::bigint_id_must_work
 new::disconnect::disconnect_security::must_honor_connect_scope_m2m
 new::disconnect::disconnect_security::must_honor_connect_scope_one2m
 new::interactive_tx::interactive_tx::basic_commit_workflow
 new::interactive_tx::interactive_tx::basic_rollback_workflow
 new::interactive_tx::interactive_tx::batch_queries_failure
-new::interactive_tx::interactive_tx::batch_queries_success
-new::interactive_tx::interactive_tx::commit_after_rollback
-new::interactive_tx::interactive_tx::double_commit
-new::interactive_tx::interactive_tx::double_rollback
-﻿new::interactive_tx::interactive_tx::double_rollback
-new::interactive_tx::interactive_tx::multiple_tx
-new::interactive_tx::interactive_tx::no_auto_rollback
-new::interactive_tx::interactive_tx::rollback_after_commit
-new::interactive_tx::interactive_tx::tx_expiration_cycle
+new::interactive_tx::interactive_tx::batch_queries_rollback
 new::interactive_tx::interactive_tx::tx_expiration_failure_cycle
-new::interactive_tx::itx_isolation::basic_serializable
-new::interactive_tx::itx_isolation::high_concurrency
-new::occ::occ::occ_delete_many_test
-new::ref_actions::on_delete::cascade::multiple_cascading_paths::should_work
-new::ref_actions::on_delete::cascade::one2many_opt::delete_parent
-new::ref_actions::on_delete::cascade::one2many_req::delete_parent
-new::ref_actions::on_delete::cascade::one2one_opt::delete_parent
-new::ref_actions::on_delete::cascade::one2one_opt::delete_parent_diff_id_name
-new::ref_actions::on_delete::cascade::one2one_req::delete_parent
-new::ref_actions::on_delete::no_action::one2many_opt::delete_parent
-new::ref_actions::on_delete::no_action::one2many_opt::delete_parent_failure
-new::ref_actions::on_delete::no_action::one2many_req::delete_parent
-new::ref_actions::on_delete::no_action::one2many_req::delete_parent_failure
-new::ref_actions::on_delete::no_action::one2many_req::delete_parent_violation
-new::ref_actions::on_delete::no_action::one2one_opt::delete_parent
-new::ref_actions::on_delete::no_action::one2one_opt::delete_parent_failure
-new::ref_actions::on_delete::no_action::one2one_req::delete_parent_failure
-new::ref_actions::on_delete::restrict::one2many_opt::delete_parent
-new::ref_actions::on_delete::restrict::one2many_opt::delete_parent_failure
-new::ref_actions::on_delete::restrict::one2many_req::delete_parent
-new::ref_actions::on_delete::restrict::one2many_req::delete_parent_failure
-new::ref_actions::on_delete::restrict::one2one_opt::delete_parent
-new::ref_actions::on_delete::restrict::one2one_opt::delete_parent_diff_id_name
-new::ref_actions::on_delete::restrict::one2one_opt::delete_parent_failure
-new::ref_actions::on_delete::restrict::one2one_req::delete_parent_failure
-new::ref_actions::on_delete::set_null::one2many_opt::delete_parent
 new::ref_actions::on_delete::set_null::one2many_opt::prisma_17255
-new::ref_actions::on_delete::set_null::one2one_opt::delete_parent
-new::ref_actions::on_delete::set_null::one2one_opt::delete_parent_diff_id_name
-new::ref_actions::on_delete::set_null::one2one_opt::delete_parent_recurse_set_null
-new::ref_actions::on_delete::set_null::one2one_opt::delete_parent_set_null_cascade
-new::ref_actions::on_delete::set_null::one2one_opt::delete_parent_set_null_restrict
 new::ref_actions::on_update::cascade::multiple_cascading_paths::it_should_work
 new::ref_actions::on_update::cascade::one2many_opt::update_compound_parent
 new::ref_actions::on_update::cascade::one2many_opt::update_parent
@@ -55,40 +15,30 @@ new::ref_actions::on_update::cascade::one2one_opt::update_parent_compound_cascad
 new::ref_actions::on_update::cascade::one2one_opt::update_parent_diff_id_name
 new::ref_actions::on_update::cascade::one2one_req::update_parent_cascade
 new::ref_actions::on_update::cascade::one2one_req::update_parent_compound_cascade
-new::ref_actions::on_update::no_action::one2many_opt::update_many_parent_violation
 new::ref_actions::on_update::no_action::one2many_opt::update_parent
 new::ref_actions::on_update::no_action::one2many_opt::update_parent_failure
 new::ref_actions::on_update::no_action::one2many_opt::update_parent_violation
 new::ref_actions::on_update::no_action::one2many_opt::upsert_parent_violation
-new::ref_actions::on_update::no_action::one2many_req::update_many_parent_violation
 new::ref_actions::on_update::no_action::one2many_req::update_parent
 new::ref_actions::on_update::no_action::one2many_req::update_parent_violation
 new::ref_actions::on_update::no_action::one2many_req::upsert_parent_violation
-new::ref_actions::on_update::no_action::one2one_opt::update_many_parent_violation
 new::ref_actions::on_update::no_action::one2one_opt::update_parent
 new::ref_actions::on_update::no_action::one2one_opt::update_parent_failure
 new::ref_actions::on_update::no_action::one2one_opt::update_parent_violation
-new::ref_actions::on_update::no_action::one2one_opt::update_parent_with_many
 new::ref_actions::on_update::no_action::one2one_opt::upsert_parent_violation
-new::ref_actions::on_update::no_action::one2one_req::update_many_parent_violation
 new::ref_actions::on_update::no_action::one2one_req::update_parent_violation
 new::ref_actions::on_update::no_action::one2one_req::upsert_parent_violation
-new::ref_actions::on_update::restrict::one2many_opt::update_many_parent_failure
 new::ref_actions::on_update::restrict::one2many_opt::update_parent
 new::ref_actions::on_update::restrict::one2many_opt::update_parent_failure
 new::ref_actions::on_update::restrict::one2many_opt::upsert_parent_failure
-new::ref_actions::on_update::restrict::one2many_req::update_many_parent_failure
 new::ref_actions::on_update::restrict::one2many_req::update_parent
 new::ref_actions::on_update::restrict::one2many_req::update_parent_failure
 new::ref_actions::on_update::restrict::one2many_req::upsert_parent_failure
-new::ref_actions::on_update::restrict::one2one_opt::update_many_parent_failure
 new::ref_actions::on_update::restrict::one2one_opt::update_parent_failure
 new::ref_actions::on_update::restrict::one2one_opt::upsert_parent_failure
-new::ref_actions::on_update::restrict::one2one_req::update_many_parent_failure
 new::ref_actions::on_update::restrict::one2one_req::update_parent_failure
 new::ref_actions::on_update::restrict::one2one_req::upsert_parent_failure
 new::ref_actions::on_update::set_null::one2many_opt::update_compound_parent
-new::ref_actions::on_update::set_null::one2many_opt::update_many_parent
 new::ref_actions::on_update::set_null::one2many_opt::update_parent
 new::ref_actions::on_update::set_null::one2many_opt::update_parent_compound_recurse
 new::ref_actions::on_update::set_null::one2many_opt::update_parent_nested
@@ -97,192 +47,35 @@ new::ref_actions::on_update::set_null::one2many_opt::update_parent_recurse_restr
 new::ref_actions::on_update::set_null::one2many_opt::update_parent_recurse_set_null
 new::ref_actions::on_update::set_null::one2many_opt::upsert_parent
 new::ref_actions::on_update::set_null::one2many_opt::upsert_parent_nested
-new::ref_actions::on_update::set_null::one2one_opt::update_many_parent
 new::ref_actions::on_update::set_null::one2one_opt::update_parent
 new::ref_actions::on_update::set_null::one2one_opt::update_parent_diff_id_name
 new::ref_actions::on_update::set_null::one2one_opt::update_parent_no_recursion
 new::ref_actions::on_update::set_null::one2one_opt::update_parent_recurse_restrict_failure
 new::ref_actions::on_update::set_null::one2one_opt::update_parent_recurse_set_null
 new::ref_actions::on_update::set_null::one2one_opt::upsert_parent
-new::regressions::max_integer::float_serialization_issues::int_range_overlap_works
 new::regressions::max_integer::max_integer::unfitted_int_should_fail
 new::regressions::prisma_11750::prisma_11750::test_itx_concurrent_updates_multi_thread
 new::regressions::prisma_11750::prisma_11750::test_itx_concurrent_updates_single_thread
-new::regressions::prisma_12572::prisma_12572::all_generated_timestamps_are_the_same
-new::regressions::prisma_13089::prisma_13097::filtering_with_dollar_values
 new::regressions::prisma_14696::prisma_14696::create_does_not_panic
 new::regressions::prisma_14703::prisma_14703::upsert_does_not_panic_if_underflowing_the_scale
 new::regressions::prisma_15177::prisma_15177::repro
-new::regressions::prisma_15581::prisma_15581::create_one_model_with_datetime_default_now_in_id
-new::regressions::prisma_15581::prisma_15581::create_one_model_with_updated_at_in_id
-new::regressions::prisma_15581::prisma_15581::single_create_one_model_with_default_now_in_id
-new::regressions::prisma_15581::prisma_15581::single_create_one_model_with_updated_at_in_id
 new::regressions::prisma_21182::regression::query_with_normalized_dependencies
-new::regressions::prisma_22298::many_fields_in_related_table::query_53_fields_through_relation
 new::regressions::prisma_22971::prisma_22971::test_22971
-new::regressions::prisma_5952::regression::decimal_find_different_uniques
-new::regressions::prisma_5952::regression::decimal_find_different_uniques_unquoted
-new::regressions::prisma_7072::filter_in::test_filter_in
 new::regressions::prisma_7434::not_in_chunking::not_in_batch_filter
 new::regressions::prisma_8265::mongodb::nested_update_many_timestamps
-new::regressions::team_orm_927::count_before_relation::find_many
-new::regressions::team_orm_927::count_before_relation::find_unique
 new::relation_load_strategy::relation_load_strategy::test_create_subquery_join
-new::relation_load_strategy::relation_load_strategy::test_create_subquery_query
 new::relation_load_strategy::relation_load_strategy::test_delete_subquery_join
-new::relation_load_strategy::relation_load_strategy::test_delete_subquery_query
 new::relation_load_strategy::relation_load_strategy::test_find_first_or_throw_subquery_join
-new::relation_load_strategy::relation_load_strategy::test_find_first_or_throw_subquery_query
 new::relation_load_strategy::relation_load_strategy::test_find_first_subquery_join
-new::relation_load_strategy::relation_load_strategy::test_find_first_subquery_query
 new::relation_load_strategy::relation_load_strategy::test_find_many_subquery_join
-new::relation_load_strategy::relation_load_strategy::test_find_many_subquery_query
 new::relation_load_strategy::relation_load_strategy::test_find_unique_or_throw_subquery_join
-new::relation_load_strategy::relation_load_strategy::test_find_unique_or_throw_subquery_query
 new::relation_load_strategy::relation_load_strategy::test_find_unique_subquery_join
-new::relation_load_strategy::relation_load_strategy::test_find_unique_subquery_query
 new::relation_load_strategy::relation_load_strategy::test_update_subquery_join
 new::relation_load_strategy::relation_load_strategy::test_update_subquery_query
 new::relation_load_strategy::relation_load_strategy::test_upsert_subquery_join
 new::relation_load_strategy::relation_load_strategy::test_upsert_subquery_query
-queries::aggregation::avg::aggregation_avg::avg_some_records
-queries::aggregation::avg::aggregation_avg::avg_with_all_sorts_of_query_args
-queries::aggregation::avg::decimal_aggregation_avg::avg_some_records
-queries::aggregation::avg::decimal_aggregation_avg::avg_with_all_sorts_of_query_args
-queries::aggregation::combination_spec::combinations::some_records
-queries::aggregation::combination_spec::combinations::unstable_cursor
-queries::aggregation::combination_spec::combinations::with_query_args
-queries::aggregation::combination_spec::decimal_combinations::some_records
-queries::aggregation::combination_spec::decimal_combinations::with_query_args
-queries::aggregation::count::aggregation_count::count_nullable_fields
-queries::aggregation::count::aggregation_count::count_with_all_sorts_of_query_args
-queries::aggregation::group_by_having::aggr_group_by_having::basic_having_scalar_filter
-queries::aggregation::group_by_having::aggr_group_by_having::having_count_non_numerical_field
-queries::aggregation::group_by_having::aggr_group_by_having::having_count_scalar_filter
-queries::aggregation::group_by_having::aggr_group_by_having::having_max_scalar_filter
-queries::aggregation::group_by_having::aggr_group_by_having::having_min_scalar_filter
-queries::aggregation::group_by_having::aggr_group_by_having::having_sum_scalar_filter
-queries::aggregation::group_by_having::aggr_group_by_having::having_without_aggr_sel
-queries::aggregation::group_by_having::decimal_aggregation_group_by_having::having_avg_scalar_filter
-queries::aggregation::group_by_having::decimal_aggregation_group_by_having::having_max_scalar_filter
-queries::aggregation::group_by_having::decimal_aggregation_group_by_having::having_min_scalar_filter
-queries::aggregation::group_by_having::decimal_aggregation_group_by_having::having_sum_scalar_filter
-queries::aggregation::group_by::aggregation_group_by::group_by_multiple_ordering
-queries::aggregation::group_by::aggregation_group_by::group_by_ordering_aggr_and_having
-queries::aggregation::group_by::aggregation_group_by::group_by_ordering_aggr_multiple_fields
-queries::aggregation::group_by::aggregation_group_by::group_by_ordering_aggr_without_selecting
-queries::aggregation::group_by::aggregation_group_by::group_by_ordering_avg_aggregation
-queries::aggregation::group_by::aggregation_group_by::group_by_ordering_count_aggregation
-queries::aggregation::group_by::aggregation_group_by::group_by_ordering_max_aggregation
-queries::aggregation::group_by::aggregation_group_by::group_by_ordering_min_aggregation
 queries::aggregation::group_by::aggregation_group_by::group_by_ordering_sum_aggregation
-queries::aggregation::group_by::aggregation_group_by::group_by_relation_filters
-queries::aggregation::group_by::aggregation_group_by::group_by_rev_ordering
-queries::aggregation::group_by::aggregation_group_by::group_by_scalar_filters
-queries::aggregation::group_by::aggregation_group_by::group_by_some_records
-queries::aggregation::group_by::aggregation_group_by::group_by_take_skip
-queries::aggregation::many_count_relation::many_count_rel::count_m_n_self_rel
-queries::aggregation::many_count_relation::many_count_rel::count_one2m_compound_ids
-queries::aggregation::many_count_relation::many_count_rel::count_one2m_dup_child_id
-queries::aggregation::many_count_relation::many_count_rel::count_one2m_m2m
-queries::aggregation::many_count_relation::many_count_rel::count_with_cursor
-queries::aggregation::many_count_relation::many_count_rel::count_with_distinct
-queries::aggregation::many_count_relation::many_count_rel::count_with_filters
-queries::aggregation::many_count_relation::many_count_rel::count_with_skip
-queries::aggregation::many_count_relation::many_count_rel::count_with_take
-queries::aggregation::many_count_relation::many_count_rel::filtered_count_one2m_m2m
-queries::aggregation::many_count_relation::many_count_rel::nested_count_one2m_m2m
-queries::aggregation::many_count_relation::many_count_rel::nested_count_same_field_on_many_levels
-queries::aggregation::many_count_relation::many_count_rel::no_rel_records
-queries::aggregation::many_count_relation::many_count_rel::regression_nullable_count_libsql
-queries::aggregation::many_count_relation::many_count_rel::works_with_inmemory_args_processing
-queries::aggregation::max::aggregation_max::max_some_records
-queries::aggregation::max::aggregation_max::max_with_all_sorts_of_query_args
-queries::aggregation::max::decimal_aggregation_max::max_some_records
-queries::aggregation::max::decimal_aggregation_max::max_with_all_sorts_of_query_args
-queries::aggregation::min::aggregation_min::min_some_records
-queries::aggregation::min::aggregation_min::min_with_all_sorts_of_query_args
-queries::aggregation::min::decimal_aggregation_min::min_some_records
-queries::aggregation::min::decimal_aggregation_min::min_with_all_sorts_of_query_args
-queries::aggregation::sum::aggregation_sum::sum_some_records
-queries::aggregation::sum::aggregation_sum::sum_with_all_sorts_of_query_args
-queries::aggregation::sum::decimal_aggregation_sum::sum_some_records
-queries::aggregation::sum::decimal_aggregation_sum::sum_with_all_sorts_of_query_args
-queries::aggregation::uniq_count_relation::uniq_count_rel::count_one2m_m2m
-queries::aggregation::uniq_count_relation::uniq_count_rel::count_with_cursor
-queries::aggregation::uniq_count_relation::uniq_count_rel::count_with_distinct
-queries::aggregation::uniq_count_relation::uniq_count_rel::count_with_filters
-queries::aggregation::uniq_count_relation::uniq_count_rel::count_with_skip
-queries::aggregation::uniq_count_relation::uniq_count_rel::count_with_take
-queries::aggregation::uniq_count_relation::uniq_count_rel::nested_count_one2m_m2m
-queries::aggregation::uniq_count_relation::uniq_count_rel::no_rel_records
-queries::batching::select_different_key_types::bigint_in_schema::batch_of_two_distinct
-queries::batching::select_different_key_types::bigint_in_schema::batch_of_two_repeated
-queries::batching::select_different_key_types::datetime_in_schema::batch_of_two_distinct
-queries::batching::select_different_key_types::datetime_in_schema::batch_of_two_repeated
-queries::batching::select_different_key_types::decimal_in_schema::batch_of_two_distinct
-queries::batching::select_different_key_types::decimal_in_schema::batch_of_two_repeated
-queries::batching::select_different_key_types::float_in_schema::batch_of_two_distinct
-queries::batching::select_different_key_types::float_in_schema::batch_of_two_repeated
-queries::chunking::chunking::asc_in_ordering
-queries::chunking::chunking::desc_in_ordering
-queries::chunking::chunking::in_more_items
 queries::chunking::chunking::order_by_aggregation_should_fail
-queries::chunking::chunking::reproductions::issue_23743
-queries::chunking::chunking::reproductions::issue_23919
-queries::data_types::bigint::bigint::read_many
-queries::data_types::bigint::bigint::read_one
-queries::data_types::bool::bool::read_many
-queries::data_types::bool::bool::read_one
-queries::data_types::bytes::bytes::issue_687::common_types
-queries::data_types::bytes::bytes::read_many
-queries::data_types::bytes::bytes::read_one
-queries::data_types::datetime::datetime::read_many
-queries::data_types::datetime::datetime::read_one
-queries::data_types::decimal::decimal::read_many
-queries::data_types::decimal::decimal::read_one
-queries::data_types::enum_type::enum_type::read_many
-queries::data_types::enum_type::enum_type::read_one
-queries::data_types::float::float::read_many
-queries::data_types::float::float::read_one
-queries::data_types::int::int::read_many
-queries::data_types::int::int::read_one
-queries::data_types::json::json::dollar_type_in_json_protocol
-queries::data_types::json::json::json_null
-queries::data_types::json::json::json_null_must_not_be_confused_with_literal_string
-queries::data_types::json::json::nested_dollar_type_in_json_protocol
-queries::data_types::json::json::read_many
-queries::data_types::json::json::read_one
-queries::data_types::json::json::read_plain_bool
-queries::data_types::json::json::read_plain_float
-queries::data_types::json::json::read_plain_int
-queries::data_types::string::string::read_many
-queries::data_types::string::string::read_one
-queries::data_types::through_relation::scalar_relations::common_types
-queries::data_types::through_relation::scalar_relations::decimal_type
-queries::data_types::through_relation::scalar_relations::enum_type
-queries::data_types::through_relation::scalar_relations::json_type
-queries::distinct::distinct::nested_distinct
-queries::distinct::distinct::nested_distinct_not_in_selection
-queries::distinct::distinct::nested_distinct_order_by_field
-queries::distinct::distinct::nested_distinct_reversed
-queries::distinct::distinct::no_panic
-queries::distinct::distinct::shorthand_works
-queries::distinct::distinct::with_duplicates
-queries::distinct::distinct::with_skip_basic
-queries::distinct::distinct::with_skip_orderby
-queries::distinct::distinct::with_skip_orderby_nondistinct
-queries::filters::bigint_filter::bigint_filter_spec::basic_where
-queries::filters::bigint_filter::bigint_filter_spec::inclusion_filter
-queries::filters::bigint_filter::bigint_filter_spec::numeric_comparison_filters
-queries::filters::bigint_filter::bigint_filter_spec::where_shorthands
-queries::filters::decimal_filter::decimal_filter_spec::basic_where
-queries::filters::decimal_filter::decimal_filter_spec::inclusion_filter
-queries::filters::decimal_filter::decimal_filter_spec::numeric_comparison_filters
-queries::filters::decimal_filter::decimal_filter_spec::where_shorthands
-queries::filters::extended_relation_filters::ext_rel_filters::basic_scalar_filter
-queries::filters::extended_relation_filters::ext_rel_filters::empty_none
-queries::filters::extended_relation_filters::ext_rel_filters::empty_some
 queries::filters::extended_relation_filters::ext_rel_filters::rel_filter_l1_depth1
 queries::filters::extended_relation_filters::ext_rel_filters::rel_filter_l2_all_filters
 queries::filters::extended_relation_filters::ext_rel_filters::rel_filter_l2_explicit_and_every
@@ -294,403 +87,46 @@ queries::filters::extended_relation_filters::ext_rel_filters::rel_filter_l2_impl
 queries::filters::extended_relation_filters::ext_rel_filters::rel_filter_l2_some_some
 queries::filters::extended_relation_filters::ext_rel_filters::rel_filter_l3
 queries::filters::extended_relation_filters::ext_rel_filters::rel_scalar_filter
-queries::filters::field_reference::bigint_filter::bigint_filter::basic_where
-queries::filters::field_reference::bigint_filter::bigint_filter::numeric_comparison_filters
-queries::filters::field_reference::bytes_filter::bytes_filter::basic_where
-queries::filters::field_reference::datetime_filter::datetime_filter::basic_where
-queries::filters::field_reference::datetime_filter::datetime_filter::numeric_comparison_filters
-queries::filters::field_reference::decimal_filter::decimal_filter::basic_where
-queries::filters::field_reference::decimal_filter::decimal_filter::numeric_comparison_filters
-queries::filters::field_reference::float_filter::float_filter::basic_where
-queries::filters::field_reference::float_filter::float_filter::numeric_comparison_filters
-queries::filters::field_reference::having_filter::having_filter::basic_having_filter
-queries::filters::field_reference::int_filter::int_filter::basic_where
-queries::filters::field_reference::int_filter::int_filter::numeric_comparison_filters
-queries::filters::field_reference::json_filter::json_filter::array_comparison_filters
-queries::filters::field_reference::json_filter::json_filter::basic_where
-queries::filters::field_reference::json_filter::json_filter::does_not_strip_nulls_in_json
-queries::filters::field_reference::json_filter::json_filter::string_comparison_filters
-queries::filters::field_reference::relation_filter::relation_filter::complex_relation_traversal
-queries::filters::field_reference::relation_filter::relation_filter::many_to_many
-queries::filters::field_reference::relation_filter::relation_filter::one_to_many
-queries::filters::field_reference::relation_filter::relation_filter::one_to_one
-queries::filters::field_reference::string_filter::string_filter::basic_where_sensitive
-queries::filters::field_reference::string_filter::string_filter::numeric_comparison_filters_sensitive
-queries::filters::field_reference::string_filter::string_filter::string_comparison_filters_sensitive
-queries::filters::filter_regression::fr_compound_one_to_m::work_with_nulls
-queries::filters::filter_regression::fr_m_to_n::work_with_nulls
-queries::filters::filter_regression::fr_one_to_m::work_with_nulls
 queries::filters::filter_unwrap::filter_unwrap::many_filter
-queries::filters::filters::filter_spec::and
-queries::filters::filters::filter_spec::contains
-queries::filters::filters::filter_spec::empty_and
-queries::filters::filters::filter_spec::empty_not
-queries::filters::filters::filter_spec::empty_or
-queries::filters::filters::filter_spec::greater_than
-queries::filters::filters::filter_spec::implicit_equals
-queries::filters::filters::filter_spec::implicit_equals_null
-queries::filters::filters::filter_spec::implicit_not_equals
-queries::filters::filters::filter_spec::in_list
-queries::filters::filters::filter_spec::in_null
-queries::filters::filters::filter_spec::inverted_null
-queries::filters::filters::filter_spec::inverted_null_required
-queries::filters::filters::filter_spec::inverted_simple
 queries::filters::filters::filter_spec::nested_filter
-queries::filters::filters::filter_spec::no_filter
-queries::filters::filters::filter_spec::not
-queries::filters::filters::filter_spec::not_in_list
-queries::filters::filters::filter_spec::not_in_null
-queries::filters::filters::filter_spec::not_list
-queries::filters::filters::filter_spec::not_not
-queries::filters::filters::filter_spec::or
-queries::filters::filters::filter_spec::relation_null
-queries::filters::filters::filter_spec::simple
-queries::filters::filters::filter_spec::starts_with
-queries::filters::json_filters::json_filters::array_contains
-queries::filters::json_filters::json_filters::array_ends_with
-queries::filters::json_filters::json_filters::array_starts_with
-queries::filters::json_filters::json_filters::string_contains
-queries::filters::json_filters::json_filters::string_ends_with
-queries::filters::json_filters::json_filters::string_starts_with
-queries::filters::json::json::basic
-queries::filters::json::json::basic_not_null_eq
-queries::filters::json::json::basic_null_eq
-queries::filters::json::json::basic_null_eq_defaults
-queries::filters::json::json::req_json_null_filters
-queries::filters::many_relation::many_relation::crazy_filters
 queries::filters::many_relation::many_relation::l1_1_rel
 queries::filters::many_relation::many_relation::l1_m_rel_every
 queries::filters::many_relation::many_relation::l1_m_rel_none
 queries::filters::many_relation::many_relation::l1_m_rel_some
-queries::filters::many_relation::many_relation::l2_m_1_rel_all
 queries::filters::many_relation::many_relation::l2_m_rel_all
 queries::filters::many_relation::many_relation::l2_m_rel_some_some
 queries::filters::many_relation::many_relation::m2m_join_relation_1level
-queries::filters::many_relation::many_relation::nested_some_filter_m2m_different_pk
-queries::filters::many_relation::many_relation::prisma_23742
-queries::filters::many_relation::many_relation::prisma_25103
 queries::filters::many_relation::many_relation::simple_scalar_filter
-queries::filters::one_relation::one_relation::basic_scalar
 queries::filters::one_relation::one_relation::crazy_filters
 queries::filters::one_relation::one_relation::l1_one_rel
 queries::filters::one_relation::one_relation::l1_one_rel_shorthands
 queries::filters::one_relation::one_relation::l2_one_rel
 queries::filters::one_relation::one_relation::nested_to_one_filter
 queries::filters::one_relation::one_relation::one2one_join_relation_1level
-queries::filters::one_relation::one_relation::repro_21356
-queries::filters::one_relation::one_relation::repro_21366
 queries::filters::one2one_regression::one2one_regression::work_with_nulls
-queries::filters::ported_filters::ported::bool_eq
-queries::filters::ported_filters::ported::bool_not_eq
-queries::filters::ported_filters::ported::dt_eq
-queries::filters::ported_filters::ported::dt_gt
-queries::filters::ported_filters::ported::dt_gte
-queries::filters::ported_filters::ported::dt_in
-queries::filters::ported_filters::ported::dt_lt
-queries::filters::ported_filters::ported::dt_lte
-queries::filters::ported_filters::ported::dt_not_eq
-queries::filters::ported_filters::ported::dt_not_in
-queries::filters::ported_filters::ported::enum_eq
-queries::filters::ported_filters::ported::enum_in
-queries::filters::ported_filters::ported::enum_not_eq
-queries::filters::ported_filters::ported::enum_not_in
-queries::filters::ported_filters::ported::filter_null
-queries::filters::ported_filters::ported::float_eq
-queries::filters::ported_filters::ported::float_gt
-queries::filters::ported_filters::ported::float_gte
-queries::filters::ported_filters::ported::float_in
-queries::filters::ported_filters::ported::float_lt
-queries::filters::ported_filters::ported::float_lte
-queries::filters::ported_filters::ported::float_not_eq
-queries::filters::ported_filters::ported::float_not_in
-queries::filters::ported_filters::ported::int_eq
-queries::filters::ported_filters::ported::int_gt
-queries::filters::ported_filters::ported::int_gte
-queries::filters::ported_filters::ported::int_in
-queries::filters::ported_filters::ported::int_lt
-queries::filters::ported_filters::ported::int_lte
-queries::filters::ported_filters::ported::int_not_eq
-queries::filters::ported_filters::ported::int_not_in
-queries::filters::ported_filters::ported::l1_and
-queries::filters::ported_filters::ported::l1_or
-queries::filters::ported_filters::ported::l2_and
-queries::filters::ported_filters::ported::l2_or
-queries::filters::ported_filters::ported::not_alias_equal
-queries::filters::ported_filters::ported::str_contains
-queries::filters::ported_filters::ported::str_ends_with
-queries::filters::ported_filters::ported::str_eq
-queries::filters::ported_filters::ported::str_gt
-queries::filters::ported_filters::ported::str_gte
-queries::filters::ported_filters::ported::str_in
-queries::filters::ported_filters::ported::str_lt
-queries::filters::ported_filters::ported::str_lte
-queries::filters::ported_filters::ported::str_not_contains
-queries::filters::ported_filters::ported::str_not_ends_with
-queries::filters::ported_filters::ported::str_not_eq
-queries::filters::ported_filters::ported::str_not_in
-queries::filters::ported_filters::ported::str_not_starts_with
-queries::filters::ported_filters::ported::str_starts_with
 queries::filters::relation_null::relation_is_null::is_null
-queries::filters::search_filter::search_filter_with_index::ensure_filter_tree_shake_works
-queries::filters::search_filter::search_filter_with_index::search_many_fields
-queries::filters::search_filter::search_filter_with_index::search_many_fields_not
-queries::filters::search_filter::search_filter_with_index::search_nullable_field
-queries::filters::search_filter::search_filter_with_index::search_single_field
-queries::filters::search_filter::search_filter_with_index::search_with_other_filters
 queries::filters::search_filter::search_filter_with_index::throws_error_on_missing_index
 queries::filters::self_relation_regression::sr_regression::all_categories
 queries::filters::self_relation_regression::sr_regression::inverted_subcat
-queries::filters::self_relation_regression::sr_regression::root_categories
 queries::filters::self_relation_regression::sr_regression::subcat_scalar
-queries::filters::self_relation::self_relation_filters::l1_query
-queries::filters::self_relation::self_relation_filters::l2_one2one
-queries::filters::self_relation::self_relation_filters::l2_query
-queries::filters::self_relation::self_relation_filters::many2many_empty_every
-queries::filters::self_relation::self_relation_filters::many2many_empty_none
-queries::filters::self_relation::self_relation_filters::many2many_empty_some
-queries::filters::self_relation::self_relation_filters::many2many_every
-queries::filters::self_relation::self_relation_filters::many2many_none
-queries::filters::self_relation::self_relation_filters::many2many_null_error
-queries::filters::self_relation::self_relation_filters::many2many_some
-queries::filters::self_relation::self_relation_filters::many2one
-queries::filters::self_relation::self_relation_filters::many2one_empty_filter
-queries::filters::self_relation::self_relation_filters::many2one_null_filter
-queries::filters::self_relation::self_relation_filters::one2many_empty
-queries::filters::self_relation::self_relation_filters::one2one_empty
-queries::filters::self_relation::self_relation_filters::one2one_null
-queries::filters::self_relation::self_relation_filters::one2one_null_fail
-queries::filters::where_unique::where_unique::implicit_unique_and
-queries::filters::where_unique::where_unique::one_unique_field
-queries::filters::where_unique::where_unique::where_unique_works_if_unique
-queries::order_and_pagination::nested_multi_order_pagination::paging_one2m_stable_order::cursor_child_3
-queries::order_and_pagination::nested_multi_order_pagination::paging_one2m_stable_order::take_first_child_each_parent
-queries::order_and_pagination::nested_multi_order_pagination::paging_one2m_stable_order::take_last_child_each_parent
-queries::order_and_pagination::nested_multi_order_pagination::paging_one2m_unstable_order::cursor_child_3
-queries::order_and_pagination::nested_multi_order_pagination::paging_one2m_unstable_order::take_first_child_each_parent
-queries::order_and_pagination::nested_multi_order_pagination::paging_one2m_unstable_order::take_last_child_each_parent
-queries::order_and_pagination::nested_pagination::nested_pagination::all_data_there
-queries::order_and_pagination::nested_pagination::nested_pagination::bottom_lvl_skip_0
-queries::order_and_pagination::nested_pagination::nested_pagination::bottom_lvl_skip_1
-queries::order_and_pagination::nested_pagination::nested_pagination::bottom_lvl_skip_3
-queries::order_and_pagination::nested_pagination::nested_pagination::bottom_lvl_skip_4
-queries::order_and_pagination::nested_pagination::nested_pagination::bottom_lvl_take_0
-queries::order_and_pagination::nested_pagination::nested_pagination::bottom_lvl_take_1
-queries::order_and_pagination::nested_pagination::nested_pagination::bottom_lvl_take_3
-queries::order_and_pagination::nested_pagination::nested_pagination::bottom_lvl_take_4
-queries::order_and_pagination::nested_pagination::nested_pagination::bottom_lvl_take_minus_1
-queries::order_and_pagination::nested_pagination::nested_pagination::bottom_lvl_take_minus_3
-queries::order_and_pagination::nested_pagination::nested_pagination::bottom_lvl_take_minus_4
-queries::order_and_pagination::nested_pagination::nested_pagination::m2m_many_children_nested_cursor
-queries::order_and_pagination::nested_pagination::nested_pagination::m2m_many_children_nested_cursor_skip_take
-queries::order_and_pagination::nested_pagination::nested_pagination::m2m_many_children_nested_skip_take
-queries::order_and_pagination::nested_pagination::nested_pagination::mid_lvl_cursor
-queries::order_and_pagination::nested_pagination::nested_pagination::mid_lvl_order_by_take_3
-queries::order_and_pagination::nested_pagination::nested_pagination::mid_lvl_skip_1
-queries::order_and_pagination::nested_pagination::nested_pagination::mid_lvl_skip_1_take_1
-queries::order_and_pagination::nested_pagination::nested_pagination::mid_lvl_skip_1_take_3
-queries::order_and_pagination::nested_pagination::nested_pagination::mid_lvl_skip_1_take_minus_1
-queries::order_and_pagination::nested_pagination::nested_pagination::mid_lvl_skip_1_take_minus_3
-queries::order_and_pagination::nested_pagination::nested_pagination::mid_lvl_skip_3
-queries::order_and_pagination::nested_pagination::nested_pagination::mid_lvl_skip_4
-queries::order_and_pagination::nested_pagination::nested_pagination::mid_lvl_take_0
-queries::order_and_pagination::nested_pagination::nested_pagination::mid_lvl_take_1
-queries::order_and_pagination::nested_pagination::nested_pagination::mid_lvl_take_3
-queries::order_and_pagination::nested_pagination::nested_pagination::mid_lvl_take_4
-queries::order_and_pagination::nested_pagination::nested_pagination::mid_lvl_take_minus_1
-queries::order_and_pagination::nested_pagination::nested_pagination::mid_lvl_take_minus_3
-queries::order_and_pagination::nested_pagination::nested_pagination::mid_lvl_take_minus_4
-queries::order_and_pagination::nested_pagination::nested_pagination::mid_order_by_take_1
-queries::order_and_pagination::nested_pagination::nested_pagination::top_lvl_skip_1_take_1
-queries::order_and_pagination::nested_pagination::nested_pagination::top_lvl_skip_1_take_3
-queries::order_and_pagination::nested_pagination::nested_pagination::top_lvl_skip_1_take_minus_3
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::count_m2m_records_not_connected
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::cursor_m2m_count_asc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::cursor_m2m_count_asc_field_desc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::cursor_m2m_count_asc_m2one2m_count_desc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::cursor_m2m_count_desc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::cursor_m2one_field_asc_m2one2m_count_desc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::cursor_m2one2m_count_asc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::cursor_m2one2m_count_desc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::cursor_m2one2one2m_count_desc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::cursor_one2m_count_asc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::cursor_one2m_count_asc_field_asc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::cursor_one2m_count_asc_field_desc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::cursor_one2m_count_desc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::cursor_one2m_field_asc_m2m_count_desc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::m2m_count_asc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::m2m_count_asc_field_desc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::m2m_count_asc_m2one2m_count_desc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::m2m_count_desc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::m2one_field_asc_m2one2m_count_desc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::m2one2m_count_asc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::m2one2m_count_desc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::m2one2one2m_count_asc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::m2one2one2m_count_desc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::nested_m2m_count
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::nested_one2m_count
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::one2m_count_asc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::one2m_count_asc_field_asc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::one2m_count_asc_field_desc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::one2m_count_desc
-queries::order_and_pagination::order_by_aggregation::order_by_aggr::one2m_field_asc_m2m_count_desc
-queries::order_and_pagination::order_by_dependent_pagination::order_by_dependent_pag::circular_diff_related_record_asc
-queries::order_and_pagination::order_by_dependent_pagination::order_by_dependent_pag::circular_diff_related_record_desc
 queries::order_and_pagination::order_by_dependent_pagination::order_by_dependent_pag::circular_related_record_asc
 queries::order_and_pagination::order_by_dependent_pagination::order_by_dependent_pag::circular_related_record_desc
-queries::order_and_pagination::order_by_dependent_pagination::order_by_dependent_pag::hop_1_related_record_asc
-queries::order_and_pagination::order_by_dependent_pagination::order_by_dependent_pag::hop_1_related_record_asc_nulls
-queries::order_and_pagination::order_by_dependent_pagination::order_by_dependent_pag::hop_1_related_record_desc
-queries::order_and_pagination::order_by_dependent_pagination::order_by_dependent_pag::hop_2_related_record_asc
-queries::order_and_pagination::order_by_dependent_pagination::order_by_dependent_pag::hop_2_related_record_asc_null
-queries::order_and_pagination::order_by_dependent_pagination::order_by_dependent_pag::hop_2_related_record_desc
-queries::order_and_pagination::order_by_dependent_pagination::order_by_dependent_pag::multiple_rel_same_model_order_by
-queries::order_and_pagination::order_by_dependent::order_by_dependent::circular_diff_related_record_asc
-queries::order_and_pagination::order_by_dependent::order_by_dependent::circular_diff_related_record_desc
 queries::order_and_pagination::order_by_dependent::order_by_dependent::circular_related_record_asc
 queries::order_and_pagination::order_by_dependent::order_by_dependent::circular_related_record_desc
-queries::order_and_pagination::order_by_dependent::order_by_dependent::hop_1_related_record_asc
-queries::order_and_pagination::order_by_dependent::order_by_dependent::hop_1_related_record_asc_nulls
-queries::order_and_pagination::order_by_dependent::order_by_dependent::hop_1_related_record_desc
-queries::order_and_pagination::order_by_dependent::order_by_dependent::hop_2_related_record_asc
-queries::order_and_pagination::order_by_dependent::order_by_dependent::hop_2_related_record_asc_null
-queries::order_and_pagination::order_by_dependent::order_by_dependent::hop_2_related_record_desc
-queries::order_and_pagination::order_by_dependent::order_by_dependent::hop_2_simple_order_by_rel
-queries::order_and_pagination::order_by_dependent::order_by_dependent::multiple_rel_same_model_order_by
-queries::order_and_pagination::order_by_dependent::order_by_dependent::self_relation_works
-queries::order_and_pagination::order_by_dependent::order_by_dependent::simple_order_by_rel
-queries::order_and_pagination::order_by_mutation::order_by_mutation::order_by_not_selected
-queries::order_and_pagination::order_by_nulls::order_by_nulls::nulls_first_cursor
-queries::order_and_pagination::order_by_nulls::order_by_nulls::nulls_last_cursor
-queries::order_and_pagination::order_by_nulls::order_by_nulls::ordering_by_nulls_should_be_optional
-queries::order_and_pagination::order_by_nulls::order_by_nulls::simple_nulls_first
-queries::order_and_pagination::order_by_nulls::order_by_nulls::simple_nulls_last
-queries::order_and_pagination::order_by_nulls::order_by_nulls::two_fields_nulls_first
-queries::order_and_pagination::order_by_nulls::order_by_nulls::two_fields_nulls_last
-queries::order_and_pagination::order_by_relevance::order_by_relevance_with_index::many_order_by_stmts
-queries::order_and_pagination::order_by_relevance::order_by_relevance_with_index::on_1m_relation_field
-queries::order_and_pagination::order_by_relevance::order_by_relevance_with_index::on_many_fields
-queries::order_and_pagination::order_by_relevance::order_by_relevance_with_index::on_many_fields_aggr_pagination
-queries::order_and_pagination::order_by_relevance::order_by_relevance_with_index::on_many_fields_some_nullable
-queries::order_and_pagination::order_by_relevance::order_by_relevance_with_index::on_many_fields_with_pagination
-queries::order_and_pagination::order_by_relevance::order_by_relevance_with_index::on_single_field
-queries::order_and_pagination::order_by_relevance::order_by_relevance_with_index::on_single_field_with_pagination
-queries::order_and_pagination::order_by_relevance::order_by_relevance_with_index::on_single_nullable_field
-queries::order_and_pagination::order_by_relevance::order_by_relevance_with_index::on_single_nullable_with_pagination
-queries::order_and_pagination::order_by_relevance::order_by_relevance_with_index::on_unknown_field
-queries::order_and_pagination::order_by::basic_order_by::empty_order_objects
-queries::order_and_pagination::order_by::basic_order_by::multiple_fields_basic
-queries::order_and_pagination::order_by::basic_order_by::multiple_fields_ordering
-queries::order_and_pagination::order_by::basic_order_by::negative_cursor
-queries::order_and_pagination::order_by::basic_order_by::unique_asc
-queries::order_and_pagination::order_by::basic_order_by::unique_desc
-queries::order_and_pagination::pagination::pagination::cursor_first_record_take_minus_2
-queries::order_and_pagination::pagination::pagination::cursor_id_end_of_records
-queries::order_and_pagination::pagination::pagination::cursor_id_first_record_reverse_order
-queries::order_and_pagination::pagination::pagination::cursor_id_non_existing_cursor
-queries::order_and_pagination::pagination::pagination::cursor_id_order_asc_non_uniq
-queries::order_and_pagination::pagination::pagination::cursor_id_order_desc_non_uniq
-queries::order_and_pagination::pagination::pagination::cursor_id_ordering
-queries::order_and_pagination::pagination::pagination::cursor_last_record_take_2
-queries::order_and_pagination::pagination::pagination::cursor_on_id
-queries::order_and_pagination::pagination::pagination::cursor_on_unique
-queries::order_and_pagination::pagination::pagination::cursor_take_0
-queries::order_and_pagination::pagination::pagination::cursor_take_0_skip_1
-queries::order_and_pagination::pagination::pagination::cursor_take_2
-queries::order_and_pagination::pagination::pagination::cursor_take_2_reverse_order
-queries::order_and_pagination::pagination::pagination::cursor_take_2_skip_2
-queries::order_and_pagination::pagination::pagination::cursor_take_2_skip_2_reverse_order
-queries::order_and_pagination::pagination::pagination::cursor_take_minus_2
-queries::order_and_pagination::pagination::pagination::cursor_take_minus_2_reverse_order
-queries::order_and_pagination::pagination::pagination::cursor_take_minus_2_skip_2
-queries::order_and_pagination::pagination::pagination::cursor_take_minus_2_skip_2_rev_order
-queries::order_and_pagination::pagination::pagination::cursor_take_skip_multiple_stable_order
-queries::order_and_pagination::pagination::pagination::cursor_take_skip_multiple_unstable_order
-queries::order_and_pagination::pagination::pagination::skip_0_records
-queries::order_and_pagination::pagination::pagination::skip_returns_all_after_offset
-queries::order_and_pagination::pagination::pagination::skip_reversed_order
-queries::order_and_pagination::pagination::pagination::skip_to_end_with_take
-queries::order_and_pagination::pagination::pagination::skipping_beyond_all_records
-queries::order_and_pagination::pagination::pagination::take_0
-queries::order_and_pagination::pagination::pagination::take_1
-queries::order_and_pagination::pagination::pagination::take_1_reverse_order
-queries::order_and_pagination::pagination::pagination::take_minus_1_without_cursor
-queries::order_and_pagination::relation_filter_ordering::rel_filter_ordering::rel_filters
-queries::regressions::non_uniq_index::non_uniq_index::non_uniq_indices
-queries::regressions::pagination_regression::pagination_regr::prisma_2855
-queries::regressions::pagination_regression::pagination_regr::prisma_3505_case_1
-queries::regressions::pagination_regression::pagination_regr::prisma_3505_case_2
 queries::regressions::prisma_3078::prisma_3078::relation_filter_1_1_a
 queries::regressions::prisma_3078::prisma_3078::relation_filter_1_1_z
-queries::regressions::prisma_3078::prisma_3078::relation_filter_1_m_a
 queries::regressions::prisma_3078::prisma_3078::relation_filter_1_m_z
 queries::regressions::prisma_3078::prisma_3078::relation_filter_n_m_a
 queries::regressions::prisma_3078::prisma_3078::relation_filter_n_m_z
-queries::regressions::prisma_4088::prisma_4088::find_many_and_cond_no_filter
-queries::regressions::prisma_4088::prisma_4088::find_many_and_cond_one_filter
-queries::regressions::prisma_4088::prisma_4088::find_many_and_cond_two_filters
-queries::regressions::prisma_4088::prisma_4088::find_many_not_cond_no_filter
-queries::regressions::prisma_4088::prisma_4088::find_many_not_cond_one_filter
-queries::regressions::prisma_4088::prisma_4088::find_many_not_cond_two_filters
-queries::regressions::prisma_4088::prisma_4088::find_many_or_cond_no_filter
-queries::regressions::prisma_4088::prisma_4088::find_many_or_cond_one_filter
-queries::regressions::prisma_4088::prisma_4088::find_many_or_cond_two_filters
 queries::regressions::prisma_4146::prisma_4146::update_list_fields_connect_bound
-queries::regressions::prisma_5941::regression::input_dates_no_nulls
-queries::regressions::prisma_5941::regression::input_dates_no_nulls_find_different_uniques
-queries::regressions::prisma_933::prisma_933_spec::prisma_933
-queries::relations::duplicate_col_regression::dup_col_regr::test_1
-queries::relations::inline_relation::inline_rel::scalar_field_back_relation
-queries::relations::related_null_queries::inline_relation::multi_field_1n_rel_with_nulls
-queries::relations::related_null_queries::inline_relation::single_field_1_1_rel_inline_child
-queries::relations::related_null_queries::inline_relation::single_field_1_1_rel_inline_parent
-queries::relations::related_null_queries::inline_relation::single_field_1n_rel_with_nulls
-queries::simple::find_first_or_throw::find_first_or_throw_query::find_first_or_throw_matching
-queries::simple::find_first_or_throw::find_first_or_throw_query::find_first_or_throw_not_matching
-queries::simple::find_first::find_first_query::find_first_matching
-queries::simple::find_first::find_first_query::find_first_not_matching
-queries::simple::find_many::find_many::return_all
-queries::simple::find_unique_or_throw::find_unique_or_throw::find_unique_or_throw_when_record_is_found
-queries::simple::find_unique_or_throw::find_unique_or_throw::no_result_find_unique_by_id
-queries::simple::find_unique_or_throw::find_unique_or_throw::no_result_find_unique_by_multi_unique
-queries::simple::find_unique_or_throw::find_unique_or_throw::no_result_find_unique_by_single_unique
-queries::simple::find_unique::find_unique::find_unique_by_id
-queries::simple::find_unique::find_unique::find_unique_by_multi_unique
-queries::simple::find_unique::find_unique::find_unique_by_single_unique
-queries::simple::find_unique::find_unique::no_result_find_unique_by_id
-queries::simple::find_unique::find_unique::no_result_find_unique_by_multi_unique
-queries::simple::find_unique::find_unique::no_result_find_unique_by_single_unique
-queries::simple::json_result::json_as_result::test_when_distinct_result_is_json
-queries::simple::m2m::m2m::basic_pagination
-queries::simple::m2m::m2m::fetch_only_associated
-queries::simple::m2m::m2m::filtering_ordering
-queries::simple::m2m::m2m::m2m_sharing_same_row
-queries::simple::multi_field_unique::multi_field_unique::aliased_index
-queries::simple::multi_field_unique::multi_field_unique::simple
-queries::simple::multi_field_unique::multi_field_unique::single_field_multi_unique
-queries::simple::one2m::nested::vanilla
-queries::simple::one2m::simple::simple
 writes::data_types::bigint::bigint::using_bigint_field
 writes::data_types::bytes::bytes::using_bytes_field
-writes::data_types::datetime::created_at::created_at::created_at_should_stay_consistent
-writes::data_types::datetime::datetime::datetime::before_1970
-writes::data_types::datetime::datetime::datetime::date_after_1970
-writes::data_types::datetime::datetime::datetime::ms_in_date_after_1970
-writes::data_types::datetime::datetime::datetime::ms_in_date_before_1970
 writes::data_types::datetime::non_embed_updated_at_should_change::non_embed_updated_at::update_nested_item
-writes::data_types::datetime::non_embed_updated_at_should_change::non_embed_updated_at::upsert_nested_item
 writes::data_types::datetime::where_and_datetime::where_and_datetime::test_1
 writes::data_types::datetime::where_and_datetime::where_and_datetime::test_2
 writes::data_types::datetime::where_and_update::where_and_update::update_unique_val
-writes::data_types::decimal::decimal::using_decimal_as_id
 writes::data_types::decimal::decimal::using_decimal_field
 writes::data_types::native_types::mysql::mysql::native_decimal_vitess_precision
-writes::filters::delete_many_rel_filter::delete_many_rel_filter::delete_all_items_if_filter_empty
-writes::filters::delete_many_rel_filter::delete_many_rel_filter::delete_items_matching_where_rel_filter
-writes::filters::delete_many_rel_filter::delete_many_rel_filter::works_with_deeply_nested_filters
-writes::filters::update_many_rel_filter::update_many_rel_filter::update_all_items_if_filter_empty
-writes::filters::update_many_rel_filter::update_many_rel_filter::update_items_matching_where_rel_filter
-writes::filters::update_many_rel_filter::update_many_rel_filter::works_with_deeply_nested_filters
-writes::ids::auto_inc_create::auto_inc_create::non_primary_key_autoinc_uniq_idx
 writes::ids::byoid::byoid::create_and_return_item_woi_1
 writes::ids::byoid::byoid::create_and_return_item_woi_2
 writes::ids::byoid::byoid::id_field_custom_name_should_work
@@ -700,9 +136,6 @@ writes::ids::byoid::byoid::nested_upsert_should_work_1
 writes::ids::byoid::byoid::nested_upsert_should_work_2
 writes::ids::byoid::byoid::upsert_should_work_1
 writes::ids::byoid::byoid::upsert_should_work_2
-writes::ids::int_id_create::int_id_create::create_id_int_static_default
-writes::ids::int_id_create::int_id_create::create_id_int_with_autoinc
-writes::ids::int_id_create::int_id_create::create_id_int_without_default
 writes::ids::int_id_update::int_id_update::update_id_int_autoinc
 writes::ids::int_id_update::int_id_update::update_id_int_static_default
 writes::ids::int_id_update::int_id_update::update_id_int_without_default
@@ -717,14 +150,12 @@ writes::ids::relation_pks::single_pk_rel_field::single_pk_rel_field::id_also_1_1
 writes::ids::relation_pks::single_pk_rel_field::single_pk_rel_field::id_also_1_1_single_field_rel
 writes::ids::relation_pks::single_pk_rel_field::single_pk_rel_field::id_also_1_m_multi_field_rel
 writes::ids::relation_pks::single_pk_rel_field::single_pk_rel_field::id_also_1_m_single_field_rel
-writes::ids::required_own_id::required_own_id::create_mut_return_item
 writes::ids::upsert_uuid::upsert_uuid::upsert_id_uuid_should_work
 writes::ids::uuid_create_graphql::uuid_create_graphql::create_cuid_v1_and_retrieve_it_should_work
 writes::ids::uuid_create_graphql::uuid_create_graphql::create_cuid_v2_and_retrieve_it_should_work
 writes::ids::uuid_create_graphql::uuid_create_graphql::create_ulid_and_retrieve_it_should_work
 writes::ids::uuid_create_graphql::uuid_create_graphql::create_uuid_id_should_work
 writes::ids::uuid_create_graphql::uuid_create_graphql::create_uuid_v7_and_retrieve_it_should_work
-writes::ids::uuid_create_graphql::uuid_create_graphql::fetch_null_uuid_should_work
 writes::nested_mutations::already_converted::nested_connect_inside_create::connect_inside_create::p1_c1_connect_by_id
 writes::nested_mutations::already_converted::nested_connect_inside_create::connect_inside_create::p1_c1_connect_by_id_already_in_rel
 writes::nested_mutations::already_converted::nested_connect_inside_create::connect_inside_create::p1_c1_connect_by_id_and_filters
@@ -737,7 +168,6 @@ writes::nested_mutations::already_converted::nested_connect_inside_create::conne
 writes::nested_mutations::already_converted::nested_connect_inside_create::connect_inside_create::p1_to_cm_no_rel_connect_by_uniq
 writes::nested_mutations::already_converted::nested_connect_inside_create::connect_inside_create::pm_to_c1_by_uniq_and_filters
 writes::nested_mutations::already_converted::nested_connect_inside_create::connect_inside_create::pm_to_c1_connect_by_uniq
-writes::nested_mutations::already_converted::nested_connect_inside_create::connect_inside_create::pm_to_c1_fail_if_wrong_id
 writes::nested_mutations::already_converted::nested_connect_inside_create::connect_inside_create::pm_to_c1_rel_fail_connect_no_node
 writes::nested_mutations::already_converted::nested_connect_inside_create::connect_inside_create::pm_to_c1_rel_fail_filter_dont_match
 writes::nested_mutations::already_converted::nested_connect_inside_create::connect_inside_create::pm_to_c1_req_connect_by_uniq
@@ -892,13 +322,8 @@ writes::nested_mutations::not_using_schema_base::nested_connect_or_create::conne
 writes::nested_mutations::not_using_schema_base::nested_connect_or_create::connect_or_create::one2one_update_if_no_child_connected_yet
 writes::nested_mutations::not_using_schema_base::nested_connect_or_create::connect_or_create::one2one_upsert_if_no_child_connected_yet
 writes::nested_mutations::not_using_schema_base::nested_connect_or_create::connect_or_create::query_reordering_works
-writes::nested_mutations::not_using_schema_base::nested_create_many::nested_create_many::allow_create_large_number_records
-writes::nested_mutations::not_using_schema_base::nested_create_many::nested_create_many::create_many_on_create
-writes::nested_mutations::not_using_schema_base::nested_create_many::nested_create_many::create_many_shorthand_on_create
 writes::nested_mutations::not_using_schema_base::nested_create_many::nested_create_many::nested_createmany_fail_dups
-writes::nested_mutations::not_using_schema_base::nested_create_many::nested_create_many::no_error_on_dups_when_skip_dups
 writes::nested_mutations::not_using_schema_base::nested_update_inside_update::update_inside_update::deep_nested_mutation_exec_all_muts
-writes::nested_mutations::not_using_schema_base::nested_update_inside_update::update_inside_update::m2m_reject_null_in_uniq
 writes::nested_mutations::not_using_schema_base::nested_update_inside_update::update_inside_update::no_tx_m2m_fail_gracefully
 writes::nested_mutations::not_using_schema_base::nested_update_inside_update::update_inside_update::p1_cm_by_id_and_filters_should_work
 writes::nested_mutations::not_using_schema_base::nested_update_inside_update::update_inside_update::p1_cm_error_if_filter_not_match
@@ -914,84 +339,18 @@ writes::nested_mutations::not_using_schema_base::nested_update_inside_update::up
 writes::nested_mutations::not_using_schema_base::nested_update_inside_update::update_inside_update::pm_cm_should_work
 writes::nested_mutations::not_using_schema_base::nested_update_inside_update::update_inside_update::tx_m2m_fail_wrong_where
 writes::regressions::graph_reorder_regression::graph_reorder::test
-writes::regressions::if_node_siblig_dep_regression::if_node_sibling::test
 writes::regressions::prisma_11731::connect_or_create::one2one_inlined_child
 writes::regressions::prisma_11731::connect_or_create::one2one_inlined_parent
-writes::regressions::prisma_12105::validate::check
 writes::relations::compound_fks_mixed_requiredness::compound_fks::one2m_mix_required_writable_readable
 writes::relations::deeply_nested_self_rel::deep_nested_rel::deep_nested_create_should_work
-writes::relations::optional_rel::opt_rel::update_opt_rel_with_null_should_fail
-writes::relations::rel_defaults::rel_defaults::no_val_for_required_relation
-writes::relations::rel_defaults::rel_defaults::no_val_required_rel_default_vals
-writes::relations::rel_defaults::rel_defaults::no_val_required_rel_multiple_fields
-writes::relations::rel_defaults::rel_defaults::no_val_required_rel_one_default_val
-writes::relations::rel_design::rel_design::delete_child_node
-writes::relations::rel_design::rel_design::delete_parent_model
 writes::relations::rel_graphql::rel_graphql::one2one_rel_allow_one_item_per_side
-writes::relations::rel_names::rel_names::relation_names_are_resolved_correctly_in_create
-writes::relations::required_rel::required_rel::update_with_null
 writes::relations::same_model_self_rel_without_back_rel::self_rel_no_back_rel::m2m_self_rel
 writes::relations::same_model_self_rel_without_back_rel::self_rel_no_back_rel::one2one_self_rel
 writes::top_level_mutations::create_many::create_many::create_many_error_dups
-writes::top_level_mutations::create::create::create_should_work
-writes::top_level_mutations::create::create::create_with_datetime_ident
-writes::top_level_mutations::create::create::create_with_opt_rel_omitted
 writes::top_level_mutations::create::create::gracefully_fails_when_uniq_violation
-writes::top_level_mutations::create::create::return_enums_passed_as_strings
-writes::top_level_mutations::create::create::return_item_empty_str
-writes::top_level_mutations::create::create::return_item_explicit_null_attrs
-writes::top_level_mutations::create::create::return_item_implicit_null_attr
-writes::top_level_mutations::create::create::return_item_non_null_attrs_then_explicit_null_attrs
-writes::top_level_mutations::create::json_create::create_json_adv
-writes::top_level_mutations::create::mapped_create::mapped_name_with_space_does_not_break_returning
-writes::top_level_mutations::default_value::default_value::enum_field
-writes::top_level_mutations::default_value::default_value::int_field
-writes::top_level_mutations::default_value::default_value::non_list_field
 writes::top_level_mutations::default_value::default_value::remapped_enum_field
-writes::top_level_mutations::default_value::default_value::updated_at_created_at
-writes::top_level_mutations::delete_many_relations::delete_many_rels::p1_c1
-writes::top_level_mutations::delete_many_relations::delete_many_rels::p1_c1_no_children
-writes::top_level_mutations::delete_many_relations::delete_many_rels::p1_c1_req_no_children
-writes::top_level_mutations::delete_many_relations::delete_many_rels::p1_cm
-writes::top_level_mutations::delete_many_relations::delete_many_rels::p1_cm_no_children
-writes::top_level_mutations::delete_many_relations::delete_many_rels::p1_req_cm_no_children
-writes::top_level_mutations::delete_many_relations::delete_many_rels::pm_c1
-writes::top_level_mutations::delete_many_relations::delete_many_rels::pm_c1_no_children
-writes::top_level_mutations::delete_many_relations::delete_many_rels::pm_c1_req_no_children
-writes::top_level_mutations::delete_many_relations::delete_many_rels::pm_cm
-writes::top_level_mutations::delete_many_relations::delete_many_rels::pm_cm_no_children
-writes::top_level_mutations::delete_many_relations::delete_many_rels::pm_cm_other_relations
 writes::top_level_mutations::delete_many::delete_many::nested_delete_many
-writes::top_level_mutations::delete_many::delete_many::should_delete_all_if_where_empty
-writes::top_level_mutations::delete_many::delete_many::should_delete_all_using_in
-writes::top_level_mutations::delete_many::delete_many::should_delete_all_using_notin
-writes::top_level_mutations::delete_many::delete_many::should_delete_items
-writes::top_level_mutations::delete_many::delete_many::should_delete_max_limit_items
-writes::top_level_mutations::delete_many::delete_many::should_delete_using_and
-writes::top_level_mutations::delete_many::delete_many::should_delete_using_or
-writes::top_level_mutations::delete_many::delete_many::should_fail_with_negative_limit
-writes::top_level_mutations::delete_mutation_relations::delete_mutation_relations::p1_c1
-writes::top_level_mutations::delete_mutation_relations::delete_mutation_relations::p1_c1_no_children
-writes::top_level_mutations::delete_mutation_relations::delete_mutation_relations::p1_c1_req_no_children
-writes::top_level_mutations::delete_mutation_relations::delete_mutation_relations::p1_cm
-writes::top_level_mutations::delete_mutation_relations::delete_mutation_relations::p1_cm_no_children
-writes::top_level_mutations::delete_mutation_relations::delete_mutation_relations::p1_req_cm
-writes::top_level_mutations::delete_mutation_relations::delete_mutation_relations::pm_c1
-writes::top_level_mutations::delete_mutation_relations::delete_mutation_relations::pm_c1_no_children
-writes::top_level_mutations::delete_mutation_relations::delete_mutation_relations::pm_c1_req_no_children
-writes::top_level_mutations::delete_mutation_relations::delete_mutation_relations::pm_cm
-writes::top_level_mutations::delete_mutation_relations::delete_mutation_relations::pm_cm_no_children
-writes::top_level_mutations::delete_mutation_relations::delete_mutation_relations::pm_cm_other_relations_1
-writes::top_level_mutations::delete_mutation_relations::delete_mutation_relations::pm_cm_other_relations_2
-writes::top_level_mutations::delete::delete::delete_fails_if_filter_dont_match
-writes::top_level_mutations::delete::delete::should_delete_and_return_item
-writes::top_level_mutations::delete::delete::should_delete_return_non_id_uniq_field
-writes::top_level_mutations::delete::delete::should_fail_delete_null_value
-writes::top_level_mutations::delete::delete::should_fail_non_exist_id
-writes::top_level_mutations::delete::delete::should_fail_non_existent_value_non_id_uniq_field
-writes::top_level_mutations::insert_null_in_required_field::insert_null::create_optional_val_null
 writes::top_level_mutations::insert_null_in_required_field::insert_null::update_optional_val_null
-writes::top_level_mutations::insert_null_in_required_field::insert_null::update_required_val_to_null
 writes::top_level_mutations::non_embedded_upsert::non_embedded_upsert::execute_nested_create_of_correct_branch
 writes::top_level_mutations::non_embedded_upsert::non_embedded_upsert::nested_connect_in_correct_create_branch
 writes::top_level_mutations::non_embedded_upsert::non_embedded_upsert::nested_connect_in_correct_update_branch
@@ -999,14 +358,7 @@ writes::top_level_mutations::non_embedded_upsert::non_embedded_upsert::nested_co
 writes::top_level_mutations::non_embedded_upsert::non_embedded_upsert::nested_connect_in_update
 writes::top_level_mutations::non_embedded_upsert::non_embedded_upsert::nested_delete_in_update
 writes::top_level_mutations::non_embedded_upsert::non_embedded_upsert::nested_disconnect_in_update
-writes::top_level_mutations::update_many::json_update_many::update_json_adv
-writes::top_level_mutations::update_many::update_many::apply_number_ops_for_float
-writes::top_level_mutations::update_many::update_many::apply_number_ops_for_int
-writes::top_level_mutations::update_many::update_many::should_fail_with_negative_limit
-writes::top_level_mutations::update_many::update_many::update_all_items_if_where_empty
 writes::top_level_mutations::update_many::update_many::update_max_limit_items
-writes::top_level_mutations::update_many::update_many::update_recs_matching_where
-writes::top_level_mutations::update_many::update_many::update_recs_matching_where_shorthands
 writes::top_level_mutations::update::json_update::update_json_adv
 writes::top_level_mutations::update::update::update_an_item
 writes::top_level_mutations::update::update::update_apply_number_ops_for_float
@@ -1033,22 +385,12 @@ writes::top_level_mutations::upsert::upsert::upsert_apply_number_ops_for_float
 writes::top_level_mutations::upsert::upsert::upsert_apply_number_ops_for_int
 writes::top_level_mutations::upsert::upsert::upsert_called_twice_does_nothing
 writes::top_level_mutations::upsert::upsert::upsert_fails_if_filter_dont_match
-writes::unchecked_writes::unchecked_create::unchecked_create::allow_write_autoinc_ids
-writes::unchecked_writes::unchecked_create::unchecked_create::allow_write_non_inlined_rel
 writes::unchecked_writes::unchecked_create::unchecked_create::allow_writing_inlined_rel_scalars
-writes::unchecked_writes::unchecked_create::unchecked_create::honor_defaults_make_req_rel_sclrs_opt
-writes::unchecked_writes::unchecked_create::unchecked_create::required_write_required_rel_scalars
-writes::unchecked_writes::unchecked_nested_create::unchecked_nested_create::allow_write_autoinc_ids
-writes::unchecked_writes::unchecked_nested_create::unchecked_nested_create::allow_write_non_parent
-writes::unchecked_writes::unchecked_nested_create::unchecked_nested_create::allow_write_non_prent_inline_rel_sclrs
-writes::unchecked_writes::unchecked_nested_create::unchecked_nested_create::honor_defaults_make_req_rel_sclrs_opt
 writes::unchecked_writes::unchecked_nested_update_many::unchecked_nested_um::allow_write_autoinc_id
 writes::unchecked_writes::unchecked_nested_update_many::unchecked_nested_um::allow_write_non_prent_inline_rel_sclrs
 writes::unchecked_writes::unchecked_update_spec::unchecked_update::allow_write_autoinc_ids
 writes::unchecked_writes::unchecked_update_spec::unchecked_update::allow_write_non_inline_rels
 writes::unchecked_writes::unchecked_update_spec::unchecked_update::allow_write_non_prent_inline_rel_sclrs
-writes::unchecked_writes::unchecked_update_spec::unchecked_update::disallow_write_inline_rels
-writes::uniques_and_node_selectors::multi_field_uniq_mutation::multi_field_uniq_mut::delete_multi_field_uniq
 writes::uniques_and_node_selectors::multi_field_uniq_mutation::multi_field_uniq_mut::nested_connect_one2m_rel
 writes::uniques_and_node_selectors::multi_field_uniq_mutation::multi_field_uniq_mut::nested_connect_one2one_rel
 writes::uniques_and_node_selectors::multi_field_uniq_mutation::multi_field_uniq_mut::nested_delete_multi_field_uniq
@@ -1059,7 +401,6 @@ writes::uniques_and_node_selectors::multi_field_uniq_mutation::multi_field_uniq_
 writes::uniques_and_node_selectors::multi_field_uniq_mutation::multi_field_uniq_mut::update_multi_field_uniq
 writes::uniques_and_node_selectors::multi_field_uniq_mutation::multi_field_uniq_mut::upsert_multi_field_uniq
 writes::uniques_and_node_selectors::non_embedded_setting_node_selector_to_null::non_embedded_node_sel_to_null::where_val_to_null
-writes::uniques_and_node_selectors::relation_uniques::compound_uniq_rel_field::compound_uniq_rel_field::compound_uniq_same_field_diff_models
 writes::uniques_and_node_selectors::relation_uniques::compound_uniq_rel_field::compound_uniq_rel_field::compound_uniq_with_1_1_multi_rel
 writes::uniques_and_node_selectors::relation_uniques::compound_uniq_rel_field::compound_uniq_rel_field::compound_uniq_with_1_1_single_rel
 writes::uniques_and_node_selectors::relation_uniques::compound_uniq_rel_field::compound_uniq_rel_field::compound_uniq_with_1_m_multi_rel
diff --git a/query-engine/connectors/sql-query-connector/src/database/operations/write.rs b/query-engine/connectors/sql-query-connector/src/database/operations/write.rs
index 4ea8db675d31..808b77b42f40 100644
--- a/query-engine/connectors/sql-query-connector/src/database/operations/write.rs
+++ b/query-engine/connectors/sql-query-connector/src/database/operations/write.rs
@@ -2,12 +2,14 @@ use super::update::*;
 use crate::row::ToSqlRow;
 use crate::value::to_prisma_value;
 use crate::{error::SqlError, QueryExt, Queryable};
+use itertools::Itertools;
 use quaint::prelude::ResultSet;
 use quaint::{
     error::ErrorKind,
-    prelude::{native_uuid, uuid_to_bin, uuid_to_bin_swapped, Aliasable, Select, SqlFamily},
+    prelude::{Select, SqlFamily},
 };
 use query_structure::*;
+use sql_query_builder::write::defaults_for_mysql_write_args;
 use sql_query_builder::{column_metadata, write, Context, SelectionResultExt, SqlTraceComment};
 use std::borrow::Cow;
 use std::collections::HashMap;
@@ -20,30 +22,15 @@ async fn generate_id(
     ctx: &Context<'_>,
 ) -> crate::Result<Option<SelectionResult>> {
     // Go through all the values and generate a select statement with the correct MySQL function
-    let (id_select, need_select) = id_field
-        .selections()
-        .filter_map(|field| match field {
-            SelectedField::Scalar(sf) if sf.default_value().is_some() && !args.has_arg_for(sf.db_name()) => sf
-                .default_value()
-                .unwrap()
-                .to_dbgenerated_func()
-                .map(|func| (field.db_name().to_string(), func)),
-            _ => None,
-        })
-        .fold((Select::default(), false), |(query, generated), value| {
-            let alias = value.0;
-            let func = value.1.to_lowercase().replace(' ', "");
-
-            match func.as_str() {
-                "(uuid())" => (query.value(native_uuid().alias(alias)), true),
-                "(uuid_to_bin(uuid()))" | "(uuid_to_bin(uuid(),0))" => (query.value(uuid_to_bin().alias(alias)), true),
-                "(uuid_to_bin(uuid(),1))" => (query.value(uuid_to_bin_swapped().alias(alias)), true),
-                _ => (query, generated),
-            }
-        });
+    let defaults = defaults_for_mysql_write_args(id_field, args)
+        .map(|(_, val)| val)
+        .collect_vec();
 
     // db generate values only if needed
-    if need_select {
+    if !defaults.is_empty() {
+        let mut id_select = Select::default();
+        id_select.extend(defaults);
+
         let pk_select = id_select.add_traceparent(ctx.traceparent());
         let pk_result = conn.query(pk_select.into()).await?;
         let result = try_convert(&(id_field.into()), pk_result)?;
diff --git a/query-engine/query-builders/query-builder/src/lib.rs b/query-engine/query-builders/query-builder/src/lib.rs
index 9ffdd6f58086..9c57997d3b88 100644
--- a/query-engine/query-builders/query-builder/src/lib.rs
+++ b/query-engine/query-builders/query-builder/src/lib.rs
@@ -1,6 +1,7 @@
 use query_structure::{
-    AggregationSelection, FieldSelection, Filter, Model, PrismaValue, QueryArguments, RecordFilter, RelationField,
-    RelationLoadStrategy, ScalarCondition, ScalarField, SelectionResult, TaggedPrismaValue, WriteArgs,
+    AggregationSelection, FieldSelection, Filter, Model, Placeholder, PrismaValue, QueryArguments, RecordFilter,
+    RelationField, RelationLoadStrategy, ScalarCondition, ScalarField, SelectedField, SelectionResult,
+    TaggedPrismaValue, WriteArgs,
 };
 use serde::Serialize;
 use std::collections::BTreeMap;
@@ -44,7 +45,7 @@ pub trait QueryBuilder {
         model: &Model,
         args: WriteArgs,
         selected_fields: &FieldSelection,
-    ) -> Result<DbQuery, Box<dyn std::error::Error + Send + Sync>>;
+    ) -> Result<CreateRecord, Box<dyn std::error::Error + Send + Sync>>;
 
     fn build_inserts(
         &self,
@@ -117,6 +118,30 @@ pub trait QueryBuilder {
     ) -> Result<DbQuery, Box<dyn std::error::Error + Send + Sync>>;
 }
 
+/// An insertion operation for a record in the database.
+pub struct CreateRecord {
+    /// The insert query to run in order to create the record.
+    pub insert_query: DbQuery,
+    /// The query to run prior to the insert in order to create default column values.
+    /// This is used in some cases where the database does not support returning default values.
+    pub select_defaults: Option<CreateRecordDefaultsQuery>,
+    /// The field in the model of the record that corresponds to the last inserted ID, if
+    /// required by the database.
+    pub last_insert_id_field: Option<ScalarField>,
+    /// The values to merge into the resulting record after insertion. These are inferred from the
+    /// input arguments.
+    pub merge_values: Vec<(SelectedField, PrismaValue)>,
+}
+
+/// A query that retrieves default values needed for an insert operation.
+pub struct CreateRecordDefaultsQuery {
+    /// The query that returns the default values.
+    pub query: DbQuery,
+    /// The fields that are selected in the query and their corresponding placeholders.
+    /// These placeholders are referred to by the subsequent insert query.
+    pub field_placeholders: Vec<(ScalarField, Placeholder)>,
+}
+
 #[derive(Debug)]
 pub struct ConditionalLink {
     field: ScalarField,
diff --git a/query-engine/query-builders/sql-query-builder/src/convert.rs b/query-engine/query-builders/sql-query-builder/src/convert.rs
index 3f6e7d882213..16586f9dc4d8 100644
--- a/query-engine/query-builders/sql-query-builder/src/convert.rs
+++ b/query-engine/query-builders/sql-query-builder/src/convert.rs
@@ -60,9 +60,8 @@ pub(crate) fn quaint_value_to_prisma_value(value: quaint::Value<'_>, family: Sql
             Some("DATE") if family.is_postgres() => PrismaValue::String(dt.date_naive().to_string()),
             Some("TIME") if family.is_postgres() => PrismaValue::String(dt.time().to_string()),
             Some("TIMETZ") if family.is_postgres() => PrismaValue::String(dt.time().format(TIME_FORMAT).to_string()),
-            Some(_) if family.is_postgres() => PrismaValue::String(dt.naive_utc().to_string()),
-
-            Some(_) if family.is_mysql() => PrismaValue::String(dt.format(DATETIME_FORMAT).to_string()),
+            _ if family.is_postgres() => PrismaValue::String(dt.naive_utc().to_string()),
+            _ if family.is_mysql() => PrismaValue::String(dt.format(DATETIME_FORMAT).to_string()),
 
             _ => PrismaValue::String(dt.to_rfc3339()),
         },
diff --git a/query-engine/query-builders/sql-query-builder/src/lib.rs b/query-engine/query-builders/sql-query-builder/src/lib.rs
index 173f0c15ef0f..e1402a342f39 100644
--- a/query-engine/query-builders/sql-query-builder/src/lib.rs
+++ b/query-engine/query-builders/sql-query-builder/src/lib.rs
@@ -20,16 +20,18 @@ use std::{collections::HashMap, iter, marker::PhantomData};
 
 use itertools::{Either, Itertools};
 use model_extensions::ScalarFieldExt;
-use prisma_value::PrismaValue;
+use prisma_value::{Placeholder, PrismaValue};
 use quaint::{
-    ast::{Column, Comparable, ConditionTree, ExpressionKind, Insert, OnConflict, OpaqueType, Query, Row, Values},
+    ast::{
+        Column, Comparable, ConditionTree, ExpressionKind, Insert, OnConflict, OpaqueType, Query, Row, Select, Values,
+    },
     visitor::Visitor,
     Value,
 };
-use query_builder::{DbQuery, QueryBuilder};
+use query_builder::{CreateRecord, CreateRecordDefaultsQuery, DbQuery, QueryBuilder};
 use query_structure::{
-    AggregationSelection, FieldSelection, Filter, Model, ModelProjection, QueryArguments, RecordFilter, RelationField,
-    RelationLoadStrategy, ScalarField, SelectionResult, WriteArgs,
+    AggregationSelection, DatasourceFieldName, FieldSelection, Filter, Model, ModelProjection, QueryArguments,
+    RecordFilter, RelationField, RelationLoadStrategy, ScalarField, SelectionResult, WriteArgs, WriteOperation,
 };
 
 pub use column_metadata::ColumnMetadata;
@@ -211,11 +213,56 @@ impl<'a, V: Visitor<'a>> QueryBuilder for SqlQueryBuilder<'a, V> {
     fn build_create_record(
         &self,
         model: &Model,
-        args: WriteArgs,
+        mut args: WriteArgs,
         selected_fields: &FieldSelection,
-    ) -> Result<DbQuery, Box<dyn std::error::Error + Send + Sync>> {
+    ) -> Result<CreateRecord, Box<dyn std::error::Error + Send + Sync>> {
+        let id_selection = model.primary_identifier();
+
+        let (select_defaults, last_insert_id_field, merge_values) = if self.context.sql_family().is_mysql() {
+            let (field_placeholders, query): (Vec<_>, Select<'static>) =
+                write::defaults_for_mysql_write_args(&id_selection, &args)
+                    .map(|(field, arg)| {
+                        let ph = Placeholder::new(field.name().into(), field.corresponding_prisma_type());
+                        ((field, ph), arg)
+                    })
+                    .unzip();
+
+            let select_defaults = if !field_placeholders.is_empty() {
+                // Set field defaults as placeholders in the arguments of the insert statement.
+                for (field, ph) in &field_placeholders {
+                    let field = DatasourceFieldName(field.db_name().into());
+                    args.insert(field, WriteOperation::scalar_set(PrismaValue::Placeholder(ph.clone())))
+                }
+
+                Some(CreateRecordDefaultsQuery {
+                    query: self.convert_query(query)?,
+                    field_placeholders,
+                })
+            } else {
+                None
+            };
+
+            let last_insert_id_field = id_selection.scalars().find(|sf| sf.is_auto_generated_int_id()).cloned();
+
+            // Return all arguments that are a part of the primary identifier as values to merge
+            // into the created record.
+            let merge_values = args
+                .as_selection_result((&id_selection).into())
+                .map(|res| res.pairs)
+                .unwrap_or_default();
+
+            (select_defaults, last_insert_id_field, merge_values)
+        } else {
+            (None, None, vec![])
+        };
+
         let query = write::create_record(model, args, &selected_fields.into(), &self.context);
-        self.convert_query(query)
+        Ok(CreateRecord {
+            select_defaults,
+            insert_query: self.convert_query(query)?,
+            last_insert_id_field,
+            merge_values,
+        })
     }
 
     fn build_inserts(
diff --git a/query-engine/query-builders/sql-query-builder/src/write.rs b/query-engine/query-builders/sql-query-builder/src/write.rs
index 084f66985967..e96dbdfddbb6 100644
--- a/query-engine/query-builders/sql-query-builder/src/write.rs
+++ b/query-engine/query-builders/sql-query-builder/src/write.rs
@@ -513,3 +513,27 @@ fn write_args_to_shape(write_args: &WriteArgs, model: &Model) -> Vec<DatasourceF
 
     shape
 }
+
+pub fn defaults_for_mysql_write_args<'a>(
+    id_field: &'a FieldSelection,
+    args: &'a WriteArgs,
+) -> impl Iterator<Item = (ScalarField, Expression<'static>)> + use<'a> {
+    // Go through all the values and generate a select statement with the correct MySQL function
+    id_field.selections().filter_map(|field| {
+        let (sf, func) = match field {
+            SelectedField::Scalar(sf) if !args.has_arg_for(sf.db_name()) => {
+                (sf, sf.default_value()?.to_dbgenerated_func()?)
+            }
+            _ => return None,
+        };
+        let alias = field.db_name().into_owned();
+        let func = func.to_lowercase().replace(' ', "");
+
+        match func.as_str() {
+            "(uuid())" => Some((sf.clone(), native_uuid().alias(alias))),
+            "(uuid_to_bin(uuid()))" | "(uuid_to_bin(uuid(),0))" => Some((sf.clone(), uuid_to_bin().alias(alias))),
+            "(uuid_to_bin(uuid(),1))" => Some((sf.clone(), uuid_to_bin_swapped().alias(alias))),
+            _ => None,
+        }
+    })
+}


Reviews:
user: login: jacek-prisma
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-30T10:05:21Z
user: login: aqrln
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-30T10:31:29Z
user: login: aqrln
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-30T10:42:56Z
user: login: jacek-prisma
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-30T11:03:21Z
user: login: jacek-prisma
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-30T11:03:32Z
user: login: aqrln
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-30T11:15:05Z

Review comments:
diff_hunk: @@ -1,29 +1,92 @@
 use itertools::{Either, Itertools};
-use query_builder::QueryBuilder;
+use query_builder::{CreateRecord, CreateRecordDefaultsQuery, QueryBuilder};
 use query_core::{
     ConnectRecords, DeleteManyRecords, DeleteRecord, DisconnectRecords, RawQuery, UpdateManyRecords, UpdateRecord,
     UpdateRecordWithSelection, WriteQuery,
 };
-use query_structure::{QueryArguments, RelationLoadStrategy, Take};
+use query_structure::{PrismaValue, QueryArguments, RelationLoadStrategy, Take};
 use sql_query_builder::write::split_write_args_by_shape;
+use std::{collections::HashMap, iter};
 
-use crate::{TranslateError, expression::Expression, translate::TranslateResult};
+use crate::{
+    TranslateError,
+    expression::{Binding, Expression, RecordValue},
+    translate::TranslateResult,
+};
 
 use super::read::add_inmemory_join;
 
 pub(crate) fn translate_write_query(query: WriteQuery, builder: &dyn QueryBuilder) -> TranslateResult<Expression> {
     Ok(match query {
         WriteQuery::CreateRecord(cr) => {
-            // TODO: MySQL needs additional logic to generate IDs on our side.
-            // See sql_query_connector::database::operations::write::create_record
-            let query = builder
+            let CreateRecord {
+                select_defaults,
+                insert_query,
+                last_insert_id_field,
+                merge_values,
+            } = builder
                 .build_create_record(&cr.model, cr.args, &cr.selected_fields)
                 .map_err(TranslateError::QueryBuildFailure)?;
 
-            // TODO: we probably need some additional node type or extra info in the WriteQuery node
-            // to help the client executor figure out the returned ID in the case when it's inferred
-            // from the query arguments.
-            Expression::Unique(Box::new(Expression::Query(query)))
+            let mut extensions = merge_values
+                .into_iter()
+                .map(|(field, value)| (field.prisma_name().into_owned(), RecordValue::Value(value)))
+                .collect::<HashMap<_, _>>();
+
+            if let Some(last_insert_id_field) = last_insert_id_field {
+                extensions.insert(last_insert_id_field.name().into(), RecordValue::LastInsertId);
+            }
+
+            if let Some(defaults_query) = &select_defaults {
+                // Extend the result record with any defaults that are generated by the extra
+                // select query, since they can overlap with the primary identifier.
+                for (field, placeholder) in &defaults_query.field_placeholders {
+                    let value = RecordValue::Value(PrismaValue::Placeholder(placeholder.clone()));
+                    extensions.insert(field.name().into(), value);
+                }
+            }
+
+            let mut expr = Expression::Unique(Expression::Query(insert_query).into());
+
+            if !extensions.is_empty() {
+                expr = Expression::ExtendRecord {
+                    expr: expr.into(),
+                    values: extensions,
+                };
+            }
+
+            if let Some(CreateRecordDefaultsQuery {
+                query,
+                field_placeholders,
+            }) = select_defaults
+            {
+                const DEFAULTS_BINDING_NAME: &str = "defaults";
path: query-compiler/query-compiler/src/translate/query/write.rs
user: login: jacek-prisma
body: I'd like to get rid of this and generate unique names for these bindings, I think we should maybe pass down some object with a counter in it or just the index of the node that's being generated to make sure the bindings don't end up shadowing/conflicting with something else, but I didn't want to bloat this PR too much
created_at: 2025-05-30T10:05:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -124,6 +124,19 @@ pub enum Expression {
         expr: Box<Expression>,
         pagination: Pagination,
     },
+
+    /// Extends a record with additional values.
+    ExtendRecord {
+        expr: Box<Expression>,
+        values: HashMap<String, RecordValue>,
path: query-compiler/query-compiler/src/expression.rs
user: login: aqrln
body: `HashMap` might cause some instability in snapshot tests (if we were to have query plan snapshots for MySQL as well).
created_at: 2025-05-30T10:31:29Z
author_association: MEMBER
diff_hunk: @@ -460,6 +461,34 @@ where
 
         builder.append(self.expression(expr))
     }
+
+    fn extend_record(
+        &'a self,
+        expr: &'a Expression,
+        fields: &'a HashMap<String, RecordValue>,
+    ) -> DocBuilder<'a, PrettyPrinter<'a, D>, ColorSpec> {
+        self.keyword("extend")
+            .append(
+                self.intersperse(
+                    fields.iter().map(|(name, value)| {
+                        let value = match value {
+                            RecordValue::LastInsertId => self.keyword("lastInsertId"),
+                            RecordValue::Value(value) => self.value(value),
+                        };
+
+                        self.field_name(name)
+                            .append(self.text(":"))
+                            .append(self.space())
+                            .append(value)
+                    }),
+                    self.line(),
+                )
+                .append(self.line())
+                .indent(4),
+            )
+            .braces()
+            .append(self.expression(expr))
path: query-compiler/query-compiler/src/expression/format.rs
user: login: aqrln
body: Formatting is going to be slightly off here (no whitespace before and after braces; the `extend` keyword is inside the braces and not outside).
```suggestion
        self.keyword("extend")
            .append(self.space())
            .append(
                self.intersperse(
                    fields.iter().map(|(name, value)| {
                        let value = match value {
                            RecordValue::LastInsertId => self.keyword("lastInsertId"),
                            RecordValue::Value(value) => self.value(value),
                        };

                        self.field_name(name)
                            .append(self.text(":"))
                            .append(self.space())
                            .append(value)
                    }),
                    self.line(),
                )
                .append(self.line())
                .indent(4)
                .braces(),
            )
            .append(self.space())
            .append(self.expression(expr))
```

I've also extracted `self.object()` helper on my branch.
created_at: 2025-05-30T10:42:56Z
author_association: MEMBER
diff_hunk: @@ -124,6 +124,19 @@ pub enum Expression {
         expr: Box<Expression>,
         pagination: Pagination,
     },
+
+    /// Extends a record with additional values.
+    ExtendRecord {
+        expr: Box<Expression>,
+        values: HashMap<String, RecordValue>,
path: query-compiler/query-compiler/src/expression.rs
user: login: jacek-prisma
body: good catch, updated
created_at: 2025-05-30T11:03:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -460,6 +461,34 @@ where
 
         builder.append(self.expression(expr))
     }
+
+    fn extend_record(
+        &'a self,
+        expr: &'a Expression,
+        fields: &'a HashMap<String, RecordValue>,
+    ) -> DocBuilder<'a, PrettyPrinter<'a, D>, ColorSpec> {
+        self.keyword("extend")
+            .append(
+                self.intersperse(
+                    fields.iter().map(|(name, value)| {
+                        let value = match value {
+                            RecordValue::LastInsertId => self.keyword("lastInsertId"),
+                            RecordValue::Value(value) => self.value(value),
+                        };
+
+                        self.field_name(name)
+                            .append(self.text(":"))
+                            .append(self.space())
+                            .append(value)
+                    }),
+                    self.line(),
+                )
+                .append(self.line())
+                .indent(4),
+            )
+            .braces()
+            .append(self.expression(expr))
path: query-compiler/query-compiler/src/expression/format.rs
user: login: jacek-prisma
body: updated
created_at: 2025-05-30T11:03:32Z
author_association: CONTRIBUTOR

PR comments:
user: login: codspeed-hq[bot]
created_at: 2025-05-29T17:06:32Z
body: <!-- __CODSPEED_PERFORMANCE_REPORT_COMMENT__ -->
<!-- __CODSPEED_INSTRUMENTATION_PERFORMANCE_REPORT_COMMENT__ -->

## [CodSpeed Performance Report](https://codspeed.io/prisma/prisma-engines/branches/feat%2Fmysql-insert-support)

### Merging #5443 will **not alter performance**

<sub>Comparing <code>feat/mysql-insert-support</code> (7b069c9) with <code>main</code> (403d759)</sub>



### Summary

`✅ 11` untouched benchmarks  




author_association: NONE
user: login: github-actions[bot]
created_at: 2025-05-29T17:08:10Z
body: <!-- wasm-size -->
### WASM Query Engine file Size

|Engine            | This PR                                      | Base branch                                      | Diff
|------------------|----------------------------------------------|--------------------------------------------------|-----------------------------------------------
| Postgres         | 2.176MiB    |  2.177MiB    | -562.000B
| Postgres (gzip)  | 874.020KiB |  874.071KiB | -52.000B
| Mysql            | 2.142MiB         |  2.142MiB          | -560.000B
| Mysql (gzip)     | 859.053KiB      |  859.577KiB       | -536.000B
| Sqlite           | 2.050MiB        |  2.051MiB         | -570.000B
| Sqlite (gzip)    | 823.876KiB     |  823.846KiB     | 31.000B
author_association: CONTRIBUTOR