1.0.7 • Published 2 years ago

prismany-esm v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Prismany

Query any number of databases with Prisma

example.png

Commands

Generate

npx prismany generate

  • Generates a Prisma client for every schema in your ./prisma directory

  • Clients can be imported via

    import { PrismaClientSchemaName, PrismaClientSchemaName2 } from '@prismany/client';
    • Eg: ./prisma/myCoolDb.prisma can be imported from:
    import { PrismaClientMyCoolDb } from '@prismany/client';
  • Note: The generate command will add a "client.output" path to each of your .prisma files

Push

npx prismany push

  • Runs prisma db push against all of your schemas

  • If any push fails, or requires confirmation, the command will terminate and you'll need to push the individual schema manually: npx prisma db push --schema=./prisma/myDb.prisma

Other

If you'd like to see other Prisma features supported, like migrate, please open an issue.

How it works

This CLI takes an approach similar to this wonderful answer on Prisma's Github. It uses the client.output path in your Prisma schema to make sure clients don't overwrite each other.

Prismany automates much of the manual effort involved in that approach, and crucially, reuses the same engine binary for all clients.

This brings each client from a minimum of 15MB down to just 80KB each.

Example app

https://github.com/JoeRoddy/prismany-example

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago