UNPKG

@sentzunhat/zacatl

Version:

A modular, high-performance TypeScript microservice framework for Node.js, featuring layered architecture, dependency injection, and robust validation for building scalable APIs and distributed systems.

32 lines 850 B
import { createSequelizeAdapter } from '../../orm/sequelize/adapter-loader.js'; export class AbstractSequelizeRepository { adapter; constructor(config) { this.adapter = createSequelizeAdapter(config); } get model() { return this.adapter.model; } toLean(input) { return this.adapter.toLean(input); } async findById(id) { return this.adapter.findById(id); } async findMany(filter = {}) { return this.adapter.findMany(filter); } async create(entity) { return this.adapter.create(entity); } async update(id, update) { return this.adapter.update(id, update); } async delete(id) { return this.adapter.delete(id); } async exists(id) { return this.adapter.exists(id); } } //# sourceMappingURL=repository.js.map