You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

pgsql-ast-parser

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pgsql-ast-parser - npm Package Compare versions

Comparing version

to
1.3.3

2

package.json
{
"name": "pgsql-ast-parser",
"version": "1.3.2",
"version": "1.3.3",
"description": "Yet another simple Postgres SQL parser/modifier",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,2 +0,2 @@

import { Statement, Expr } from './syntax/ast';
import { Statement, Expr, QName } from './syntax/ast';
/** Parse the first SQL statement in the given text (discards the rest), and return its AST */

@@ -7,3 +7,4 @@ export declare function parseFirst(sql: string): Statement;

export declare function parse(sql: string, entry: 'expr'): Expr;
export declare function parse(sql: string, entry: 'qualified_name'): QName;
export declare function parseArrayLiteral(sql: string): string[];
//# sourceMappingURL=parser.d.ts.map

@@ -1,2 +0,2 @@

import { Statement, Expr, LOCATION } from './syntax/ast';
import { Statement, Expr, LOCATION, QName } from './syntax/ast';
import { Parser, Grammar } from 'nearley';

@@ -18,2 +18,3 @@ import sqlGrammar from './syntax/main.ne';

export function parse(sql: string, entry: 'expr'): Expr;
export function parse(sql: string, entry: 'qualified_name'): QName;
export function parse(sql: string, entry?: string): any {

@@ -20,0 +21,0 @@ if (!sqlCompiled) {

@@ -740,2 +740,18 @@ import 'mocha';

})
checkTreeExpr([`pg_catalog.set_config('search_path', '', false)`], {
type: 'call',
function: 'set_config',
namespace: 'pg_catalog',
args: [{
type: 'string',
value: 'search_path',
}, {
type: 'string',
value: '',
}, {
type: 'boolean',
value: false,
}]
})
});

@@ -742,0 +758,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet