-
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.
implement single column queries to vec
- Loading branch information
Showing
15 changed files
with
476 additions
and
137 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
21 changes: 16 additions & 5 deletions
21
postgres-macros/tests/fail-nightly/enum_array_to_enum_literal.stderr
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,9 +1,20 @@ | ||
error[E0271]: type mismatch resolving `<Role as SqlType>::Type == Vec<Enum<(EnumVariant<"admin">, EnumVariant<"user">)>>` | ||
error[E0277]: the trait bound `Role: Query<sqlm_postgres::types::Array<Vec<sqlm_postgres::types::Enum<(EnumVariant<"admin">, EnumVariant<"user">)>>>>` is not satisfied | ||
--> tests/fail-nightly/enum_array_to_enum_literal.rs:17:10 | ||
| | ||
17 | .await | ||
| ^^^^^ expected `Enum<(EnumVariant<"admin">, ...)>`, found `Vec<Enum<(..., ...)>>` | ||
| -^^^^^ | ||
| || | ||
| |the trait `Query<sqlm_postgres::types::Array<Vec<sqlm_postgres::types::Enum<(EnumVariant<"admin">, EnumVariant<"user">)>>>>` is not implemented for `Role`, which is required by `Sql<'_, sqlm_postgres::types::Array<Vec<sqlm_postgres::types::Enum<(EnumVariant<"admin">, EnumVariant<"user">)>>>, _>: IntoFuture` | ||
| help: remove the `.await` | ||
| | ||
= note: expected struct `sqlm_postgres::types::Enum<_>` | ||
found struct `Vec<sqlm_postgres::types::Enum<_>>` | ||
= note: required for `Sql<'_, Primitive<Vec<sqlm_postgres::types::Enum<(EnumVariant<"admin">, EnumVariant<"user">)>>>, Role>` to implement `IntoFuture` | ||
= help: the following other types implement trait `Query<Cols>`: | ||
<() as Query<()>> | ||
<Option<T> as Query<Primitive<<T as SqlType>::Type>>> | ||
<Option<T> as Query<Struct<Cols>>> | ||
<Option<Vec<u8>> as Query<Primitive<Bytea>>> | ||
<Vec<T> as Query<Primitive<<T as SqlType>::Type>>> | ||
<Vec<T> as Query<Struct<Cols>>> | ||
<Vec<T> as Query<sqlm_postgres::types::Array<Vec<<T as SqlType>::Type>>>> | ||
<Vec<Vec<u8>> as Query<Primitive<Bytea>>> | ||
and $N others | ||
= note: required for `Sql<'_, sqlm_postgres::types::Array<Vec<sqlm_postgres::types::Enum<(EnumVariant<"admin">, EnumVariant<"user">)>>>, Role>` to implement `IntoFuture` |
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
23 changes: 18 additions & 5 deletions
23
postgres-macros/tests/fail-stable/enum_array_to_enum_literal.stderr
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,9 +1,22 @@ | ||
error[E0271]: type mismatch resolving `<Role as SqlType>::Type == Vec<Enum<(EnumVariant<5755620910692865178>, EnumVariant<10465144470622129318>)>>` | ||
error[E0277]: the trait bound `Role: Query<sqlm_postgres::types::Array<Vec<sqlm_postgres::types::Enum<(EnumVariant<5755620910692865178>, EnumVariant<10465144470622129318>)>>>>` is not satisfied | ||
--> tests/fail-stable/enum_array_to_enum_literal.rs:17:10 | ||
| | ||
17 | .await | ||
| ^^^^^ expected `Enum<(..., ...)>`, found `Vec<Enum<(..., ...)>>` | ||
| -^^^^^ | ||
| || | ||
| |the trait `Query<sqlm_postgres::types::Array<Vec<sqlm_postgres::types::Enum<(EnumVariant<5755620910692865178>, EnumVariant<10465144470622129318>)>>>>` is not implemented for `Role`, which is required by `Sql<'_, sqlm_postgres::types::Array<Vec<sqlm_postgres::types::Enum<(EnumVariant<5755620910692865178>, EnumVariant<10465144470622129318>)>>>, _>: IntoFuture` | ||
| help: remove the `.await` | ||
| | ||
= note: expected struct `sqlm_postgres::types::Enum<_>` | ||
found struct `Vec<sqlm_postgres::types::Enum<_>>` | ||
= note: required for `Sql<'_, Primitive<Vec<sqlm_postgres::types::Enum<(EnumVariant<5755620910692865178>, EnumVariant<10465144470622129318>)>>>, Role>` to implement `IntoFuture` | ||
= help: the following other types implement trait `Query<Cols>`: | ||
<Vec<u8> as Query<Primitive<Bytea>>> | ||
<Vec<Vec<u8>> as Query<Primitive<Bytea>>> | ||
<Vec<Vec<u8>> as Query<sqlm_postgres::types::Array<Vec<Bytea>>>> | ||
<Vec<T> as Query<Struct<Cols>>> | ||
<Vec<T> as Query<Primitive<<T as SqlType>::Type>>> | ||
<Vec<T> as Query<sqlm_postgres::types::Array<Vec<<T as SqlType>::Type>>>> | ||
<Option<Vec<u8>> as Query<Primitive<Bytea>>> | ||
<Option<T> as Query<Struct<Cols>>> | ||
and $N others | ||
= note: required for `Sql<'_, Array<Vec<Enum<(EnumVariant<5755620910692865178>, EnumVariant<10465144470622129318>)>>>, Role>` to implement `IntoFuture` | ||
= note: the full name for the type has been written to '$WORKSPACE/target/tests/trybuild/aarch64-apple-darwin/debug/deps/$CRATE-4bc7215b1b514162.long-type-14335032845333733167.txt' | ||
= note: consider using `--verbose` to print the full type name to the console |
Oops, something went wrong.