diff --git a/psl/psl/tests/base/base_types.rs b/psl/psl/tests/base/base_types.rs index 59348e9fecd6..cfc91ffae167 100644 --- a/psl/psl/tests/base/base_types.rs +++ b/psl/psl/tests/base/base_types.rs @@ -184,7 +184,7 @@ fn json_type_must_work_for_some_connectors() { .assert_has_scalar_field("json") .assert_scalar_type(ScalarType::Json); - let error = parse_unwrap_err(&format!("{SQLITE_SOURCE}\n{dml}")); + let error = parse_unwrap_err(&format!("{MSSQL_SOURCE}\n{dml}")); let expectation = expect![[r#" error: Error validating field `json` in model `User`: Field `json` in model `User` can't be of type Json. The current connector does not support the Json type. diff --git a/psl/psl/tests/capabilities/sqlite.rs b/psl/psl/tests/capabilities/sqlite.rs index 7e30d3441d17..7ca2888fa33f 100644 --- a/psl/psl/tests/capabilities/sqlite.rs +++ b/psl/psl/tests/capabilities/sqlite.rs @@ -108,35 +108,6 @@ fn unique_index_names_support() { expectation.assert_eq(&error); } -#[test] -fn json_support() { - let dml = indoc! {r#" - datasource db { - provider = "sqlite" - url = "file:test.db" - } - - model User { - id Int @id - data Json - } - "#}; - - let error = parse_unwrap_err(dml); - - let expectation = expect![[r#" - error: Error validating field `data` in model `User`: Field `data` in model `User` can't be of type Json. The current connector does not support the Json type. - --> schema.prisma:8 -  |  -  7 |  id Int @id -  8 |  data Json -  9 | } -  |  - "#]]; - - expectation.assert_eq(&error); -} - #[test] fn non_unique_relation_criteria_support() { let dml = indoc! {r#" diff --git a/psl/psl/tests/common/mod.rs b/psl/psl/tests/common/mod.rs index 183c29b7d190..9a540f5ac8fd 100644 --- a/psl/psl/tests/common/mod.rs +++ b/psl/psl/tests/common/mod.rs @@ -65,13 +65,6 @@ pub(crate) fn assert_valid(schema: &str) { } } -pub(crate) const SQLITE_SOURCE: &str = r#" - datasource db { - provider = "sqlite" - url = "file:dev.db" - } -"#; - pub(crate) const POSTGRES_SOURCE: &str = r#" datasource db { provider = "postgres" @@ -85,3 +78,10 @@ pub(crate) const MYSQL_SOURCE: &str = r#" url = "mysql://localhost:3306" } "#; + +pub(crate) const MSSQL_SOURCE: &str = r#" + datasource db { + provider = "sqlserver" + url = "jdbc:sqlserver://localhost:3306" + } +"#; diff --git a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/json.rs b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/json.rs index 32701f76a3d3..e7c3b902079f 100644 --- a/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/json.rs +++ b/query-engine/connector-test-kit-rs/query-engine-tests/tests/queries/data_types/json.rs @@ -75,7 +75,7 @@ mod json { insta::assert_snapshot!( res.to_string(), - @r###"{"data":{"findManyTestModel":[{"json":{"$type":"Json","value":"{}"}},{"json":{"$type":"Json","value":"{\"a\":\"b\"}"}},{"json":{"$type":"Json","value":"1"}},{"json":{"$type":"Json","value":"\"hello\""}},{"json":{"$type":"Json","value":"[1,\"a\",{\"b\":true}]"}}]}}"### + @r###"{"data":{"findManyTestModel":[{"json":{"$type":"Json","value":"{}"}},{"json":{"$type":"Json","value":"{\"a\":\"b\"}"}},{"json":{"$type":"Json","value":"1"}}{"json":{"$type":"Json","value":"1.5"}},{"json":{"$type":"Json","value":"\"hello\""}},{"json":{"$type":"Json","value":"[1,\"a\",{\"b\":true}]"}}]}}"### ); } }