{"library":"libpg-query","type":"library","category":null,"description":"libpg-query provides Node.js and browser bindings for `libpg_query`, the real PostgreSQL C parser, compiled to WebAssembly (WASM). This library offers 100% spec-accurate parsing of SQL queries into PostgreSQL's internal Abstract Syntax Tree (AST) format, supporting PostgreSQL versions 13 through 17. Its key differentiators include being entirely cross-platform with zero native dependencies, eliminating common `node-gyp` compilation headaches. The package currently ships as version 17.7.3 and generally releases updates in alignment with new PostgreSQL major versions. It is distinct from other parsers by using the actual PostgreSQL source code, ensuring fidelity, and provides full TypeScript support for robust development.","language":"javascript","status":"active","version":"17.7.3","tags":["javascript","sql","postgres","postgresql","pg","query","plpgsql","database","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install libpg-query","imports":["import { parse } from 'libpg-query';","import { parseSync } from 'libpg-query';\n// ... later, after module is loaded ...\nconst ast = parseSync(sql);","import { loadModule } from 'libpg-query';\nawait loadModule();"]},{"cmd":"yarn add libpg-query","imports":[]},{"cmd":"pnpm add libpg-query","imports":[]}],"homepage":null,"github":"https://github.com/constructive-io/libpg-query-node","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/libpg-query","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/libpg-query/compatibility"}}