You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cargo 1.36.0-nightly
diesel = { version = "1.4.1", features = ["mysql"] }
Compiling mystore v0.1.0 (/home/desktop-64/Documents/Ram/rust/practical)
error[E0425]: cannot find value conn in this scope
--> src/models/product.rs:52:54
|
52 | products::table.order(products::id.desc()).first(conn).unwrap()
| ^^^^ not found in this scope
error[E0599]: no method named order found for type schema::products::table in the current scope
--> src/models/product.rs:52:21
|
52 | products::table.order(products::id.desc()).first(conn).unwrap()
| ^^^^^
|
::: src/schema.rs:1:1
|
1 | / table! {
2 | | products (id) {
3 | | id -> Int4,
4 | | name -> Varchar,
... |
7 | | }
8 | | }
| |_- method order not found for this
|
= help: items from traits can only be used if the trait is in scope
= note: the following traits are implemented but not in scope, perhaps add a use for one of them:
candidate #1: use crate::diesel::query_dsl::methods::OrderDsl;
candidate #2: use crate::diesel::QueryDsl;
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error[E0599]: no method named desc found for type schema::products::columns::id in the current scope
--> src/models/product.rs:52:40
|
52 | products::table.order(products::id.desc()).first(conn).unwrap()
| ^^^^
|
::: src/schema.rs:1:1
|
1 | / table! {
2 | | products (id) {
3 | | id -> Int4,
4 | | name -> Varchar,
... |
7 | | }
8 | | }
| |_- method desc not found for this
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope, perhaps add a use for it: use crate::diesel::ExpressionMethods;
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: aborting due to 3 previous errors
The text was updated successfully, but these errors were encountered:
cargo 1.36.0-nightly
diesel = { version = "1.4.1", features = ["mysql"] }
Compiling mystore v0.1.0 (/home/desktop-64/Documents/Ram/rust/practical)
error[E0425]: cannot find value
conn
in this scope--> src/models/product.rs:52:54
|
52 | products::table.order(products::id.desc()).first(conn).unwrap()
| ^^^^ not found in this scope
error[E0599]: no method named
order
found for typeschema::products::table
in the current scope--> src/models/product.rs:52:21
|
52 | products::table.order(products::id.desc()).first(conn).unwrap()
| ^^^^^
|
::: src/schema.rs:1:1
|
1 | / table! {
2 | | products (id) {
3 | | id -> Int4,
4 | | name -> Varchar,
... |
7 | | }
8 | | }
| |_- method
order
not found for this|
= help: items from traits can only be used if the trait is in scope
= note: the following traits are implemented but not in scope, perhaps add a
use
for one of them:candidate #1:
use crate::diesel::query_dsl::methods::OrderDsl;
candidate #2:
use crate::diesel::QueryDsl;
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error[E0599]: no method named
desc
found for typeschema::products::columns::id
in the current scope--> src/models/product.rs:52:40
|
52 | products::table.order(products::id.desc()).first(conn).unwrap()
| ^^^^
|
::: src/schema.rs:1:1
|
1 | / table! {
2 | | products (id) {
3 | | id -> Int4,
4 | | name -> Varchar,
... |
7 | | }
8 | | }
| |_- method
desc
not found for this|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope, perhaps add a
use
for it:use crate::diesel::ExpressionMethods;
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: aborting due to 3 previous errors
The text was updated successfully, but these errors were encountered: