UNPKG

node-firebird-driver

Version:
25 lines 705 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AbstractEvents = void 0; /** AbstractStatement implementation. */ class AbstractEvents { constructor(attachment) { this.attachment = attachment; } /** Cancel this events' resources. */ async cancel() { this.check(); await this.internalCancel(); this.attachment?.events.delete(this); this.attachment = undefined; } get isValid() { return !!this.attachment; } check() { if (!this.isValid) throw new Error('Events are already cancelled.'); } } exports.AbstractEvents = AbstractEvents; //# sourceMappingURL=events.js.map