-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qe: filter out unique criteria containing an unsupported field
They are not usable by the query engine, and currently cause crashes whenever querying the model containing them. closes prisma/prisma#18517
- Loading branch information
Showing
6 changed files
with
38 additions
and
6 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
1 change: 0 additions & 1 deletion
1
query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_17103.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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
use indoc::indoc; | ||
use query_engine_tests::*; | ||
|
||
#[test_suite(schema(schema))] | ||
|
27 changes: 27 additions & 0 deletions
27
query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_18517.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,27 @@ | ||
use query_engine_tests::*; | ||
|
||
#[test_suite(schema(schema), only(Postgres))] | ||
mod prisma_18517 { | ||
fn schema() -> String { | ||
r#" | ||
model Container { | ||
id String @id @default(uuid()) @test.Char(20) | ||
createdAt DateTime @default(now()) | ||
label String? | ||
parent Container? @relation("ContainerToContainer", fields: [parentId], references: [id], onDelete: Cascade) | ||
parentId String? @test.Char(20) | ||
path Unsupported("money")? @unique | ||
childContainers Container[] @relation("ContainerToContainer") | ||
} | ||
"#.to_owned() | ||
} | ||
|
||
#[connector_test] | ||
async fn regression(runner: Runner) -> TestResult<()> { | ||
run_query! { | ||
&runner, | ||
r#"query { findManyContainer(where: { label: "root", parentId: null }) { id }}"# | ||
}; | ||
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