Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

slonik

Package Overview
Dependencies
Maintainers
1
Versions
396
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slonik - npm Package Compare versions

Comparing version 35.1.0 to 35.2.0

8

dist/errors.d.ts

@@ -53,6 +53,10 @@ import { type PrimitiveValueExpression, type Query, type QueryResultRow } from './types';

type IntegrityConstraintViolationErrorCause = Error & {
constraint: string;
column?: string;
constraint?: string;
table?: string;
};
export declare class IntegrityConstraintViolationError extends SlonikError {
constraint: string;
constraint: string | null;
column: string | null;
table: string | null;
cause?: Error;

@@ -59,0 +63,0 @@ constructor(message: string, error: IntegrityConstraintViolationErrorCause);

@@ -93,7 +93,7 @@ "use strict";

constructor(message, error) {
var _a, _b, _c;
super(message, { cause: error });
if (!error.constraint) {
throw new Error('IntegrityConstraintViolationError requires constraint name.');
}
this.constraint = error.constraint;
this.constraint = (_a = error.constraint) !== null && _a !== void 0 ? _a : null;
this.column = (_b = error.column) !== null && _b !== void 0 ? _b : null;
this.table = (_c = error.table) !== null && _c !== void 0 ? _c : null;
}

@@ -100,0 +100,0 @@ }

@@ -100,3 +100,3 @@ {

"types": "./dist/index.d.ts",
"version": "35.1.0"
"version": "35.2.0"
}

@@ -116,8 +116,14 @@ import {

type IntegrityConstraintViolationErrorCause = Error & {
constraint: string;
column?: string;
constraint?: string;
table?: string;
};
export class IntegrityConstraintViolationError extends SlonikError {
public constraint: string;
public constraint: string | null;
public column: string | null;
public table: string | null;
public cause?: Error;

@@ -131,9 +137,7 @@

if (!error.constraint) {
throw new Error(
'IntegrityConstraintViolationError requires constraint name.',
);
}
this.constraint = error.constraint ?? null;
this.constraint = error.constraint;
this.column = error.column ?? null;
this.table = error.table ?? null;
}

@@ -140,0 +144,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc