Socket
Socket
Sign inDemoInstall

libpg-query

Package Overview
Dependencies
Maintainers
0
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libpg-query - npm Package Compare versions

Comparing version 15.1.3 to 15.2.0-deparse

libpg_query/protobuf/.gitkeep

2

index.d.ts

@@ -6,4 +6,6 @@ import { ParseResult } from "@pgsql/types";

export function parsePlPgSQLSync(funcsSql: string): any;
export function deparse(parseTree: any): Promise<string>;
export function deparseSync(parseTree: any): any;
export function fingerprint(sql: string): Promise<string>;
export function fingerprintSync(sql: string): string;
export * from '@pgsql/types';

@@ -1,3 +0,5 @@

const PgQuery = require('./build/Release/queryparser.node');
const PgQuery = require('./build/Release/queryparser');
const { pg_query } = require('./proto');
module.exports = {

@@ -12,2 +14,12 @@ parseQuery(query) {

deparse(parseTree) {
const msg = pg_query.ParseResult.fromObject(parseTree);
const data = pg_query.ParseResult.encode(msg).finish();
return new Promise((resolve, reject) => {
PgQuery.deparseAsync(data, (err, result) => {
err ? reject(err) : resolve(result);
});
});
},
parsePlPgSQL(query) {

@@ -25,2 +37,8 @@ return new Promise((resolve, reject) => {

deparseSync(parseTree) {
const msg = pg_query.ParseResult.fromObject(parseTree);
const data = pg_query.ParseResult.encode(msg).finish();
return PgQuery.deparseSync(data);
},
parsePlPgSQLSync(query) {

@@ -27,0 +45,0 @@ return JSON.parse(PgQuery.parsePlPgSQLSync(query));

9

package.json
{
"name": "libpg-query",
"version": "15.1.3",
"version": "15.2.0-deparse",
"description": "The real PostgreSQL query parser",

@@ -33,2 +33,3 @@ "homepage": "https://github.com/launchql/libpg-query-node",

"scripts": {
"protogen": "node ./script/protogen.js 15-latest",
"clean": "rimraf build",

@@ -47,3 +48,3 @@ "configure": "node-pre-gyp configure",

"binary:publish": "AWS_PROFILE=supabase-dev node-pre-gyp publish"
},
},
"author": "Dan Lynch <pyramation@gmail.com> (http://github.com/pyramation)",

@@ -56,2 +57,3 @@ "license": "LICENSE IN LICENSE",

"devDependencies": {
"@launchql/proto-cli": "1.25.0",
"@yamlize/cli": "^0.8.0",

@@ -66,4 +68,5 @@ "chai": "^3.5.0",

"@emnapi/runtime": "^0.43.1",
"@launchql/protobufjs": "7.2.6",
"@mapbox/node-pre-gyp": "^1.0.8",
"@pgsql/types": "^15.0.0",
"@pgsql/types": "^15.0.1",
"node-addon-api": "^7.0.0",

@@ -70,0 +73,0 @@ "node-gyp": "^10.0.1"

@@ -21,3 +21,2 @@ # libpg-query

</a>
</p>

@@ -24,0 +23,0 @@

import { getDefaultContext } from '@emnapi/runtime';
import { pg_query } from '../proto.js';
import PgQueryModule from './libpg-query.js';

@@ -33,2 +34,12 @@

export const deparse = awaitInit((parseTree) => {
const msg = pg_query.ParseResult.fromObject(parseTree);
const data = pg_query.ParseResult.encode(msg).finish();
return new Promise((resolve, reject) => {
PgQuery.deparseAsync(data, (err, result) => {
err ? reject(err) : resolve(result);
});
});
});
export const parsePlPgSQL = awaitInit((query) => {

@@ -35,0 +46,0 @@ return new Promise(async (resolve, reject) => {

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

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

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 too big to display

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