Socket
Book a DemoInstallSign in
Socket

pg-query-emscripten

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg-query-emscripten

Parse any valid PostgreSQL query in your browser using Javascript!

latest
Source
npmnpm
Version
5.1.0
Version published
Maintainers
1
Created
Source

pg-query-emscripten

Parse any valid PostgreSQL query in your browser using Javascript!

This builds a pure Javascript port of libpg_query using emscripten, that allows you to parse SQL in the browser into the PostgreSQL parse tree.

Example use cases might include automatically checking for bad query patterns (e.g. LIMIT/OFFSET), understanding which tables a query references, or using structural pg_dump output to produce a schema diagram on the fly.

Usage

npm install pg-query-emscripten --save
import Module from "pg-query-emscripten";

let pgQuery;

(async () => {
  pgQuery = await new Module();

  console.log(pgQuery.parse("select 1"));
})();

Author

LICENSE

Copyright (c) 2018 Lukas Fittl
Licensed under the MIT License.

Keywords

postgres

FAQs

Package last updated on 04 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.