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

@dbpath/pathparser

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dbpath/pathparser - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

dist/src/path.d.ts

26

dist/src/parser.d.ts
import { Token } from "./tokeniser";
import { ErrorsAnd } from "@dbpath/utils";
import { PathValidator, TwoIds } from "@dbpath/dal";
export interface RawTableResult {
import { LinkInPath, PathItem, TableInPath } from "./path";
export interface TableAndFullTableName {
table: string;
fullTable?: string;
fields?: string[];
}
export interface RawLinkWithoutIdEqualsResult extends RawTableResult {
previousLink?: RawLinkResult;
}
export interface RawLinkResult extends RawLinkWithoutIdEqualsResult {
idEquals: TwoIds[];
}
export type Result = RawTableResult;
export type Result = TableInPath;
export interface ParserContext {

@@ -27,6 +21,2 @@ tokens: Token[];

export declare const identifier: (type: string) => (context: ParserContext) => ResultAndContext<string>;
export interface TableAndFullTableName {
table: string;
fullTable?: string;
}
export declare function gotForError(c: ParserContext): string;

@@ -38,7 +28,7 @@ export declare function parseCommaSeparated<R>(c: ParserContext, comma: string, parser: PathParser<R>): ResultAndContext<R[]>;

export declare function parseTableName(context: ParserContext): ResultAndContext<TableAndFullTableName>;
export declare const parseTable: (context: ParserContext) => ResultAndContext<RawTableResult>;
export declare const parseTableAndNextLink: (previousTable: RawTableResult | undefined, idEquals: TwoIds[]) => PathParser<RawLinkWithoutIdEqualsResult>;
export declare const parseLink: (previousTable: RawTableResult | undefined) => PathParser<RawLinkResult>;
export declare const parseTableAndLinks: PathParser<RawLinkResult | RawTableResult>;
export declare const parsePath: (validator: PathValidator) => (s: string) => ErrorsAnd<RawLinkResult | RawTableResult>;
export declare const parseTable: (context: ParserContext) => ResultAndContext<TableInPath>;
export declare const parseTableAndNextLink: (previousTable: TableInPath | undefined, idEquals: TwoIds[]) => PathParser<LinkInPath>;
export declare const parseLink: (previousTable: TableInPath | undefined) => PathParser<LinkInPath>;
export declare const parseTableAndLinks: PathParser<PathItem>;
export declare const parsePath: (validator: PathValidator) => (s: string) => ErrorsAnd<LinkInPath | TableInPath>;
export declare function errorData<R>(pr: ResultAndContext<R>, s: string): {

@@ -45,0 +35,0 @@ error: string[];

@@ -5,4 +5,2 @@ "use strict";

const tokeniser_1 = require("./tokeniser");
;
;
const identifier = (type) => (context) => {

@@ -112,4 +110,6 @@ var pos = context.pos;

const parseTableAndLinks = c => mapParser((0, exports.parseTable)(c), (c, previousLink) => {
if (isNextChar(c, '.'))
return (0, exports.parseLink)(previousLink)(c);
if (isNextChar(c, '.')) {
const linkInPathResultAndContext = (0, exports.parseLink)(previousLink)(c);
return linkInPathResultAndContext;
}
else

@@ -116,0 +116,0 @@ return lift(c, previousLink);

@@ -225,2 +225,6 @@ "use strict";

return [];
},
useIdsOrSingleFkLinkOrError: (fromTableName, toTableName, idEquals) => {
remembered.push(`useIdsOrSingleFkLinkOrError(${fromTableName},${toTableName}) ${idEquals}`);
return idEquals;
}

@@ -227,0 +231,0 @@ };

{
"name": "@dbpath/pathparser",
"description": "",
"version": "0.2.1",
"version": "0.2.2",
"main": "dist/index",

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

"dependencies": {
"@dbpath/dal": "0.2.1",
"@dbpath/utils": "0.2.1"
"@dbpath/types": "0.2.2",
"@dbpath/utils": "0.2.2"
},

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

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