Repository

This page summarizes the information & use of the repository component.

Concepts

  • It is part of the Mandarine Data module.

  • It works as a bridge between your database & your application layer.

  • It does not accept the use of DI, but it is injectable.

Usage

Syntax:

@Repository()

Example

import { Repository, MandarineRepository } from "https://deno.land/x/mandarinets/mod.ts";

@Repository()
abstract class MyRepository extends MandarineRepository<YourModel> {

    constructor() {
        super(YourModel);
    }
    
}

Where YourModel is the instance that represents a database table.

Last updated