shin
shin
PPrisma
Created by shin on 10/8/2024 in #help-and-questions
Compilation error using prisma engines
// prisma/schema.prisma for the second project code
generator client {
provider = "prisma-client-js"
output = "./generated/client"
binaryTargets = ["native"]
engineType = "binary"
}

datasource db {
provider = "sqlite"
url = "file:./dev.db"
}

model Door {
id Int @id @default(autoincrement())
state String
}

model User {
id Int @id @default(autoincrement())
email String @unique
name String
password String
role String
device_token String? @unique
}
generator client {
provider = "prisma-client-js"
output = "./generated/client"
binaryTargets = ["native"]
engineType = "binary"
}

datasource db {
provider = "sqlite"
url = "file:./dev.db"
}

model Door {
id Int @id @default(autoincrement())
state String
}

model User {
id Int @id @default(autoincrement())
email String @unique
name String
password String
role String
device_token String? @unique
}
6 replies
PPrisma
Created by shin on 10/8/2024 in #help-and-questions
Compilation error using prisma engines
// prisma/schema.prisma
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

model User {
id String @id @default(uuid())
username String @unique
password String
sshPubKey String @map("ssh_pub_key")
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

model User {
id String @id @default(uuid())
username String @unique
password String
sshPubKey String @map("ssh_pub_key")
}
6 replies
PPrisma
Created by shin on 10/8/2024 in #help-and-questions
Compilation error using prisma engines
Hey @Nurul (Prisma) 😄 I get it when trying to compile my project code. The moment it tries to compile the prisma engine the errors pop up. I use prisma in two of my project codes for interaction with my database, I get the same error there.
Compiling prisma-value v0.1.0 (https://github.com/prisma/prisma-engines?rev=d15c884f70bfe28d0b3ee1a3efac7fdb991e5de4#d15c884f)
error[E0599]: no variant or associated item named `Integer` found for enum `quaint::Value` in the current scope
--> /Users/_/.cargo/git/checkouts/prisma-engines-c59f93cf38470c49/d15c884/libs/prisma-value/src/sql_ext.rs:12:20
|
12 | 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 {
| ^^^^^^^^^^^^^^^^^^^^^
note: `bigdecimal::BigDecimal` is defined in crate `bigdecimal`
Compiling prisma-value v0.1.0 (https://github.com/prisma/prisma-engines?rev=d15c884f70bfe28d0b3ee1a3efac7fdb991e5de4#d15c884f)
error[E0599]: no variant or associated item named `Integer` found for enum `quaint::Value` in the current scope
--> /Users/_/.cargo/git/checkouts/prisma-engines-c59f93cf38470c49/d15c884/libs/prisma-value/src/sql_ext.rs:12:20
|
12 | 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 {
| ^^^^^^^^^^^^^^^^^^^^^
note: `bigdecimal::BigDecimal` is defined in crate `bigdecimal`
6 replies