diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/max_integer.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/max_integer.rs index e00b2d22e198..3eee8d0d4aee 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/max_integer.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/max_integer.rs @@ -187,6 +187,8 @@ mod max_integer { schema.to_owned() } + // Info: `driver-adapters` are currently excluded because they yield a different error message, + // coming straight from the database. #[connector_test( schema(overflow_pg), only(Postgres), diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bigint.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bigint.rs index c78b522f4994..469ebd227d49 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bigint.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/bigint.rs @@ -17,11 +17,7 @@ mod bigint { } // "Using a BigInt field" should "work" - #[connector_test(exclude( - Postgres("pg.js.wasm", "neon.js.wasm"), - Sqlite("libsql.js.wasm"), - Vitess("planetscale.js.wasm") - ))] + #[connector_test()] async fn using_bigint_field(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, r#"mutation { diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/native_types/postgres.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/native_types/postgres.rs index cb3cf9b366d6..f47f3e528b17 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/native_types/postgres.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/writes/data_types/native_types/postgres.rs @@ -23,7 +23,7 @@ mod postgres { } //"Postgres native int types" should "work" - #[connector_test(schema(schema_int), only(Postgres), exclude(Postgres("pg.js.wasm", "neon.js.wasm")))] + #[connector_test(schema(schema_int), only(Postgres))] async fn native_int_types(runner: Runner) -> TestResult<()> { insta::assert_snapshot!( run_query!(&runner, r#"mutation { diff --git a/query-engine/driver-adapters/executor/package.json b/query-engine/driver-adapters/executor/package.json index 5d716f32f7c5..dd1bff52d390 100644 --- a/query-engine/driver-adapters/executor/package.json +++ b/query-engine/driver-adapters/executor/package.json @@ -22,7 +22,7 @@ "dependencies": { "@libsql/client": "0.3.6", "@neondatabase/serverless": "0.7.2", - "@planetscale/database": "1.13.0", + "@planetscale/database": "1.14.0", "query-engine-wasm-latest": "npm:@prisma/query-engine-wasm@latest", "query-engine-wasm-baseline": "npm:@prisma/query-engine-wasm@0.0.19", "@prisma/adapter-libsql": "workspace:*", diff --git a/query-engine/driver-adapters/executor/src/testd.ts b/query-engine/driver-adapters/executor/src/testd.ts index 8ee0d8b74d92..c180efcd4ec4 100644 --- a/query-engine/driver-adapters/executor/src/testd.ts +++ b/query-engine/driver-adapters/executor/src/testd.ts @@ -21,7 +21,6 @@ import { Client as PlanetscaleClient } from '@planetscale/database' import { PrismaPlanetScale } from '@prisma/adapter-planetscale' - import {bindAdapter, DriverAdapter, ErrorCapturingDriverAdapter} from "@prisma/driver-adapter-utils"; import { webcrypto } from 'node:crypto'; @@ -292,7 +291,6 @@ async function planetscaleAdapter(url: string): Promise { throw new Error("DRIVER_ADAPTER_CONFIG is not defined or empty, but its required for planetscale adapter."); } - const client = new PlanetscaleClient({ // preserving path name so proxy url would look like real DB url url: copyPathName(url, proxyUrl), diff --git a/query-engine/driver-adapters/src/wasm/to_js.rs b/query-engine/driver-adapters/src/wasm/to_js.rs index 4a76dee6a513..a97b7a0f70c2 100644 --- a/query-engine/driver-adapters/src/wasm/to_js.rs +++ b/query-engine/driver-adapters/src/wasm/to_js.rs @@ -2,10 +2,13 @@ use serde::Serialize; use serde_wasm_bindgen::Serializer; use wasm_bindgen::{JsError, JsValue}; -// `serialize_missing_as_null` is required to make sure that "empty" values (e.g., `None` and `()`) -// are serialized as `null` and not `undefined`. -// This is due to certain drivers (e.g., LibSQL) not supporting `undefined` values. -static DEFAULT_SERIALIZER: Serializer = Serializer::new().serialize_missing_as_null(true); +// - `serialize_missing_as_null` is required to make sure that "empty" values (e.g., `None` and `()`) +// are serialized as `null` and not `undefined`. +// This is due to certain drivers (e.g., LibSQL) not supporting `undefined` values. +// - `serialize_large_number_types_as_bigints` is required to allow reading bigints from Prisma Client. +static DEFAULT_SERIALIZER: Serializer = Serializer::new() + .serialize_large_number_types_as_bigints(true) + .serialize_missing_as_null(true); pub(crate) trait ToJsValue: Sized { fn to_js_value(&self) -> Result; diff --git a/query-engine/query-engine-wasm/analyse/package.json b/query-engine/query-engine-wasm/analyse/package.json index 3b24bf202401..b728148b64d6 100644 --- a/query-engine/query-engine-wasm/analyse/package.json +++ b/query-engine/query-engine-wasm/analyse/package.json @@ -8,8 +8,8 @@ "crates": "node --import tsx --no-warnings ./src/crates.ts" }, "devDependencies": { - "ts-node": "^10.9.2", - "tsx": "^4.7.0", - "typescript": "^5.3.3" + "ts-node": "10.9.2", + "tsx": "4.7.0", + "typescript": "5.3.3" } } diff --git a/query-engine/query-engine-wasm/analyse/pnpm-lock.yaml b/query-engine/query-engine-wasm/analyse/pnpm-lock.yaml index eb147652f9e0..a87da2ff7165 100644 --- a/query-engine/query-engine-wasm/analyse/pnpm-lock.yaml +++ b/query-engine/query-engine-wasm/analyse/pnpm-lock.yaml @@ -6,13 +6,13 @@ settings: devDependencies: ts-node: - specifier: ^10.9.2 + specifier: 10.9.2 version: 10.9.2(@types/node@20.10.8)(typescript@5.3.3) tsx: - specifier: ^4.7.0 + specifier: 4.7.0 version: 4.7.0 typescript: - specifier: ^5.3.3 + specifier: 5.3.3 version: 5.3.3 packages: