@kerthin/domain
Version:
Kerthin Domain (based on DDD)
40 lines • 1.38 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Repository = void 0;
const static_repository_1 = require("./static-repository");
class Repository {
count(where, options) {
const repo = static_repository_1.StaticRepository.getRepo();
return repo.count(where, options);
}
find(where, options) {
const repo = static_repository_1.StaticRepository.getRepo();
return repo.find(where, options);
}
findOne(where, options) {
const repo = static_repository_1.StaticRepository.getRepo();
return repo.findOne(where, options);
}
findOneById(id) {
const repo = static_repository_1.StaticRepository.getRepo();
return repo.findOneById(id);
}
findAndCount(where, options) {
const repo = static_repository_1.StaticRepository.getRepo();
return repo.findAndCount(where, options);
}
insert(data) {
const repo = static_repository_1.StaticRepository.getRepo();
return repo.insert(data);
}
update(data) {
const repo = static_repository_1.StaticRepository.getRepo();
return repo.update(data);
}
delete(data) {
const repo = static_repository_1.StaticRepository.getRepo();
return repo.delete(data);
}
}
exports.Repository = Repository;
//# sourceMappingURL=repository.js.map