About Prisma (ORM)
German Escobar

German Escobar @germanescobar

Location:
Medellín, Colombia
Joined:
Jan 27, 2020

About Prisma (ORM)

Publish Date: Sep 26 '23
0 0

Prisma is an interesting ORM with a different philosophy to Sequelize and others.

In Prisma you define a schema file with their own DSL called Prisma Schema Language (PSL) and you can create migrations updating the schema (Prisma will diff the file and create the migration file).

The good parts of Prisma:

  • Schema file (single source of truth).
  • Generated types are good. Everything is typed.
  • The API in general is easy to use.
  • Creating migrations by just changing the schema is a great idea (which has it's own drawbacks).

The bad parts:

  • CLI command names are clumsy.
  • Migrations break if you change multiple things.
  • No easy way to attach methods to models.
  • No easy way to handle validation errors.
  • No easy way to share transactions between functions.
  • No support for joins?

All in all Prisma is a great project but not one I would recommend right now.

Comments 0 total

    Add comment