1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[SQL] How to query from Postgres DB created with Prisma in Vercel interface?

Discussão em 'Outras Linguagens' iniciado por Stack, Novembro 7, 2024 às 11:53.

  1. Stack

    Stack Membro Participativo

    All my tables were created using prisma and here's a model example:

    model Story {
    id String @id @default(cuid())
    title String @unique
    tags String[]
    category String
    created_by String
    private Boolean @default(true)
    rate String
    content Bytes
    Category Category @relation(fields: [category], references: [id])
    Creator User @relation(fields: [created_by], references: [id])
    }


    Sometimes I want to use Vercel interface to do a quick query to check something but I couldn't find how. I'm trying SELECT * FROM Story and getting Syntax error: relation "story" does not exist.. If I try it SELECT * FROM story I get the same error.

    Using Prisma API (prisma.story.findAll) works just fine.

    What am I missing?

    Continue reading...

Compartilhe esta Página