1.0.2 • Published 10 months ago

brackets-prisma-db v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

brackets-prisma-db

This implementation of the CrudInterface uses prisma to store the data in an SQL Database.

Warning This implementation has not been full tested yet. Use with caution.

Limitations

Currently there are some features of the manager that can't be used.

FeatureStatus
Custom ParticipantsImplemented
Custom MatchesNot Implemented

Usage

To use this implementation make sure you have prisma included in your project. A Guide on how to include prisma in your project can be found on the official documentation page.

Once prisma is included in your project copy the schema.prisma into your project. If you have an existing schema.prisma in your project copy and paste the schema definitions into your existing one.

Warning Do not rename any of the models or enums provided! This will break the implementation.

Next generate the prisma client using npx prisma generate. Lastly push the definition to your database using npx prisma db push.

import { SqlDatabase } from 'brackets-prisma-db';
import { prisma } from './client';
import { BracketsManager } from 'brackets-manager';

const storage = new SqlDatabase(prisma);
const manager = new BracketsManager(storage);