Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

212
Visualizações
Is there any way to explicitly declare int32 in schema in Prisma for MongoDB?

I did an introspection of a MongoDB from Prisma using the command 'prisma db pull'. This detected all number fields as integers (both long and int) and created the following entry in prisma.schema:

Index                       Int // Here I search for something like 'Int32'

To enable compatibility with 32bit applications I am currently looking for a way to explicitly declare the Int fields as 32bit integers - so far without success. No schema or similar is used in the database yet.

The datatypes for numeric datatypes in MongoDB with Prisma are described here

Does anyone know a way to declare this explicitly?

Thanks in advance!

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Declaring a column as Int would by default mean that it's stored as 32bit integers. If you define a column as BigInt then those integers would be stored as 64bit integers.

Here's a reference of mapping between Prisma and MongoDB types: Reference

over 4 years ago · Santiago Trujillo Relatório

0

In addition to Nurul Sundarani helpful hint, I found some helpful information in Prisma's documentation here.

There is the possibility to explicitly refer to the Int datatype of MongoDB - in schema.prisma this must be entered as follows:

Index                       Int @db.Int // Explicit use of the 32bit integer of MongoDB

I use Prisma V3.14.0 here link.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda