{"_id":"@avian-aero/knex-bigquery","_rev":"4-02a9b120003cdf1e8b19820f2cb40394","name":"@avian-aero/knex-bigquery","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@avian-aero/knex-bigquery","version":"1.0.0","description":"BigQuery dialect for Knex.js","main":"lib/index.js","author":{"name":"Ophir Yael","url":"https://github.com/ophiryael"},"repository":{"type":"git","url":"https://github.com/avian-aero/knex-bigquery.git"},"keywords":["knex","bigquery","dialect"],"license":"MIT","private":false,"dependencies":{"@google-cloud/bigquery":"^4.6.0"},"peerDependencies":{"knex":"^0.20.7"},"licenseText":"MIT License\n\nCopyright (c) 2020 Avian\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@avian-aero/knex-bigquery@1.0.0","dist":{"shasum":"a0921893ceb5407f3df1c20df491d575ba9a562e","integrity":"sha512-x8h9rNXZtochIp6q5paKv2hNc2FcF/3rMlmiYCy4r5ch8bOR1c21ji5ZJXl9Wh5DBS1mGEdlYtfDD4qEhcOoFg==","tarball":"https://registry.npmjs.org/@avian-aero/knex-bigquery/-/knex-bigquery-1.0.0.tgz","fileCount":6,"unpackedSize":4269,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFvtBCRA9TVsSAnZWagAAA+gP/2k4nteQ7GFN4qF3dV6u\nOa14Izsth9GUoCqt8xaktgTQGkBy3sWhfec9FbLDOOxyo4QHeEVjroEMA/n1\njurxFQR6LgbALBu76gZCwpZUiPw+FxAj6yiBagXO9qjjyYG2mKe9DtN7vNLX\nxGVfpv16gKkTyyTElk7yiLq82zC+V8BIlZG9nhuYlv+qOogGe/slwkTIljN3\n6oE+9X0R4KecoIUGbj1ob1GiFMUxzQq8GCk6vUtSvPFJfnEF0x++0WeJdpDl\nmSFAgnCl6Wh6Zsn3sSnUKOXcKZ5eFAR32fxooGk96fHv4L8PJLlIYXbOoFNU\nTpxPodPkL9e85nfl1ENlNto2Rfdi2c8itadb2FJ35VkssHtL99jNZTkPJzT2\nkAlc+tjbN2h1Vazgvna5Lq2FzcQrOpr13akET17L5BBRbWbKbTVds/bsUm0m\nvvFktLYvA4ONnDfIxaRq4fhba+oGBZvMPSG8ZfPwVbt+RSs3GOdG1EgkmTjV\nY8D5TAi0F8rItHT4QnfmbuXpGHRwWd2FMjZ4ajK+mz4HgvB2NPkgZvdV2m3Q\ngjRsC6mBqyGIivI/CZ8IrUbzNlOro9WJE+wYd6b7T20oa2wFn6FpRzUiUVie\naOdZXnj2ZQs09sY3eC8lO/Q/FyXkhdU/Mda5XcLfyCaRjgO2EszhMeTJjVaa\n/zJf\r\n=LZYi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCK5QDg1mLIJIcI8vzTGgL8vk3V3OVF1508Wvdf9I4rKgIhAPO9pSnhBj41S8bPs1vCO+E9C7qZss+JvoGJCnPPbjmb"}]},"maintainers":[{"name":"danielc-avian","email":"danielc@avian.aero"},{"name":"elena.avian","email":"elena@avian.aero"},{"name":"daniel.avian","email":"daniel@avian.aero"},{"name":"yophir","email":"ophir@avian.aero"},{"name":"oran.avian","email":"oran@avian.aero"}],"_npmUser":{"name":"yophir","email":"ophir@avian.aero"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/knex-bigquery_1.0.0_1578564416865_0.9147324324787238"},"_hasShrinkwrap":false,"deprecated":"New package name: knex-bigquery"},"1.0.1":{"name":"@avian-aero/knex-bigquery","version":"1.0.1","description":"BigQuery dialect for Knex.js","main":"lib/index.js","author":{"name":"Ophir Yael","url":"https://github.com/ophiryael"},"repository":{"type":"git","url":"https://github.com/avian-aero/knex-bigquery.git"},"keywords":["knex","bigquery","dialect"],"license":"MIT","private":false,"dependencies":{"@google-cloud/bigquery":"^4.6.0"},"peerDependencies":{"knex":"^0.20.7"},"licenseText":"MIT License\n\nCopyright (c) 2020 Avian\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@avian-aero/knex-bigquery@1.0.1","dist":{"shasum":"65dfc7c6b29b75fcf782d15bed7aa51e5b16a4b1","integrity":"sha512-FRpMF+FD5LanhyNOGW2gWCUfVZVHHckln3VSPULlagNjUGZ+eVdebwW/g9AxoWYI4BF2S71lus068H3bQSQSlA==","tarball":"https://registry.npmjs.org/@avian-aero/knex-bigquery/-/knex-bigquery-1.0.1.tgz","fileCount":6,"unpackedSize":4387,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFxV0CRA9TVsSAnZWagAAGZ4P/3N9eW5kSknPczT/RUoS\noZAb4iczApsrpSIhLikFpFboPFHZ5Wtr+o0vd0KE439ZGYBbsONnd83lnzGT\nKgTZ651PkiQKQvjqf/swsYE+8Y610fw9dLDwav+Q0gyGLd1jtQRXkduwVjt/\n3YZPhqjbQW3/5UAXt7bznIQP4l3erSiHVYPX5O+o/7wNSwjQ46loCUzesCCq\nbpZUKI74mMZ8/tsYML7jpsADT7F9yLrM7SLFThgqG6NGiWmOLUTCNNOsD8RK\nnlb5yzsjcBMYxOj2zH6wESID/bZisI8wAR9szK0la2+bNRD7e7BBG2RgYxr8\nhH0In8ifTi52M6n/DFGfzNmV5TjPwX2ZrQ/fBSk7Vg82YAyaWkYWYUXvrmUD\nD3XdqL7LkifUdcXvL3f19ZrFbYPBFEtVo68r4xSOmNHlyGhMI1ihnGLtrh3n\n/Y7DB5/bsbVJ4s3YfV+VIWHBm5Tk9oXKS9YCVJdt04MgCIb4P/9ubFJTvmvK\njVjlUHAFkspKzlqP9U1dWkt6RY2u/HAxZ1damWFpEGtmnoiNuGpCdt9zEfgN\ngm4aU2E+XPYMxhEU7cVLTZDY9L3mBnLJNWb7NlO+p/dyzQV/FntiZOIAs/jN\nR79XWt4C3b49IfNNs0lUIhLvP8+1tlkcv5dEh47qL+SG+9yY05Qd9rJ0WtOi\ncXzZ\r\n=GV5i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPTNgMMLMzRPH7+/Bn8O+gn+RdomMbygkzWyDS2KKJLwIgVewUsCJpKAf8fQEwL1MR/nTWajuwjEvz0uF2sFLWBN8="}]},"maintainers":[{"name":"daniel.avian","email":"daniel@avian.aero"},{"name":"danielc-avian","email":"danielc@avian.aero"},{"name":"elena.avian","email":"elena@avian.aero"},{"name":"oran.avian","email":"oran@avian.aero"},{"name":"yophir","email":"ophir@avian.aero"}],"_npmUser":{"name":"yophir","email":"ophir@avian.aero"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/knex-bigquery_1.0.1_1578571123899_0.15269464834066504"},"_hasShrinkwrap":false,"deprecated":"New package name: knex-bigquery"}},"time":{"created":"2020-01-09T10:06:56.675Z","1.0.0":"2020-01-09T10:06:56.992Z","modified":"2022-04-04T16:46:52.700Z","1.0.1":"2020-01-09T11:58:44.026Z"},"maintainers":[{"email":"oran@avian.aero","name":"oran.avian"}],"description":"BigQuery dialect for Knex.js","keywords":["knex","bigquery","dialect"],"repository":{"type":"git","url":"https://github.com/avian-aero/knex-bigquery.git"},"author":{"name":"Ophir Yael","url":"https://github.com/ophiryael"},"license":"MIT","readme":"# BigQuery Dialect for Knex.js\n\nBigQuery dialect for building and executing queries using Knex.js.\n\n**This library is in early stages of development. Use at your own risk.**\n\n## Installation\n\n```bash\n# Yarn:\nyarn add @avian-aero/knex-bigquery\n# NPM:\nnpm install @avian-aero/knex-bigquery\n```\n\n## Usage\n\n```js\nconst { BigQueryClient } = require('@avian-aero/knex-bigquery');\nconst knex = require('knex')({\n  client: BigQueryClient,\n  connection: {\n    projectId: 'bigquery-playground',\n    keyFilename: '/Users/dumbledore/playground-credentials.json'\n  },\n  pool: { min: 0, max: 5 }\n});\n\nasync function getCommonNames() {\n  const commonNames = await knex('bigquery-public-data.usa_names.usa_1910_2013')\n    .select('name', 'gender')\n    .sum('number as total')\n    .groupBy('name', 'gender')\n    .orderBy('total', 'desc')\n    .limit(3);\n\n  console.log(commonNames);\n  await knex.destroy();\n}\ngetCommonNames();\n// [\n//   { name: 'James', gender: 'M', total: 4924235 },\n//   { name: 'John', gender: 'M', total: 4818746 },\n//   { name: 'Robert', gender: 'M', total: 4703680 },\n// ]\n```\n\n## Connection\n\nConnection settings are passed to the BigQuery client library [constructor](https://googleapis.dev/nodejs/bigquery/latest/global.html#BigQueryOptions).  \nMake sure you pass a valid properties combination.\n","readmeFilename":"README.md"}