forked from prisma/prisma-engines
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adapter-planetscale: handle NULL column type (prisma#4320)
When a column type is NULL, mark it as `ColumnType.Int32` in JS to eventually convert it to `quaint::ValueType::Int32(None)`, just like quaint does in its own MySQL connector. Fixes: prisma/prisma#21369
- Loading branch information
Showing
4 changed files
with
25 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_21369.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use query_engine_tests::*; | ||
|
||
#[test_suite(schema(generic), exclude(MongoDb))] | ||
mod prisma_21369 { | ||
#[connector_test] | ||
async fn select_null_works(runner: Runner) -> TestResult<()> { | ||
let query = fmt_query_raw("SELECT NULL AS result", []); | ||
let result = run_query!(runner, query); | ||
|
||
assert_eq!( | ||
result, | ||
r#"{"data":{"queryRaw":[{"result":{"prisma__type":"null","prisma__value":null}}]}}"# | ||
); | ||
|
||
Ok(()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters