{"_id":"@au-re/libpg-query","_rev":"3-048b5ce7374a1d03b1fe5bede94859ca","name":"@au-re/libpg-query","dist-tags":{"latest":"16.3.3"},"versions":{"16.3.0":{"name":"@au-re/libpg-query","version":"16.3.0","keywords":["sql","postgres","postgresql","pg","query","plpgsql","database"],"author":{"url":"http://github.com/pyramation","name":"Dan Lynch","email":"pyramation@gmail.com"},"license":"LICENSE IN LICENSE","_id":"@au-re/libpg-query@16.3.0","maintainers":[{"name":"au-re","email":"aurelienhf@hotmail.com"}],"homepage":"https://github.com/launchql/libpg-query-node","bugs":{"url":"https://github.com/launchql/libpg-query-node/issues"},"dist":{"shasum":"c220d4000cd62a49a74c6acc15caa6b5d4494017","tarball":"https://registry.npmjs.org/@au-re/libpg-query/-/libpg-query-16.3.0.tgz","fileCount":29,"integrity":"sha512-IXy7u14hlxxBZjGoqArzuMj5q+pnZ+UodeIL7IG8Rgndv41A6BHLgr+Qr8wwQmge2P6G2SMnLq8VjX67SYqQcQ==","signatures":[{"sig":"MEYCIQDncYJwstkpeAsMxoxRINH8UOjMSeM2mf0NFyGeEoYxgQIhAKwfigqwRPd/wWE8QGSvV71dAnqEVFnjG6PYaGAOj1ij","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20307537},"main":"index.js","binary":{"host":"https://gnbyoxcowpfpalflhptv.supabase.co/storage/v1/s3","bucket":"public-artifacts","region":"us-east-1","module_name":"queryparser","module_path":"./build/Release/","remote_path":"./libpg-query-node/","s3ForcePathStyle":true},"exports":{".":{"node":"./index.js","types":"./index.d.ts","browser":"./wasm/index.js","default":"./index.js"},"./wasm":{"types":"./index.d.ts","default":"./wasm/index.js"}},"gitHead":"844f85357c394d3b3b150f5f9dd26021cab19c04","scripts":{"test":"mocha --timeout 5000","clean":"rimraf build","install":"node-pre-gyp install --fallback-to-build --loglevel verbose","rebuild":"node-pre-gyp rebuild --loglevel verbose","protogen":"node ./script/protogen.js 16-latest","clean:all":"npm run clean && npm run wasm:clean && npm run wasm:clean-cache","configure":"node-pre-gyp configure","wasm:make":"docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk emmake make","wasm:build":"npm run wasm:make build","wasm:clean":"npm run wasm:make clean","binary:build":"node-pre-gyp rebuild package","wasm:rebuild":"npm run wasm:make rebuild","binary:publish":"AWS_PROFILE=supabase-dev node-pre-gyp publish","wasm:clean-cache":"npm run wasm:make clean-cache"},"typings":"index.d.ts","_npmUser":{"name":"au-re","email":"aurelienhf@hotmail.com"},"repository":{"url":"git://github.com/launchql/libpg-query-node.git","type":"git"},"_npmVersion":"10.9.0","description":"The real PostgreSQL query parser","directories":{},"_nodeVersion":"20.9.0","dependencies":{"node-gyp":"^10.0.1","node-addon-api":"^7.0.0","@emnapi/runtime":"^0.43.1","@launchql/protobufjs":"7.2.6","@mapbox/node-pre-gyp":"^1.0.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","mocha":"^5.2.0","emnapi":"^0.43.1","lodash":"^4.17.15","rimraf":"5.0.0","@yamlize/cli":"^0.8.0"},"_npmOperationalInternal":{"tmp":"tmp/libpg-query_16.3.0_1730133604740_0.14815708655353932","host":"s3://npm-registry-packages"}},"16.3.1":{"name":"@au-re/libpg-query","version":"16.3.1","keywords":["sql","postgres","postgresql","pg","query","plpgsql","database"],"author":{"url":"http://github.com/pyramation","name":"Dan Lynch","email":"pyramation@gmail.com"},"license":"LICENSE IN LICENSE","_id":"@au-re/libpg-query@16.3.1","maintainers":[{"name":"au-re","email":"aurelienhf@hotmail.com"}],"homepage":"https://github.com/launchql/libpg-query-node","bugs":{"url":"https://github.com/launchql/libpg-query-node/issues"},"dist":{"shasum":"db951d321970fb52bf6ae4943b10557634998c2d","tarball":"https://registry.npmjs.org/@au-re/libpg-query/-/libpg-query-16.3.1.tgz","fileCount":29,"integrity":"sha512-wJZktnbZB8n9attrKX18VTD09dY37EHzv3AsAe9uQ+wSMhUfk1LgxBtGzgK8ecxvJvB7gerpi/DR4FQwEYcrmQ==","signatures":[{"sig":"MEYCIQD9o32ous/MV846n6+rz2jufMuUYFcylgA2qtLWct+TXwIhALV3CYqHsbR97XgN1ZQGND8hz/BAx0+Csk1yZ2zHuscN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20307899},"main":"index.js","binary":{"host":"https://gnbyoxcowpfpalflhptv.supabase.co/storage/v1/s3","bucket":"public-artifacts","region":"us-east-1","module_name":"queryparser","module_path":"./build/Release/","remote_path":"./libpg-query-node/","s3ForcePathStyle":true},"exports":{".":{"node":"./index.js","types":"./index.d.ts","browser":"./wasm/index.js","default":"./index.js"},"./wasm":{"types":"./index.d.ts","default":"./wasm/index.js"}},"gitHead":"f2e057179f7663a4ac433d4bf6f71f19cab6f65f","scripts":{"test":"mocha --timeout 5000","clean":"rimraf build","install":"node-pre-gyp install --fallback-to-build --loglevel verbose","rebuild":"node-pre-gyp rebuild --loglevel verbose","protogen":"node ./script/protogen.js 16-latest","clean:all":"npm run clean && npm run wasm:clean && npm run wasm:clean-cache","configure":"node-pre-gyp configure","wasm:make":"docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk emmake make","wasm:build":"npm run wasm:make build","wasm:clean":"npm run wasm:make clean","binary:build":"node-pre-gyp rebuild package","wasm:rebuild":"npm run wasm:make rebuild","binary:publish":"AWS_PROFILE=supabase-dev node-pre-gyp publish","wasm:clean-cache":"npm run wasm:make clean-cache"},"typings":"index.d.ts","_npmUser":{"name":"au-re","email":"aurelienhf@hotmail.com"},"repository":{"url":"git://github.com/launchql/libpg-query-node.git","type":"git"},"_npmVersion":"10.9.0","description":"The real PostgreSQL query parser","directories":{},"_nodeVersion":"20.9.0","dependencies":{"node-gyp":"^10.0.1","node-addon-api":"^7.0.0","@emnapi/runtime":"^0.43.1","@launchql/protobufjs":"7.2.6","@mapbox/node-pre-gyp":"^1.0.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","mocha":"^5.2.0","emnapi":"^0.43.1","lodash":"^4.17.15","rimraf":"5.0.0","@yamlize/cli":"^0.8.0"},"_npmOperationalInternal":{"tmp":"tmp/libpg-query_16.3.1_1730137108494_0.8745633838746605","host":"s3://npm-registry-packages"}},"16.3.2":{"name":"@au-re/libpg-query","version":"16.3.2","keywords":["sql","postgres","postgresql","pg","query","plpgsql","database"],"author":{"url":"http://github.com/pyramation","name":"Dan Lynch","email":"pyramation@gmail.com"},"license":"LICENSE IN LICENSE","_id":"@au-re/libpg-query@16.3.2","maintainers":[{"name":"au-re","email":"aurelienhf@hotmail.com"}],"homepage":"https://github.com/launchql/libpg-query-node","bugs":{"url":"https://github.com/launchql/libpg-query-node/issues"},"dist":{"shasum":"3bb421799aa5a25eb2499f9edab19e883d67293e","tarball":"https://registry.npmjs.org/@au-re/libpg-query/-/libpg-query-16.3.2.tgz","fileCount":30,"integrity":"sha512-8l6o+RKa0wXoIs3JxWZ0R7IvjWkjEqIK6DbxAFG3M7jcbUiceWuWJJ7/19fgeDDo3Wlf4czRonblIlDAKhrEMg==","signatures":[{"sig":"MEQCIBEk1LC9EwAat7iXwGYJMEqDgaC0hMy9VoEdF11c+9qHAiA7ip0t5A5rmJOC2lyyOS3JwGEF2ymYwmvC45XWFtojEw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25386184},"main":"index.js","binary":{"host":"https://gnbyoxcowpfpalflhptv.supabase.co/storage/v1/s3","bucket":"public-artifacts","region":"us-east-1","module_name":"queryparser","module_path":"./build/Release/","remote_path":"./libpg-query-node/","s3ForcePathStyle":true},"exports":{".":{"node":"./index.js","types":"./index.d.ts","browser":"./wasm/index.js","default":"./index.js"},"./wasm":{"types":"./index.d.ts","default":"./wasm/index.js"}},"gitHead":"a4a3bbca454a2079747b56d45e5d2aca7bdfa9de","scripts":{"test":"mocha --timeout 5000","clean":"rimraf build","install":"node-pre-gyp install --fallback-to-build --loglevel verbose","rebuild":"node-pre-gyp rebuild --loglevel verbose","protogen":"node ./script/protogen.js 16-latest","clean:all":"npm run clean && npm run wasm:clean && npm run wasm:clean-cache","configure":"node-pre-gyp configure","wasm:make":"docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk emmake make","wasm:build":"npm run wasm:make build","wasm:clean":"npm run wasm:make clean","binary:build":"node-pre-gyp rebuild package","wasm:rebuild":"npm run wasm:make rebuild","binary:publish":"AWS_PROFILE=supabase-dev node-pre-gyp publish","wasm:clean-cache":"npm run wasm:make clean-cache"},"typings":"index.d.ts","_npmUser":{"name":"au-re","email":"aurelienhf@hotmail.com"},"repository":{"url":"git://github.com/launchql/libpg-query-node.git","type":"git"},"_npmVersion":"10.9.0","description":"The real PostgreSQL query parser","directories":{},"_nodeVersion":"20.9.0","dependencies":{"node-gyp":"^10.0.1","node-addon-api":"^7.0.0","@emnapi/runtime":"^0.43.1","@launchql/protobufjs":"7.2.6","@mapbox/node-pre-gyp":"^1.0.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","mocha":"^5.2.0","emnapi":"^0.43.1","lodash":"^4.17.15","rimraf":"5.0.0","@yamlize/cli":"^0.8.0"},"_npmOperationalInternal":{"tmp":"tmp/libpg-query_16.3.2_1730138431831_0.4400014448575802","host":"s3://npm-registry-packages"}},"16.3.3":{"name":"@au-re/libpg-query","version":"16.3.3","description":"The real PostgreSQL query parser","homepage":"https://github.com/launchql/libpg-query-node","main":"index.js","typings":"index.d.ts","publishConfig":{"access":"public"},"exports":{".":{"types":"./index.d.ts","browser":"./wasm/index.js","node":"./index.js","default":"./index.js"},"./wasm":{"types":"./index.d.ts","default":"./wasm/index.js"}},"scripts":{"protogen":"node ./script/protogen.js 16-latest","clean":"rimraf build","configure":"node-pre-gyp configure","install":"node-pre-gyp install --fallback-to-build --loglevel verbose","rebuild":"node-pre-gyp rebuild --loglevel verbose","wasm:make":"docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk emmake make","wasm:build":"npm run wasm:make build","wasm:rebuild":"npm run wasm:make rebuild","wasm:clean":"npm run wasm:make clean","wasm:clean-cache":"npm run wasm:make clean-cache","test":"mocha --timeout 5000","binary:build":"node-pre-gyp rebuild package","binary:publish":"AWS_PROFILE=supabase-dev node-pre-gyp publish","clean:all":"npm run clean && npm run wasm:clean && npm run wasm:clean-cache"},"author":{"name":"Dan Lynch","email":"pyramation@gmail.com","url":"http://github.com/pyramation"},"license":"LICENSE IN LICENSE","repository":{"type":"git","url":"git://github.com/launchql/libpg-query-node.git"},"devDependencies":{"@yamlize/cli":"^0.8.0","chai":"^3.5.0","emnapi":"^0.43.1","lodash":"^4.17.15","mocha":"^5.2.0","rimraf":"5.0.0"},"dependencies":{"@emnapi/runtime":"^0.43.1","@launchql/protobufjs":"7.2.6","@mapbox/node-pre-gyp":"^1.0.8","node-addon-api":"^7.0.0","node-gyp":"^10.0.1"},"keywords":["sql","postgres","postgresql","pg","query","plpgsql","database"],"binary":{"module_name":"queryparser","module_path":"./build/Release/","host":"https://gnbyoxcowpfpalflhptv.supabase.co/storage/v1/s3","remote_path":"./libpg-query-node/","bucket":"public-artifacts","region":"us-east-1","s3ForcePathStyle":true},"_id":"@au-re/libpg-query@16.3.3","gitHead":"aeeacdeaed895e4380dc95b66eb54065e7e35827","bugs":{"url":"https://github.com/launchql/libpg-query-node/issues"},"_nodeVersion":"20.9.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-TPg+P9OsYfCzFWnyLlpNWG53FC5opDSeaVkAGtK1j1QzZb2FH0+xnmOIX8/hup/TOLrTH/pNnIbHyYh+ujhjsA==","shasum":"9b8d8f9d92e1b118fb9f2b2fb3344c3aa9befa7e","tarball":"https://registry.npmjs.org/@au-re/libpg-query/-/libpg-query-16.3.3.tgz","fileCount":30,"unpackedSize":25386194,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRQ4apE2aAAJT4ALoS5BqoQi29yO4YX20QhD9U8l+71AIgLRrNIwDK/q/bgG1W9UUEDj6uakpYu+u6NCrL+Ra/skQ="}]},"_npmUser":{"name":"au-re","email":"aurelienhf@hotmail.com"},"directories":{},"maintainers":[{"name":"au-re","email":"aurelienhf@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/libpg-query_16.3.3_1730145979067_0.19125188105089674"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-28T16:40:04.605Z","modified":"2024-10-28T20:06:19.724Z","16.3.0":"2024-10-28T16:40:05.086Z","16.3.1":"2024-10-28T17:38:28.786Z","16.3.2":"2024-10-28T18:00:32.101Z","16.3.3":"2024-10-28T20:06:19.529Z"},"bugs":{"url":"https://github.com/launchql/libpg-query-node/issues"},"author":{"name":"Dan Lynch","email":"pyramation@gmail.com","url":"http://github.com/pyramation"},"license":"LICENSE IN LICENSE","homepage":"https://github.com/launchql/libpg-query-node","keywords":["sql","postgres","postgresql","pg","query","plpgsql","database"],"repository":{"type":"git","url":"git://github.com/launchql/libpg-query-node.git"},"description":"The real PostgreSQL query parser","maintainers":[{"name":"au-re","email":"aurelienhf@hotmail.com"}],"readme":"# libpg-query\n\n<p align=\"center\" width=\"100%\">\n    <img src=\"https://github.com/launchql/libpg-query-node/assets/545047/5fd420cc-cdc6-4211-9b0f-0eca8321ba72\" alt=\"webincubator\" width=\"100\">\n</p>\n\n<p align=\"center\" width=\"100%\">\n   <a href=\"https://www.npmjs.com/package/libpg-query\"><img height=\"20\" src=\"https://img.shields.io/npm/dt/libpg-query\"></a>\n   <a href=\"https://www.npmjs.com/package/libpg-query\"><img height=\"20\" src=\"https://img.shields.io/npm/dw/libpg-query\"/></a>\n   <a href=\"https://github.com/launchql/libpg-query/blob/main/LICENSE-MIT\"><img height=\"20\" src=\"https://img.shields.io/badge/license-MIT-blue.svg\"/></a>\n   <a href=\"https://www.npmjs.com/package/libpg-query\"><img height=\"20\" src=\"https://img.shields.io/github/package-json/v/launchql/libpg-query-node\"/></a><br />\n   <a href=\"https://github.com/launchql/libpg-query-node/actions/workflows/run-tests-linux.yml\">\n    <img height=\"20\" src=\"https://github.com/launchql/libpg-query-node/actions/workflows/run-tests-linux.yml/badge.svg\" />\n   </a>\n   <a href=\"https://github.com/launchql/libpg-query-node/actions/workflows/run-tests-mac.yml\">\n    <img height=\"20\" src=\"https://github.com/launchql/libpg-query-node/actions/workflows/run-tests-mac.yml/badge.svg\" />\n   </a>\n   <a href=\"https://github.com/launchql/libpg-query-node/actions/workflows/run-tests-win.yml\">\n    <img height=\"20\" src=\"https://github.com/launchql/libpg-query-node/actions/workflows/run-tests-win.yml/badge.svg\" />\n   </a>\n\n</p>\n\nThe real PostgreSQL parser, exposed for nodejs.\n\nPrimarily used for the node.js parser and deparser [pgsql-parser](https://github.com/pyramation/pgsql-parser)\n\n\n## Table of Contents\n\n1. [Installation](#installation)\n2. [Example](#example)\n5. [Documentation](#documentation)\n3. [Versions](#versions)\n4. [Building a binary distribution](#building-a-binary-distribution)\n6. [Related Projects](#related-projects)\n7. [Credit](#credit)\n\n\n## Installation\n\n```sh\nnpm install libpg-query\n```\n\n## Example\n\n```js\nconst parser = require('libpg-query');\nparser.parseQuery('select 1').then(console.log);\n```\n\n### Documentation\n\n### `query.parseQuery(sql)`/`parseQuerySync`\n\nParses the sql and returns a Promise for the parse tree (or returns the parse tree directly in the sync version). May reject with/throw a parse error.\n\nThe return value is an array, as multiple queries may be provided in a single string (semicolon-delimited, as Postgres expects).\n\n### `query.parsePlPgSQL(funcsSql)`/`query.parsePlPgSQLSync(funcsSql)`\n\nParses the contents of a PL/PGSql function, from a `CREATE FUNCTION` declaration, and returns a Promise for the parse tree (or returns the parse tree directly in the sync version). May reject with/throw a parse error.\n\n## Versions\n\nOur latest is built with `16-latest` branch from libpg_query\n\n\n| PG Major Version | libpg_query | Branch                                                                                         | npm \n|--------------------------|-------------|------------------------------------------------------------------------------------------------|---------|\n| 16                       | 16-latest   | [`16-latest`](https://github.com/launchql/libpg-query-node/tree/16-latest)                       | [`libpg-query@16.2.0`](https://www.npmjs.com/package/libpg-query/v/latest)\n| 15                       | 15-latest   | [`15-latest`](https://github.com/launchql/libpg-query-node/tree/15-latest)                       | [`libpg-query@15.1.0`](https://www.npmjs.com/package/libpg-query/v/15.1.0)\n| 14                       | 14-latest   | [`14-latest`](https://github.com/launchql/libpg-query-node/tree/14-latest)                       | [`libpg-query@14.0.0`](https://www.npmjs.com/package/libpg-query/v/14.0.0)\n| 13                       | 13-latest   | [`13-latest`](https://github.com/launchql/libpg-query-node/tree/13-latest)                       | [`libpg-query@13.3.1`](https://www.npmjs.com/package/libpg-query/v/13.3.1)\n| 12                       | (n/a)       |                                                                                                |\n| 11                       | (n/a)       |                                                                                                |\n| 10                       | 10-latest   |                        | `@1.3.1` ([tree](https://github.com/pyramation/pgsql-parser/tree/39b7b1adc8914253226e286a48105785219a81ca))      |\n\n\n## Building a binary distribution\n\n- Install requirements (`npm i`)\n- `npx node-pre-gyp rebuild package`\n- With appropriate AWS credentials configured, `npx node-pre-gyp publish`\n\nOr you can run the scripts\n\n```\nnpm run binary:build\nnpm run binary:publish\n```\n\n## Related Projects\n\n* [libpg_query](https://github.com/pganalyze/libpg_query)\n* [pgsql-parser](https://github.com/pyramation/pgsql-parser)\n* [pg_query](https://github.com/lfittl/pg_query)\n* [pg_query.go](https://github.com/lfittl/pg_query.go)\n\n## Credit\n\nThis is based on the output of [libpg_query](https://github.com/pganalyze/libpg_query). This wraps the static library output and links it into a node module for use in js.\n\nAll credit for the hard problems goes to [Lukas Fittl](https://github.com/lfittl).\n\nAdditional thanks for node binding [Ethan Resnick](https://github.com/ethanresnick).\n\nOriginal [Code](https://github.com/zhm/node-pg-query-native) and [License](https://github.com/zhm/node-pg-query-native/blob/master/LICENSE.md)\n","readmeFilename":"README.md"}