{"name":"knex","version":"0.95.0-next2","description":"A batteries-included SQL query & schema builder for Postgres, MySQL and SQLite3 and the Browser","main":"knex.js","types":"types/index.d.ts","engines":{"node":">=10"},"scripts":{"format":"prettier --write \"{lib,bin,scripts,test}/**/*.js\"","debug:test":"mocha --inspect-brk --exit -t 0 test/all-tests-suite.js","debug:tape":"node --inspect-brk test/tape/index.js","coveralls":"nyc report --reporter=lcov","lint":"eslint \"lib/**/*.js\" \"test/**/*.js\"","lint:types":"tsd && dtslint types","lint:everything":"npm run lint:types && npm run lint","test:unit":"npm run test:unit-only && npm run test:cli","test:unit-only":"mocha --exit -t 10000 --config test/mocha-unit-config-test.js","test:db":"mocha --exit -t 10000 --config test/mocha-integration-config-test.js && npm run test:tape","test:db:coverage":"nyc mocha --exit --check-leaks -t 10000 --config test/mocha-integration-config-test.js && npm run test:tape","test:db:no-oracle":"cross-env DB=\"mssql mysql mysql2 postgres sqlite3\" mocha --exit -t 10000 --config test/mocha-integration-config-test.js && npm run test:tape","test":"mocha --exit -t 10000 --config test/mocha-all-config-test.js && npm run test:tape && npm run test:cli","test:coverage":"nyc mocha --exit --check-leaks -t 10000 --config test/mocha-all-config-test.js && npm run test:tape && npm run test:cli","test:everything":"npm run lint:everything && npm run test:coverage","test:mssql":"cross-env DB=mssql npm run test:db","test:mysql":"cross-env DB=mysql npm run test:db","test:mysql2":"cross-env DB=mysql2 npm run test:db","test:sqlite":"cross-env DB=sqlite3 npm run test:db","test:postgres":"cross-env DB=postgres npm run test:db","test:tape":"node test/tape/index.js | tap-spec","test:cli":"cross-env KNEX_PATH=../knex.js KNEX=bin/cli.js jake -f test/jake/Jakefile","db:start":"docker-compose -f scripts/docker-compose.yml up --build -d mysql oracledbxe postgres mssql && docker-compose -f scripts/docker-compose.yml up waitmssql waitmysql waitpostgres waitoracledbxe","db:start:no-oracle":"docker-compose -f scripts/docker-compose.yml up --build -d mysql postgres mssql && docker-compose -f scripts/docker-compose.yml up waitmssql waitmysql waitpostgres","db:stop":"docker-compose -f scripts/docker-compose.yml down","db:start:postgres":"docker-compose -f scripts/docker-compose.yml up --build -d postgres && docker-compose -f scripts/docker-compose.yml up waitpostgres","db:stop:postgres":"docker-compose -f scripts/docker-compose.yml down","db:start:mysql":"docker-compose -f scripts/docker-compose.yml up --build -d mysql && docker-compose -f scripts/docker-compose.yml up waitmysql","db:stop:mysql":"docker-compose -f scripts/docker-compose.yml down","stress:init":"docker-compose -f scripts/stress-test/docker-compose.yml up --no-start && docker-compose -f scripts/stress-test/docker-compose.yml start","stress:test":"node scripts/stress-test/knex-stress-test.js | grep -A 5 -B 60 -- '- STATS '","stress:destroy":"docker-compose -f scripts/stress-test/docker-compose.yml stop"},"dependencies":{"colorette":"1.2.1","commander":"^7.1.0","debug":"4.3.1","escalade":"^3.1.1","esm":"^3.2.25","getopts":"2.2.5","interpret":"^2.2.0","lodash":"^4.17.20","pg-connection-string":"2.4.0","rechoir":"^0.7.0","resolve-from":"^5.0.0","tarn":"^3.0.1","tildify":"2.0.0"},"peerDependencies":{"tedious":"^11.0.3","mysql":"^2.18.1","mysql2":"^2.2.5","pg":"^8.5.1","sqlite3":"^5.0.0"},"peerDependenciesMeta":{"tedious":{"optional":true},"mysql":{"optional":true},"mysql2":{"optional":true},"pg":{"optional":true},"sqlite3":{"optional":true}},"lint-staged":{"*.{js,json}":["prettier --write","git add"]},"devDependencies":{"@types/node":"^14.14.28","JSONStream":"^1.3.5","chai":"^4.3.0","chai-as-promised":"^7.1.1","chai-subset-in-order":"^2.1.4","cli-testlab":"^2.2.0","coveralls":"^3.1.0","cross-env":"^7.0.3","dtslint":"4.0.7","eslint":"^7.20.0","eslint-config-prettier":"^7.2.0","eslint-plugin-import":"^2.22.1","husky":"^4.3.8","jake":"^8.1.1","lint-staged":"^10.5.4","mocha":"^8.3.0","mock-fs":"^4.13.0","mysql":"^2.18.1","mysql2":"^2.2.5","nyc":"^15.1.0","oracledb":"^5.1.0","pg":"^8.5.1","pg-query-stream":"^4.0.0","prettier":"2.2.1","rimraf":"^3.0.2","sinon":"^9.2.4","sinon-chai":"^3.5.0","source-map-support":"^0.5.19","sqlite3":"^5.0.1","tap-spec":"^5.0.0","tape":"^5.1.1","tedious":"^11.0.3","toxiproxy-node-client":"^2.0.6","ts-node":"^9.1.1","tsd":"^0.14.0","typescript":"4.1.5"},"buildDependencies":["rimraf"],"bin":{"knex":"bin/cli.js"},"repository":{"type":"git","url":"git://github.com/knex/knex.git"},"homepage":"https://knexjs.org","keywords":["sql","query","postgresql","mysql","sqlite3","oracle","mssql","builder","querybuilder","build","db","database"],"author":{"name":"Tim Griesser","url":"https://github.com/tgriesser"},"contributors":[{"name":"Mikael Lepisto"},{"name":"Igor Savin","url":"https://www.codeflashbacks.com"},{"name":"Simon Liden"},{"name":"Paul Gaurab","url":"https://lorefnon.tech"},{"name":"Brian Lauber","url":"https://briandamaged.org"}],"browser":{"./lib/migrate/Migrator.js":"./lib/util/noop.js","./lib/bin/cli.js":"./lib/util/noop.js","./lib/seed/Seeder.js":"./lib/util/noop.js","tedious":false,"mysql":false,"mysql2":false,"pg":false,"pg-query-stream":false,"oracle":false,"sqlite3":false,"oracledb":false},"react-native":{"./lib/migrate":"./lib/util/noop.js","./lib/seed":"./lib/util/noop.js"},"license":"MIT","tonicExampleFilename":"scripts/runkit-example.js","nyc":{"check-coverage":true,"lines":84,"statements":82,"functions":83,"branches":69,"extension":[".js"],"exclude":["lib/dialects/oracle","lib/dialects/oracledb"]},"husky":{"hooks":{"pre-commit":"lint-staged"}},"tsd":{"directory":"test-tsd","compilerOptions":{"esModuleInterop":false,"module":"commonjs","target":"ES2017"}},"readme":"# [knex.js](http://knexjs.org)\n\n[![npm version](http://img.shields.io/npm/v/knex.svg)](https://npmjs.org/package/knex)\n[![npm downloads](https://img.shields.io/npm/dm/knex.svg)](https://npmjs.org/package/knex)\n![](https://github.com/knex/knex/workflows/CI/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/knex/knex/badge.svg?branch=master)](https://coveralls.io/r/knex/knex?branch=master)\n[![Dependencies Status](https://david-dm.org/knex/knex.svg)](https://david-dm.org/knex/knex)\n[![Gitter chat](https://badges.gitter.im/tgriesser/knex.svg)](https://gitter.im/tgriesser/knex)\n[![Language Grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/knex/knex.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/knex/knex/context:javascript)\n\n> **A SQL query builder that is _flexible_, _portable_, and _fun_ to use!**\n\nA batteries-included, multi-dialect (MSSQL, MySQL, PostgreSQL, SQLite3, Oracle (including Oracle Wallet Authentication)) query builder for\nNode.js, featuring:\n\n- [transactions](https://knexjs.org/#Transactions)\n- [connection pooling](https://knexjs.org/#Installation-pooling)\n- [streaming queries](https://knexjs.org/#Interfaces-Streams)\n- both a [promise](https://knexjs.org/#Interfaces-Promises) and [callback](https://knexjs.org/#Interfaces-Callbacks) API\n- a [thorough test suite](https://github.com/knex/knex/actions)\n\nNode.js versions 10+ are supported.\n\n* Take a look at the [full documentation](https://knexjs.org) to get started!\n* Browse the [list of plugins and tools](https://github.com/knex/knex/blob/master/ECOSYSTEM.md) built for knex\n* Check out our [recipes wiki](https://github.com/knex/knex/wiki/Recipes) to search for solutions to some specific problems  \n* In case of upgrading from an older version, see [migration guide](https://github.com/knex/knex/blob/master/UPGRADING.md)\n\nYou can report bugs and discuss features on the [GitHub issues page](https://github.com/knex/knex/issues) or send tweets to [@kibertoad](http://twitter.com/kibertoad).\n\n\nFor support and questions, join our [Gitter channel](https://gitter.im/tgriesser/knex).\n\nFor knex-based Object Relational Mapper, see:\n\n- https://github.com/Vincit/objection.js\n- https://github.com/mikro-orm/mikro-orm\n- https://bookshelfjs.org\n\nTo see the SQL that Knex will generate for a given query, you can use [Knex Query Lab](https://michaelavila.com/knex-querylab/)\n\n## Examples\n\nWe have several examples [on the website](http://knexjs.org). Here is the first one to get you started:\n\n```js\nconst knex = require('knex')({\n  client: 'sqlite3',\n  connection: {\n    filename: './data.db',\n  },\n});\n\ntry {\n\n  // Create a table\n  await knex.schema\n    .createTable('users', table => {\n      table.increments('id');\n      table.string('user_name');\n    })\n    // ...and another\n    .createTable('accounts', table => {\n      table.increments('id');\n      table.string('account_name');\n      table\n        .integer('user_id')\n        .unsigned()\n        .references('users.id');\n    })\n\n  // Then query the table...\n  const insertedRows = await knex('users').insert({ user_name: 'Tim' })\n\n  // ...and using the insert id, insert into the other table.\n  await knex('accounts').insert({ account_name: 'knex', user_id: insertedRows[0] })\n\n  // Query both of the rows.\n  const selectedRows = await knex('users')\n    .join('accounts', 'users.id', 'accounts.user_id')\n    .select('users.user_name as user', 'accounts.account_name as account')\n\n  // map over the results\n  const enrichedRows = selectedRows.map(row => ({ ...row, active: true }))\n\n  // Finally, add a catch statement\n} catch(e) {\n  console.error(e);\n};\n```\n\n## TypeScript example\n```ts\nimport { Knex, knex } from 'knex'\n\ninterface User {\n  id: number;\n  age: number;\n  name: string;\n  active: boolean;\n  departmentId: number;\n}\n\nconst config: Knex.Config = {\n  client: 'sqlite3',\n  connection: {\n    filename: './data.db',\n  },\n});\n\nconst knexInstance = knex(config);\n\ntry {\n  const users = await knex<User>('users').select('id', 'age');\n} catch (err) {\n  // error handling\n}\n```\n","readmeFilename":"README.md","gitHead":"9581100b4d64ee2b3deaf89701b8310321f65a11","bugs":{"url":"https://github.com/knex/knex/issues"},"_id":"knex@0.95.0-next2","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-YiCnmTKO7gJgTSLy5Md/TxKaDQJfvzYgqVLNAF3+tFBsSc/Pfi2LjX79XI+cBA/gvbBDANH9lQ+L6oGR+YzxWg==","shasum":"79e28ef7467c52cdc724e9978484e001b77075eb","tarball":"http://registry-npm.ywwl.com/knex/download/knex-0.95.0-next2.tgz","fileCount":152,"unpackedSize":674491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKrApCRA9TVsSAnZWagAAQmUP/1fFxO57jQVEKhdaynra\nlwyGg42HBzpGq6hJDtdNOmzYAKTa30W2sqcFiv/KDvobv7ak1u0dJfX5xL1U\n3EUlzNlEmUdR9QiAHxDdAfINH5ScEv8iStz8PswpxE17+J32c4X2aadKFSct\nyGErfaxGq1ArDmaax13TAnaJo7HSKuFXYumVh0Tcy0rdsSsMfZ/NsSabg5+P\n3ViBxk+6Zv82qEHiC325jfn0sqNWE2FPo914RT7OISzPhM0wvA4tyHici9Zk\nicTDwW6Gse8wpbekRcFW04gPAL2WOo+nc3Jgn/7LqnL/H3B9faw9bEmVbxZt\n7eoeTs2eHTVv0F2q+8WSBwNyXlLP1og0h6LQCFkVfeIgDMsJ5RuUXTCqfrkr\noaUWP+4eS3Ei5R6koio+EFjTvHWgZrRYeTR0253kvTBLrLnNQ2509sHrliLz\nvFoquiNQ3au/oB+8gCkh601/auQo1+mJD8jaBoNI1sBLoPdWRwb56VvmJhjw\nGWS4xjk0Itx0zBGNBVoTAcsdLm4Gq61/PqZ48YnCxGKeB38Y6JIUUV0os2Nf\nRf9hV8L9s2rD+bGk0k+l8f5WKEeK434o+7/QGQtGAIh9L/H+Oru+F8dzUi/y\npHa1psJqCOyDzs9kvT0N5JTtOupFyr89qkKkTIXIKI31yhCbluepLCmKIjZt\n60lV\r\n=XgKD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFb1q7H/QhQSLaD7yeRfpczcUWRfOrBtR/UKmL+0IDDsAiAcSfwyc8pzvRN9UMNSba3uHPVhOqAj4RZZcwdcvWiMjg=="}],"size":169399,"noattachment":false,"key":"/knex/-/knex-0.95.0-next2.tgz"},"_npmUser":{"name":"kibertoad","email":"iselwin@gmail.com"},"directories":{},"maintainers":[{"name":"tgriesser","email":"tgriesser10@gmail.com"},{"name":"wubzz","email":"simonliden94@gmail.com"},{"name":"elhigu","email":"mikael.lepisto@vincit.com"},{"name":"kibertoad","email":"iselwin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/knex_0.95.0-next2_1613410339482_0.28933913559052815"},"_hasShrinkwrap":false,"publish_time":1613410345208,"_cnpm_publish_time":1613410345208,"dist-tags":{"beta":"0.21.5-next1","latest":"3.3.0","next":"2.5.1","oracle-fix":"0.16.6-oracle-fix"}}