pqb 0.7.6 → 0.7.7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # pqb
2
2
 
3
+ ## 0.7.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Change QueryError implemetation details
8
+
3
9
  ## 0.7.6
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { PoolConfig, Pool, PoolClient, DatabaseError } from 'pg';
1
+ import { PoolConfig, Pool, PoolClient } from 'pg';
2
2
 
3
3
  declare type AliasOrTable<T extends Pick<Query, 'tableAlias' | 'table'>> = T['tableAlias'] extends string ? T['tableAlias'] : T['table'] extends string ? T['table'] : never;
4
4
  declare type StringKey<K extends PropertyKey> = Exclude<K, symbol | number>;
@@ -819,7 +819,7 @@ declare class QueryError<T extends {
819
819
  shape: ColumnsShape;
820
820
  } = {
821
821
  shape: ColumnsShape;
822
- }> extends DatabaseError {
822
+ }> extends Error {
823
823
  message: string;
824
824
  name: QueryErrorName;
825
825
  stack: string | undefined;
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { DatabaseError, types, Pool } from 'pg';
1
+ import { types, Pool, DatabaseError } from 'pg';
2
2
 
3
3
  var __defProp$q = Object.defineProperty;
4
4
  var __defProps$k = Object.defineProperties;
@@ -773,7 +773,7 @@ const aggregateToSql = (ctx, model, item, quotedAs) => {
773
773
 
774
774
  class PormError extends Error {
775
775
  }
776
- class QueryError extends DatabaseError {
776
+ class QueryError extends Error {
777
777
  get isUnique() {
778
778
  return this.code === "23505";
779
779
  }