shin
shin
PPrisma
Created by shin on 10/8/2024 in #help-and-questions
Compilation error using prisma engines
I use Prisma for interacting with the database for my code and it worked fine. Coming back to my code I get these errors which is a bit confusing. It seems some of the error is coming from Quaint. I need help and an explanation, please
Value::Integer(i) => i.map(PrismaValue::Int).unwrap_or(PrismaValue::Null),
| ^^^^^^^ variant or associated item not found in `Value<'_>`
|
help: there is an associated function `integer` with a similar name
--> /Users/_/.cargo/git/checkouts/quaint-9f01e008b9a89c14/27bc7cc/src/ast/values.rs:226:5
|
226 | / pub fn integer<I>(value: I) -> Self
227 | | where
228 | | I: Into<i32>,
| |_____________________^

error[E0308]: mismatched types
--> /Users/_/.cargo/git/checkouts/prisma-engines-c59f93cf38470c49/d15c884/libs/prisma-value/src/sql_ext.rs:52:45
|
52 | .map(|d| PrismaValue::Float(d.normalized()))
| ------------------ ^^^^^^^^^^^^^^ expected `bigdecimal::BigDecimal`, found a different `bigdecimal::BigDecimal`
| |
| arguments to this enum variant are incorrect
|
= note: `bigdecimal::BigDecimal` and `bigdecimal::BigDecimal` have similar names, but are actually distinct types
note: `bigdecimal::BigDecimal` is defined in crate `bigdecimal`
--> /Users/_/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bigdecimal-0.3.1/src/lib.rs:151:1
|
151 | pub struct BigDecimal {
| ^^^^^^^^^^^^^^^^^^^^^
--> /Users/_/.cargo/git/checkouts/prisma-engines-c59f93cf38470c49/d15c884/libs/prisma-value/src/sql_ext.rs:81:43
|
81 | Value::Uuid(uuid) => uuid.map(PrismaValue::Uuid).unwrap_or(PrismaValue::Null),
| --- ^^^^^^^^^^^^^^^^^ expected due to this
| |
| required by a bound introduced by this call
Value::Integer(i) => i.map(PrismaValue::Int).unwrap_or(PrismaValue::Null),
| ^^^^^^^ variant or associated item not found in `Value<'_>`
|
help: there is an associated function `integer` with a similar name
--> /Users/_/.cargo/git/checkouts/quaint-9f01e008b9a89c14/27bc7cc/src/ast/values.rs:226:5
|
226 | / pub fn integer<I>(value: I) -> Self
227 | | where
228 | | I: Into<i32>,
| |_____________________^

error[E0308]: mismatched types
--> /Users/_/.cargo/git/checkouts/prisma-engines-c59f93cf38470c49/d15c884/libs/prisma-value/src/sql_ext.rs:52:45
|
52 | .map(|d| PrismaValue::Float(d.normalized()))
| ------------------ ^^^^^^^^^^^^^^ expected `bigdecimal::BigDecimal`, found a different `bigdecimal::BigDecimal`
| |
| arguments to this enum variant are incorrect
|
= note: `bigdecimal::BigDecimal` and `bigdecimal::BigDecimal` have similar names, but are actually distinct types
note: `bigdecimal::BigDecimal` is defined in crate `bigdecimal`
--> /Users/_/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bigdecimal-0.3.1/src/lib.rs:151:1
|
151 | pub struct BigDecimal {
| ^^^^^^^^^^^^^^^^^^^^^
--> /Users/_/.cargo/git/checkouts/prisma-engines-c59f93cf38470c49/d15c884/libs/prisma-value/src/sql_ext.rs:81:43
|
81 | Value::Uuid(uuid) => uuid.map(PrismaValue::Uuid).unwrap_or(PrismaValue::Null),
| --- ^^^^^^^^^^^^^^^^^ expected due to this
| |
| required by a bound introduced by this call
6 replies