Socket
Socket
Sign inDemoInstall

@dbpath/dal

Package Overview
Dependencies
4
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.9 to 0.2.10

6

dist/src/validator.d.ts
import { Summary } from "@dbpath/config";
import { DatabaseMetaData } from "./dal";
import { ErrorsAnd } from "@dbpath/utils";
import { TwoIds } from "@dbpath/types";
import { TwoIds, TwoIdsArray } from "@dbpath/types";
export type ValidateTableNameFn = (tableName: string) => string[];

@@ -15,3 +15,3 @@ export type ValidateFieldsFn = (tableName: string, fields: string[]) => string[];

validateLink: ValidateLinkFn;
useIdsOrSingleFkLinkOrError(fromTableName: string, toTableName: string, idEquals: TwoIds[]): TwoIds[];
useIdsOrSingleFkLinkOrError(fromTableName: string, toTableName: string, idEquals: TwoIds[]): ErrorsAnd<TwoIdsArray>;
actualTableName(tableName: string): string;

@@ -25,4 +25,4 @@ }

/** This should not throw an exception if the validation says there is a link */
export declare const useIdsOrSingleFkLinkOrError: (summary: Summary, m: DatabaseMetaData) => (fromTableName: string, toTableName: string, idEquals: TwoIds[]) => TwoIds[];
export declare const useIdsOrSingleFkLinkOrError: (summary: Summary, m: DatabaseMetaData) => (fromTableName: string, toTableName: string, idEquals: TwoIds[]) => ErrorsAnd<TwoIdsArray>;
export declare const validateLinks: (summary: Summary, m: DatabaseMetaData) => ValidateLinkFn;
export declare function DalPathValidator(summary: Summary, m: DatabaseMetaData): PathValidator;

@@ -10,3 +10,3 @@ "use strict";

useIdsOrSingleFkLinkOrError(fromTableName, toTableName, idEquals) {
return idEquals;
return { twoIds: idEquals };
},

@@ -71,6 +71,6 @@ actualTableName: t => t

if ((0, utils_1.hasErrors)(found))
throw Error(`Single FK link not found\n${found}`);
return [found];
return [`Single FK link not found`, ...found];
return { twoIds: [found] };
}
return idEquals;
return { twoIds: idEquals };
};

@@ -77,0 +77,0 @@ exports.useIdsOrSingleFkLinkOrError = useIdsOrSingleFkLinkOrError;

{
"name": "@dbpath/dal",
"description": "",
"version": "0.2.9",
"version": "0.2.10",
"main": "dist/index",

@@ -20,4 +20,4 @@ "types": "dist/index",

"dependencies": {
"@dbpath/config": "0.2.9",
"@dbpath/fixtures": "0.2.9"
"@dbpath/config": "0.2.10",
"@dbpath/fixtures": "0.2.10"
},

@@ -24,0 +24,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc