1.0.6 • Published 2 years ago

@motech-development/prisma v1.0.6

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

npm size sonar

@motech-development/prisma

NestJS module for Prisma

A NestJS module that allows you to interact with your database using Prisma.

Installation

Add @motech-development/prisma as a dependency.

# Yarn
yarn add @motech-development/prisma

# NPM
npm i @motech-development/prisma

Usage

Add the PrismaModule to your application.

import { PrismaModule } from '@motech-development/prisma';

@Module({
  imports: [PrismaModule],
})
class AppModule {}

The module will then make the PrismaService available to use.

import { PrismaService } from '@motech-development/prisma';

@Injectable()
class AppService {
  constructor(private readonly prismaService: PrismaService) {}

  public deleteUser(id: string): Promise<void> {
    await this.prismaServiceuser.delete({
      where: {
        id,
      },
    });
  }
}
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