error[E0277]: the trait bound `TransparentId: FromRow<'_, PgRow>` is not satisfied
--> tests/postgres/tmp-ui/transparent_without_scalar.rs:7:9
|
6 | let _ = sql_forge!(
| _____________-
7 | | support::TransparentId,
| | ^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
8 | | "SELECT id FROM users LIMIT 1",
9 | | );
| |_____- required by a bound introduced by this call
|
help: the trait `FromRow<'_, PgRow>` is not implemented for `TransparentId`
--> tests/postgres/tmp-ui/support/mod.rs
|
| pub struct TransparentId(pub i64);
| ^^^^^^^^^^^^^^^^^^^^^^^^
= help: the following other types implement trait `FromRow<'r, R>`:
`()` implements `FromRow<'r, R>`
`(T1, T2)` implements `FromRow<'r, R>`
`(T1, T2, T3)` implements `FromRow<'r, R>`
`(T1, T2, T3, T4)` implements `FromRow<'r, R>`
`(T1, T2, T3, T4, T5)` implements `FromRow<'r, R>`
`(T1, T2, T3, T4, T5, T6)` implements `FromRow<'r, R>`
`(T1, T2, T3, T4, T5, T6, T7)` implements `FromRow<'r, R>`
`(T1, T2, T3, T4, T5, T6, T7, T8)` implements `FromRow<'r, R>`
and $N others
note: required by a bound in `QueryBuilder::<DB>::build_query_as`
--> $CARGO/sqlx-core-$VERSION/src/query_builder.rs
|
| pub fn build_query_as<'q, T: FromRow<'q, DB::Row>>(
| ^^^^^^^^^^^^^^^^^^^^ required by this bound in `QueryBuilder::<DB>::build_query_as`
help: use a unary tuple instead
|
6 ~ let _ = (sql_forge!(
7 | support::TransparentId,
8 | "SELECT id FROM users LIMIT 1",
9 ~ ),);
|
error[E0599]: the method `fetch_all` exists for struct `QueryAs<'_, Postgres, TransparentId, PgArguments>`, but its trait bounds were not satisfied
--> tests/postgres/tmp-ui/transparent_without_scalar.rs:6:13
|
6 | let _ = sql_forge!(
| _____________^
7 | | support::TransparentId,
8 | | "SELECT id FROM users LIMIT 1",
9 | | );
| |_____^ method cannot be called on `QueryAs<'_, Postgres, TransparentId, PgArguments>` due to unsatisfied trait bounds
|
::: tests/postgres/tmp-ui/support/mod.rs
|
| pub struct TransparentId(pub i64);
| ------------------------ doesn't satisfy `TransparentId: FromRow<'r, PgRow>`
|
= note: the following trait bounds were not satisfied:
`TransparentId: FromRow<'r, PgRow>`
= note: this error originates in the macro `sql_forge` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0599]: the method `fetch_one` exists for struct `QueryAs<'_, Postgres, TransparentId, PgArguments>`, but its trait bounds were not satisfied
--> tests/postgres/tmp-ui/transparent_without_scalar.rs:6:13
|
6 | let _ = sql_forge!(
| _____________^
7 | | support::TransparentId,
8 | | "SELECT id FROM users LIMIT 1",
9 | | );
| |_____^ method cannot be called on `QueryAs<'_, Postgres, TransparentId, PgArguments>` due to unsatisfied trait bounds
|
::: tests/postgres/tmp-ui/support/mod.rs
|
| pub struct TransparentId(pub i64);
| ------------------------ doesn't satisfy `TransparentId: FromRow<'r, PgRow>`
|
= note: the following trait bounds were not satisfied:
`TransparentId: FromRow<'r, PgRow>`
= note: this error originates in the macro `sql_forge` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0599]: the method `fetch_optional` exists for struct `QueryAs<'_, Postgres, TransparentId, PgArguments>`, but its trait bounds were not satisfied
--> tests/postgres/tmp-ui/transparent_without_scalar.rs:6:13
|
6 | let _ = sql_forge!(
| _____________^
7 | | support::TransparentId,
8 | | "SELECT id FROM users LIMIT 1",
9 | | );
| |_____^ method cannot be called on `QueryAs<'_, Postgres, TransparentId, PgArguments>` due to unsatisfied trait bounds
|
::: tests/postgres/tmp-ui/support/mod.rs
|
| pub struct TransparentId(pub i64);
| ------------------------ doesn't satisfy `TransparentId: FromRow<'r, PgRow>`
|
= note: the following trait bounds were not satisfied:
`TransparentId: FromRow<'r, PgRow>`
= note: this error originates in the macro `sql_forge` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0560]: struct `TransparentId` has no field named `id`
--> tests/postgres/tmp-ui/transparent_without_scalar.rs:6:13
|
6 | let _ = sql_forge!(
| _____________^
7 | | support::TransparentId,
8 | | "SELECT id FROM users LIMIT 1",
9 | | );
| |_____^ field does not exist
|
::: tests/postgres/tmp-ui/support/mod.rs
|
| pub struct TransparentId(pub i64);
| ------------- `TransparentId` defined here
|
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sql_forge` (in Nightly builds, run with -Z macro-backtrace for more info)
help: `TransparentId` is a tuple struct, use the appropriate syntax
|
6 - let _ = sql_forge!(
7 - support::TransparentId,
8 - "SELECT id FROM users LIMIT 1",
9 - );
6 + let _ = TransparentId(/* i64 */);
|