{"_id":"@benjie/pg-query-native","_rev":"1-75579f9ecd154e14c7a2b2c0c4717fcd","name":"@benjie/pg-query-native","description":"The real PostgreSQL query parser","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@benjie/pg-query-native","version":"2.0.0","description":"The real PostgreSQL query parser","homepage":"http://github.com/zhm/node-pg-query-native","main":"index.js","scripts":{"configure":"./node_modules/node-gyp/bin/node-gyp.js configure","build":"./node_modules/node-gyp/bin/node-gyp.js configure build","rebuild":"./node_modules/node-gyp/bin/node-gyp.js configure rebuild","test":"mocha","install":"node-gyp rebuild"},"author":{"name":"Zac McCormick","email":"zac.mccormick@gmail.com","url":"http://github.com/zhm"},"license":"BSD","repository":{"type":"git","url":"git://github.com/zhm/node-pg-query-native.git"},"devDependencies":{"mocha":"^2.5.3"},"dependencies":{"bindings":"^1.2.1","nan":"^2.3.5","node-gyp":"^3.3.1"},"keywords":["sql","postgres","postgresql","pg","query","database"],"files":["binding.gyp","functions.cc","functions.h","index.js","libpg_query/include/pg_query.h","libpg_query/linux/libpg_query.a","libpg_query/osx/libpg_query.a","pg-query.cc"],"gypfile":true,"gitHead":"5615f427af0f98cb89907d40f4fe397d21456b3c","bugs":{"url":"https://github.com/zhm/node-pg-query-native/issues"},"_id":"@benjie/pg-query-native@2.0.0","_npmVersion":"5.4.2","_nodeVersion":"8.8.1","_npmUser":{"name":"benjie","email":"npm@benjiegillam.com"},"dist":{"integrity":"sha512-33RjiXbLkeqTpPoIp9WdNEFRuTzAoBAUAJrPFp6CIiSWAgU7f4Knl0FzEpt9Gn+nOOE1YRObgfq/pYwp7vFV/Q==","shasum":"a24f2a161a2b5298e744d41be58d7be9ea61f92a","tarball":"https://registry.npmjs.org/@benjie/pg-query-native/-/pg-query-native-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBOtYuyrk90jR6g8pPMeXQDOFXqlBKvP0nI5+rulIsowIgeAmk5yQ8//wt4ba36Py0vRfqtF6XtJV6m1MwMx105fg="}]},"maintainers":[{"name":"benjie","email":"npm@benjiegillam.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pg-query-native-2.0.0.tgz_1516958204775_0.39968823501840234"}}},"readme":"# pg-query-native [![Build Status](https://travis-ci.org/zhm/node-pg-query-native.svg?branch=master)](https://travis-ci.org/zhm/node-pg-query-native)\n\nThe real PostgreSQL parser for nodejs.\n\nThis is based on the output of [libpg_query](https://github.com/lfittl/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\n## Installation\n\n```sh\nnpm install pg-query-native\n```\n\n### Documentation\n\n### `query.parse(query)`\n\nParses the query and returns the parse tree.\n\n### Parameters\n\n| parameter            | type               | description                                               |\n| -------------------- | ------------------ | --------------------------------------------------------- |\n| `query`              | String             | SQL query                                                 |\n\nReturns an object in the format:\n\n```\n{ query: <query|Object>,\n  error: { message: <message|String>,\n           fileName: <fileName|String>,\n           lineNumber: <line|Number>,\n           cursorPosition: <cursor|Number> }\n```\n\n## Example\n\n```js\nvar parse = require('pg-query-native').parse;\n\nconsole.log(parse('select 1').query);\n```\n\n## Related\n\n* [libpg_query](https://github.com/lfittl/libpg_query)\n* [pg_query](https://github.com/lfittl/pg_query)\n* [pg_query.go](https://github.com/lfittl/pg_query.go)\n","maintainers":[{"name":"benjie","email":"npm@benjiegillam.com"}],"time":{"modified":"2022-04-04T18:22:59.166Z","created":"2018-01-26T09:16:47.434Z","2.0.0":"2018-01-26T09:16:47.434Z"},"homepage":"http://github.com/zhm/node-pg-query-native","keywords":["sql","postgres","postgresql","pg","query","database"],"repository":{"type":"git","url":"git://github.com/zhm/node-pg-query-native.git"},"author":{"name":"Zac McCormick","email":"zac.mccormick@gmail.com","url":"http://github.com/zhm"},"bugs":{"url":"https://github.com/zhm/node-pg-query-native/issues"},"license":"BSD","readmeFilename":"README.md"}