@nsshunt/stsfhirpg 1.0.27 → 1.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16956,6 +16956,7 @@ var DBSTSCombo = class {
16956
16956
  };
16957
16957
  //#endregion
16958
16958
  //#region src/fhir-database/pg/pgfhiraccesslayer.ts
16959
+ import_source.default.level = 3;
16959
16960
  var PGFhirAccessLayer = class extends import_tiny_emitter.TinyEmitter {
16960
16961
  #options;
16961
16962
  #poolManager = null;
@@ -17559,6 +17560,21 @@ var PGFhirAccessLayer = class extends import_tiny_emitter.TinyEmitter {
17559
17560
  _nsshunt_stsutils.defaultLogger.error(`DBSTSResource:ExecuteReadQuery(): Connection Error: [${error}]`);
17560
17561
  }
17561
17562
  };
17563
+ TruncateAll = async () => {
17564
+ if (this.#poolManager) try {
17565
+ let client;
17566
+ client = await this.#poolManager.connectReadWrite();
17567
+ try {
17568
+ client.query("TRUNCATE TABLE stsresfhir, stsresfhirver, stsresfhirlink, stsresfhirstring, stsresfhirtoken, stsresfhirquantity, stsresfhirnumber, stsresfhiruri, stsresfhirdate, stsresfhircoords, stsresfhircombo");
17569
+ } catch (error) {
17570
+ _nsshunt_stsutils.defaultLogger.error(`DBSTSResource:TruncateAll(): Query Error: [${error}]`);
17571
+ } finally {
17572
+ client.release();
17573
+ }
17574
+ } catch (error) {
17575
+ _nsshunt_stsutils.defaultLogger.error(`DBSTSResource:TruncateAll(): Connection Error: [${error}]`);
17576
+ }
17577
+ };
17562
17578
  };
17563
17579
  //#endregion
17564
17580
  exports.DBSearchIndex = DBSearchIndex;