-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/cargo-build-warning
- Loading branch information
Showing
33 changed files
with
369 additions
and
60 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
50 changes: 50 additions & 0 deletions
50
query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_21901.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,50 @@ | ||
use indoc::indoc; | ||
use query_engine_tests::*; | ||
|
||
#[test_suite(schema(schema), capabilities(Enums, ScalarLists), exclude(MongoDb))] | ||
mod prisma_21901 { | ||
fn schema() -> String { | ||
let schema = indoc! { | ||
r#"model Test { | ||
#id(id, Int, @id) | ||
colors Color[] | ||
} | ||
enum Color { | ||
red | ||
blue | ||
green | ||
} | ||
"# | ||
}; | ||
|
||
schema.to_owned() | ||
} | ||
|
||
// fixes https://github.com/prisma/prisma/issues/21901 | ||
#[connector_test] | ||
async fn test(runner: Runner) -> TestResult<()> { | ||
insta::assert_snapshot!( | ||
run_query!( | ||
runner, | ||
r#"mutation { createOneTest(data: { id: 1, colors: ["red"] }) { colors } }"# | ||
), | ||
@r###"{"data":{"createOneTest":{"colors":["red"]}}}"### | ||
); | ||
|
||
insta::assert_snapshot!( | ||
run_query!(runner, fmt_execute_raw(r#"TRUNCATE TABLE "prisma_21901_test"."Test" CASCADE;"#, [])), | ||
@r###"{"data":{"executeRaw":0}}"### | ||
); | ||
|
||
insta::assert_snapshot!( | ||
run_query!( | ||
runner, | ||
r#"mutation { createOneTest(data: { id: 2, colors: ["blue"] }) { colors } }"# | ||
), | ||
@r###"{"data":{"createOneTest":{"colors":["blue"]}}}"### | ||
); | ||
|
||
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
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
2 changes: 2 additions & 0 deletions
2
query-engine/connectors/sql-query-connector/src/database/connection.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
19 changes: 11 additions & 8 deletions
19
query-engine/connectors/sql-query-connector/src/database/mod.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
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
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
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
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
Oops, something went wrong.