pqb 0.7.7 → 0.7.8

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.
package/dist/index.js CHANGED
@@ -3208,6 +3208,13 @@ class Adapter {
3208
3208
  constructor(_a) {
3209
3209
  var _b = _a, { types: types2 = defaultTypeParsers } = _b, config = __objRest$1(_b, ["types"]);
3210
3210
  this.types = types2;
3211
+ if (config.databaseURL) {
3212
+ config.connectionString = config.databaseURL;
3213
+ const url = new URL(config.databaseURL);
3214
+ if (url.searchParams.get("ssl") === "true") {
3215
+ config.ssl = true;
3216
+ }
3217
+ }
3211
3218
  this.pool = new pg.Pool(config);
3212
3219
  }
3213
3220
  async query(query, types2) {