Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

210
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda