UNPKG

@accounter/server

Version:
33 lines 1 kB
import { __decorate, __metadata } from "tslib"; import { Injectable, Scope } from 'graphql-modules'; import { sql } from '@pgtyped/runtime'; import { TenantAwareDBClient } from '../../app-providers/tenant-db-client.js'; const getRecoveryData = sql ` SELECT * FROM accounter_schema.recovery;`; let RecoveryProvider = class RecoveryProvider { db; constructor(db) { this.db = db; } recoveryDataCache = null; getRecoveryData() { if (this.recoveryDataCache) { return this.recoveryDataCache; } this.recoveryDataCache = getRecoveryData.run(undefined, this.db); return this.recoveryDataCache; } clearCache() { this.recoveryDataCache = null; } }; RecoveryProvider = __decorate([ Injectable({ scope: Scope.Operation, global: true, }), __metadata("design:paramtypes", [TenantAwareDBClient]) ], RecoveryProvider); export { RecoveryProvider }; //# sourceMappingURL=recovery.provider.js.map