{"_id":"@assetsart/bookshelf","_rev":"8-f609d5eb300b9a9b22f5be6de310af75","name":"@assetsart/bookshelf","dist-tags":{"latest":"2.2.5"},"versions":{"2.0.0":{"name":"@assetsart/bookshelf","version":"2.0.0","keywords":["orm","mysql","mysql2","postgresql","sqlite","datamapper","active record"],"author":{"name":"Assets Art"},"license":"MIT","_id":"@assetsart/bookshelf@2.0.0","maintainers":[{"name":"aitthi","email":"meanstack20@gmail.com"}],"homepage":"https://github.com/Aitthi/bookshelf-v2","bugs":{"url":"https://github.com/Aitthi/bookshelf-v2/issues"},"dist":{"shasum":"aa1cdca084fdba9983caf3fe6c7a6451eefe8ba9","tarball":"https://registry.npmjs.org/@assetsart/bookshelf/-/bookshelf-2.0.0.tgz","fileCount":71,"integrity":"sha512-GRfrtAW2GjlnUjZ9VSmJrITaCGKP1D1csxCchT1xIF4VWy/t9CnGgBk8vly+bbV7QZnuApvkM4ao62Srrm040A==","signatures":[{"sig":"MEUCIBge6HyHWeNK6EaTGvSehojQ+eSsl2GZFpWaPnsUcW8MAiEA2H7IcyEHdCC/w9Je4k3dBbYtnMMV/D1uKepsb0MQG4g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@assetsart%2fbookshelf@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":605482},"pnpm":{"onlyBuiltDependencies":["sqlite3","@swc/core","@biomejs/biome","esbuild"]},"type":"module","engines":{"node":">=16"},"exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"./plugins/*":{"types":"./dist/types/plugins/*.d.ts","import":"./dist/esm/plugins/*.js","require":"./dist/cjs/plugins/*.js"}},"gitHead":"ec6417349819da551eddbbeb92e89e690cb64199","scripts":{"lint":"biome lint src test","test":"vitest run","build":"node scripts/gen-version.mjs && rm -rf dist && pnpm build:esm && pnpm build:cjs && pnpm build:types && node scripts/fix-dist-pkg.mjs","check":"biome check src test","smoke":"pnpm build && node test/smoke/esm.mjs && node test/smoke/cjs.cjs","format":"biome format --write src test","test:cov":"vitest run --coverage","build:cjs":"swc src -d dist/cjs --strip-leading-paths -C module.type=commonjs","build:esm":"swc src -d dist/esm --strip-leading-paths -C module.type=es6","typecheck":"tsc --noEmit","test:watch":"vitest","build:types":"tsc -p tsconfig.build.json","fix:sqlite3":"node scripts/rebuild-sqlite3.mjs"},"_npmUser":{"name":"aitthi","email":"meanstack20@gmail.com"},"repository":{"url":"git+https://github.com/Aitthi/bookshelf-v2.git","type":"git"},"_npmVersion":"10.9.8","description":"A lightweight ORM for PostgreSQL, MySQL, and SQLite3","directories":{},"_nodeVersion":"22.23.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.22.0","knex":"^3.3.0","uuid":"^14.0.1","mysql2":"^3.22.5","vitest":"^4.1.9","sqlite3":"^6.0.1","@swc/cli":"^0.8.1","@swc/core":"^1.15.43","typescript":"^6.0.3","@types/node":"^26.0.1","@biomejs/biome":"^2.5.1","@vitest/coverage-v8":"^4.1.9"},"peerDependencies":{"knex":">=3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/bookshelf_2.0.0_1782522747239_0.8981405293963938","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@assetsart/bookshelf","version":"2.1.0","keywords":["orm","mysql","mysql2","postgresql","sqlite","datamapper","active record"],"author":{"name":"Assets Art"},"license":"MIT","_id":"@assetsart/bookshelf@2.1.0","maintainers":[{"name":"aitthi","email":"meanstack20@gmail.com"}],"homepage":"https://github.com/Aitthi/bookshelf-v2","bugs":{"url":"https://github.com/Aitthi/bookshelf-v2/issues"},"dist":{"shasum":"5537e4705fb3e7b411c311e447c1f3030b70d229","tarball":"https://registry.npmjs.org/@assetsart/bookshelf/-/bookshelf-2.1.0.tgz","fileCount":74,"integrity":"sha512-fm1slW9Bz1kMnJeKfuwgggFZ0t/EIgw+R8aehScX7k9/Y6CUaeUgRelRdaRxTCRQW1JKTWBdgku8N4QgIBkwCg==","signatures":[{"sig":"MEUCIHwmmuJjK1YxWopxlMxPXXh6MOiH82/dRd9vUaOkr4fTAiEA8MjWks5/lkj7NrXNUZOL/1X9i2ZNrR+xNoRzc/0fyI8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@assetsart%2fbookshelf@2.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":623488},"pnpm":{"onlyBuiltDependencies":["sqlite3","@swc/core","@biomejs/biome","esbuild"]},"type":"module","types":"./dist/types/index.d.cts","engines":{"node":">=16"},"exports":{".":{"import":{"types":"./dist/types/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/types/index.d.cts","default":"./dist/cjs/index.js"}},"./plugins/*":{"import":{"types":"./dist/types/plugins/*.d.ts","default":"./dist/esm/plugins/*.js"},"require":{"types":"./dist/types/plugins/*.d.cts","default":"./dist/cjs/plugins/*.js"}}},"gitHead":"3239a504bda5d16c7e76be892a4a8c935ef5b40c","scripts":{"attw":"pnpm build && attw --pack .","lint":"biome lint src test","test":"vitest run","build":"node scripts/gen-version.mjs && node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && pnpm build:esm && pnpm build:cjs && pnpm build:types && node scripts/copy-types.mjs && node scripts/fix-dist-pkg.mjs","check":"biome check src test","smoke":"pnpm build && node test/smoke/esm.mjs && node test/smoke/cjs.cjs","format":"biome format --write src test","test:cov":"vitest run --coverage","build:cjs":"swc src -d dist/cjs --strip-leading-paths -C module.type=commonjs --ignore \"src/types/**\"","build:esm":"swc src -d dist/esm --strip-leading-paths -C module.type=es6 --ignore \"src/types/**\"","typecheck":"tsc --noEmit","test:types":"pnpm build && tsc -p test/types/tsconfig.cjs.json && tsc -p test/types/tsconfig.esm.json","test:watch":"vitest","build:types":"tsc -p tsconfig.build.json","fix:sqlite3":"node scripts/rebuild-sqlite3.mjs"},"_npmUser":{"name":"aitthi","email":"meanstack20@gmail.com"},"repository":{"url":"git+https://github.com/Aitthi/bookshelf-v2.git","type":"git"},"_npmVersion":"10.9.8","description":"A lightweight ORM for PostgreSQL, MySQL, and SQLite3","directories":{},"_nodeVersion":"22.23.0","_hasShrinkwrap":false,"devDependencies":{"pg":"^8.22.0","knex":"^3.3.0","uuid":"^14.0.1","mysql2":"^3.22.5","vitest":"^4.1.9","sqlite3":"^6.0.1","@swc/cli":"^0.8.1","@swc/core":"^1.15.43","typescript":"^6.0.3","@types/node":"^26.0.1","@biomejs/biome":"^2.5.1","@vitest/coverage-v8":"^4.1.9","@assetsart/bookshelf":"link:.","@arethetypeswrong/cli":"^0.18.4"},"peerDependencies":{"knex":">=3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/bookshelf_2.1.0_1782537002263_0.39013657674600677","host":"s3://npm-registry-packages-npm-production"}},"2.2.0":{"name":"@assetsart/bookshelf","version":"2.2.0","keywords":["orm","mysql","mysql2","postgresql","sqlite","datamapper","active record"],"author":{"name":"Assets Art"},"license":"MIT","_id":"@assetsart/bookshelf@2.2.0","maintainers":[{"name":"aitthi","email":"meanstack20@gmail.com"}],"homepage":"https://github.com/Aitthi/bookshelf-v2","bugs":{"url":"https://github.com/Aitthi/bookshelf-v2/issues"},"dist":{"shasum":"e0f19ea80aaef3fad2d362cdfa17932345226ac9","tarball":"https://registry.npmjs.org/@assetsart/bookshelf/-/bookshelf-2.2.0.tgz","fileCount":78,"integrity":"sha512-RV7DhWjLuWg93nyNQipOzshYVSHF4N22W8w98jhaD5cBS7TiVsV1MlxXutC91iWqDPRALrAQJQhqYsc7AMqQrA==","signatures":[{"sig":"MEUCIQDYCKJhZrjODhIX3ixtyp5/7Jrs6mvNXVjw9EZG1qeRHQIgdoqwRQFT8UGv6e0QNXrmmYVYkAoPC9TxHelKq6txxo0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@assetsart%2fbookshelf@2.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":641367},"pnpm":{"onlyBuiltDependencies":["sqlite3","@swc/core","@biomejs/biome","esbuild"]},"type":"module","types":"./dist/types/index.d.cts","engines":{"node":">=16"},"exports":{".":{"import":{"types":"./dist/types/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/types/index.d.cts","default":"./dist/cjs/index.js"}},"./plugins/*":{"import":{"types":"./dist/types/plugins/*.d.ts","default":"./dist/esm/plugins/*.js"},"require":{"types":"./dist/types/plugins/*.d.cts","default":"./dist/cjs/plugins/*.js"}}},"gitHead":"1505c1328a6e0fca505f1286826bbc91f32fe243","scripts":{"attw":"pnpm build && attw --pack .","lint":"biome lint src test","test":"vitest run","build":"node scripts/gen-version.mjs && node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && pnpm build:esm && pnpm build:cjs && pnpm build:types && node scripts/copy-types.mjs && node scripts/fix-dist-pkg.mjs","check":"biome check src test","smoke":"pnpm build && node test/smoke/esm.mjs && node test/smoke/cjs.cjs","format":"biome format --write src test","test:cov":"vitest run --coverage","build:cjs":"swc src -d dist/cjs --strip-leading-paths -C module.type=commonjs --ignore \"src/types/**\"","build:esm":"swc src -d dist/esm --strip-leading-paths -C module.type=es6 --ignore \"src/types/**\"","typecheck":"tsc --noEmit","test:types":"pnpm build && tsc -p test/types/tsconfig.cjs.json && tsc -p test/types/tsconfig.esm.json","test:watch":"vitest","build:types":"tsc -p tsconfig.build.json","fix:sqlite3":"node scripts/rebuild-sqlite3.mjs"},"_npmUser":{"name":"aitthi","email":"meanstack20@gmail.com"},"repository":{"url":"git+https://github.com/Aitthi/bookshelf-v2.git","type":"git"},"_npmVersion":"10.9.8","description":"A lightweight ORM for PostgreSQL, MySQL, and SQLite3","directories":{},"_nodeVersion":"22.23.0","_hasShrinkwrap":false,"devDependencies":{"pg":"^8.22.0","knex":"^3.3.0","uuid":"^14.0.1","mysql2":"^3.22.5","vitest":"^4.1.9","sqlite3":"^6.0.1","@swc/cli":"^0.8.1","@swc/core":"^1.15.43","typescript":"^6.0.3","@types/node":"^26.0.1","@biomejs/biome":"^2.5.1","@vitest/coverage-v8":"^4.1.9","@assetsart/bookshelf":"link:.","@arethetypeswrong/cli":"^0.18.4"},"peerDependencies":{"knex":">=3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/bookshelf_2.2.0_1782702473380_0.4654954438464336","host":"s3://npm-registry-packages-npm-production"}},"2.2.1":{"name":"@assetsart/bookshelf","version":"2.2.1","keywords":["orm","mysql","mysql2","postgresql","sqlite","datamapper","active record"],"author":{"name":"Assets Art"},"license":"MIT","_id":"@assetsart/bookshelf@2.2.1","maintainers":[{"name":"aitthi","email":"meanstack20@gmail.com"}],"homepage":"https://github.com/Aitthi/bookshelf-v2","bugs":{"url":"https://github.com/Aitthi/bookshelf-v2/issues"},"dist":{"shasum":"84a75143169aaf21320b211c971af1c7a6073fa5","tarball":"https://registry.npmjs.org/@assetsart/bookshelf/-/bookshelf-2.2.1.tgz","fileCount":78,"integrity":"sha512-nXbtdqJjxH+ZDFC+dH7UPP8EdPvNXIMEh+Fzit95vYdRYUSi8IooecwV+ssaI8cZ10ABYt1PEudy9eYr+xQpKw==","signatures":[{"sig":"MEYCIQCa0wMiUXCvasM8i9gvssxCCot9GgZrj8Cgytthc/ohLgIhAPyhGbL38/vLKq4FSvGpqRptNbl5+qfnviiA/aMzx/P8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@assetsart%2fbookshelf@2.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":641919},"pnpm":{"onlyBuiltDependencies":["sqlite3","@swc/core","@biomejs/biome","esbuild"]},"type":"module","types":"./dist/types/index.d.cts","engines":{"node":">=16"},"exports":{".":{"import":{"types":"./dist/types/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/types/index.d.cts","default":"./dist/cjs/index.js"}},"./plugins/*":{"import":{"types":"./dist/types/plugins/*.d.ts","default":"./dist/esm/plugins/*.js"},"require":{"types":"./dist/types/plugins/*.d.cts","default":"./dist/cjs/plugins/*.js"}}},"gitHead":"ea24da35c34d2de11510cf03ffd05aa4d51e3632","scripts":{"attw":"pnpm build && attw --pack .","lint":"biome lint src test","test":"vitest run","build":"node scripts/gen-version.mjs && node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && pnpm build:esm && pnpm build:cjs && pnpm build:types && node scripts/copy-types.mjs && node scripts/fix-dist-pkg.mjs","check":"biome check src test","smoke":"pnpm build && node test/smoke/esm.mjs && node test/smoke/cjs.cjs","format":"biome format --write src test","test:cov":"vitest run --coverage","build:cjs":"swc src -d dist/cjs --strip-leading-paths -C module.type=commonjs --ignore \"src/types/**\"","build:esm":"swc src -d dist/esm --strip-leading-paths -C module.type=es6 --ignore \"src/types/**\"","typecheck":"tsc --noEmit","test:types":"pnpm build && tsc -p test/types/tsconfig.cjs.json && tsc -p test/types/tsconfig.esm.json && tsc -p test/types/tsconfig.classic.json","test:watch":"vitest","build:types":"tsc -p tsconfig.build.json","fix:sqlite3":"node scripts/rebuild-sqlite3.mjs"},"_npmUser":{"name":"aitthi","email":"meanstack20@gmail.com"},"repository":{"url":"git+https://github.com/Aitthi/bookshelf-v2.git","type":"git"},"_npmVersion":"10.9.8","description":"A lightweight ORM for PostgreSQL, MySQL, and SQLite3","directories":{},"_nodeVersion":"22.23.0","typesVersions":{"*":{"plugins/*":["./dist/types/plugins/*.d.cts"]}},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.22.0","knex":"^3.3.0","uuid":"^14.0.1","mysql2":"^3.22.5","vitest":"^4.1.9","sqlite3":"^6.0.1","@swc/cli":"^0.8.1","@swc/core":"^1.15.43","typescript":"^6.0.3","@types/node":"^26.0.1","@biomejs/biome":"^2.5.1","@vitest/coverage-v8":"^4.1.9","@assetsart/bookshelf":"link:.","@arethetypeswrong/cli":"^0.18.4"},"peerDependencies":{"knex":">=3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/bookshelf_2.2.1_1782703238556_0.880067182757569","host":"s3://npm-registry-packages-npm-production"}},"2.2.2":{"name":"@assetsart/bookshelf","version":"2.2.2","keywords":["orm","mysql","mysql2","postgresql","sqlite","datamapper","active record"],"author":{"name":"Assets Art"},"license":"MIT","_id":"@assetsart/bookshelf@2.2.2","maintainers":[{"name":"aitthi","email":"meanstack20@gmail.com"}],"homepage":"https://github.com/Aitthi/bookshelf-v2","bugs":{"url":"https://github.com/Aitthi/bookshelf-v2/issues"},"dist":{"shasum":"b6db00c7e770ddc30a017b97a91023e2a6cddc8e","tarball":"https://registry.npmjs.org/@assetsart/bookshelf/-/bookshelf-2.2.2.tgz","fileCount":78,"integrity":"sha512-05cGrK5+WNc9vD7ztLOjoHwrjLJLoht4xdWqfaV6QEiX8KQKaB8n6h9TfF7Lo3Ds6jj2mxvCUui/Q8oIsV9K+Q==","signatures":[{"sig":"MEQCIAEuUB8asTvd7Ya7czuwejROLkbHcGkYVhQbmjwmrYB3AiApAg9LuHWfvh0usjwjwGiB5BjBnv0FoJccDjGs7HYLIA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@assetsart%2fbookshelf@2.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":641514},"pnpm":{"onlyBuiltDependencies":["sqlite3","@swc/core","@biomejs/biome","esbuild"]},"type":"module","types":"./dist/types/index.d.cts","engines":{"node":">=16"},"exports":{".":{"import":{"types":"./dist/types/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/types/index.d.cts","default":"./dist/cjs/index.js"}},"./plugins/*":{"import":{"types":"./dist/types/plugins/*.d.ts","default":"./dist/esm/plugins/*.js"},"require":{"types":"./dist/types/plugins/*.d.cts","default":"./dist/cjs/plugins/*.js"}}},"gitHead":"b9245e104a20f7477fa33fe0f97101b6971b503f","scripts":{"attw":"pnpm build && attw --pack .","lint":"biome lint src test","test":"vitest run","build":"node scripts/gen-version.mjs && node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && pnpm build:esm && pnpm build:cjs && pnpm build:types && node scripts/copy-types.mjs && node scripts/fix-dist-pkg.mjs","check":"biome check src test","smoke":"pnpm build && node test/smoke/esm.mjs && node test/smoke/cjs.cjs","format":"biome format --write src test","test:cov":"vitest run --coverage","build:cjs":"swc src -d dist/cjs --strip-leading-paths -C module.type=commonjs --ignore \"src/types/**\"","build:esm":"swc src -d dist/esm --strip-leading-paths -C module.type=es6 --ignore \"src/types/**\"","typecheck":"tsc --noEmit","test:types":"pnpm build && tsc -p test/types/tsconfig.cjs.json && tsc -p test/types/tsconfig.esm.json && tsc -p test/types/tsconfig.classic.json","test:watch":"vitest","build:types":"tsc -p tsconfig.build.json","fix:sqlite3":"node scripts/rebuild-sqlite3.mjs"},"_npmUser":{"name":"aitthi","email":"meanstack20@gmail.com"},"repository":{"url":"git+https://github.com/Aitthi/bookshelf-v2.git","type":"git"},"_npmVersion":"10.9.8","description":"A lightweight ORM for PostgreSQL, MySQL, and SQLite3","directories":{},"_nodeVersion":"22.23.0","typesVersions":{"*":{"plugins/*":["./dist/types/plugins/*.d.cts"]}},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.22.0","knex":"^3.3.0","uuid":"^14.0.1","mysql2":"^3.22.5","vitest":"^4.1.9","sqlite3":"^6.0.1","@swc/cli":"^0.8.1","@swc/core":"^1.15.43","typescript":"^6.0.3","@types/node":"^26.0.1","@biomejs/biome":"^2.5.1","@vitest/coverage-v8":"^4.1.9","@assetsart/bookshelf":"link:.","@arethetypeswrong/cli":"^0.18.4"},"peerDependencies":{"knex":">=3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/bookshelf_2.2.2_1782714043272_0.8031244103342752","host":"s3://npm-registry-packages-npm-production"}},"2.2.3":{"name":"@assetsart/bookshelf","version":"2.2.3","keywords":["orm","mysql","mysql2","postgresql","sqlite","datamapper","active record"],"author":{"name":"Assets Art"},"license":"MIT","_id":"@assetsart/bookshelf@2.2.3","maintainers":[{"name":"aitthi","email":"meanstack20@gmail.com"}],"homepage":"https://github.com/Aitthi/bookshelf-v2","bugs":{"url":"https://github.com/Aitthi/bookshelf-v2/issues"},"dist":{"shasum":"5496cc6ea14a20d48771e4740c7ca67f10c48042","tarball":"https://registry.npmjs.org/@assetsart/bookshelf/-/bookshelf-2.2.3.tgz","fileCount":78,"integrity":"sha512-OcyWq/3+4TcA1SLgbun7e4lVNIfN7PEZT5funP1u7di8chRIq7jGSd2e1encnUIzpbYlP25pGZukOs4IxL8Utg==","signatures":[{"sig":"MEUCIQDaYKvoHZNLwqkhaZX0pTEw4O+TxUJSPMHJfmxHiEpITwIgLhzhPOuMpK5qvnFMlrIm0h1YlO4CBO7ceTiSPd2/xb8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@assetsart%2fbookshelf@2.2.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":641510},"pnpm":{"onlyBuiltDependencies":["sqlite3","@swc/core","@biomejs/biome","esbuild"]},"type":"module","types":"./dist/types/index.d.cts","engines":{"node":">=16"},"exports":{".":{"import":{"types":"./dist/types/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/types/index.d.cts","default":"./dist/cjs/index.js"}},"./plugins/*":{"import":{"types":"./dist/types/plugins/*.d.ts","default":"./dist/esm/plugins/*.js"},"require":{"types":"./dist/types/plugins/*.d.cts","default":"./dist/cjs/plugins/*.js"}}},"gitHead":"5f707e267298cea08448dc5d238e9f66012fb42c","scripts":{"attw":"pnpm build && attw --pack .","lint":"biome lint src test","test":"vitest run","build":"node scripts/gen-version.mjs && node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && pnpm build:esm && pnpm build:cjs && pnpm build:types && node scripts/copy-types.mjs && node scripts/fix-dist-pkg.mjs","check":"biome check src test","smoke":"pnpm build && node test/smoke/esm.mjs && node test/smoke/cjs.cjs","format":"biome format --write src test","test:cov":"vitest run --coverage","build:cjs":"swc src -d dist/cjs --strip-leading-paths -C module.type=commonjs --ignore \"src/types/**\"","build:esm":"swc src -d dist/esm --strip-leading-paths -C module.type=es6 --ignore \"src/types/**\"","typecheck":"tsc --noEmit","test:types":"pnpm build && tsc -p test/types/tsconfig.cjs.json && tsc -p test/types/tsconfig.esm.json && tsc -p test/types/tsconfig.classic.json","test:watch":"vitest","build:types":"tsc -p tsconfig.build.json","fix:sqlite3":"node scripts/rebuild-sqlite3.mjs"},"_npmUser":{"name":"aitthi","email":"meanstack20@gmail.com"},"repository":{"url":"git+https://github.com/Aitthi/bookshelf-v2.git","type":"git"},"_npmVersion":"10.9.8","description":"A lightweight ORM for PostgreSQL, MySQL, and SQLite3","directories":{},"_nodeVersion":"22.23.0","typesVersions":{"*":{"plugins/*":["./dist/types/plugins/*.d.cts"]}},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.22.0","knex":"^3.3.0","uuid":"^14.0.1","mysql2":"^3.22.5","vitest":"^4.1.9","sqlite3":"^6.0.1","@swc/cli":"^0.8.1","@swc/core":"^1.15.43","typescript":"^6.0.3","@types/node":"^26.0.1","@biomejs/biome":"^2.5.1","@vitest/coverage-v8":"^4.1.9","@assetsart/bookshelf":"link:.","@arethetypeswrong/cli":"^0.18.4"},"peerDependencies":{"knex":">=3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/bookshelf_2.2.3_1782715484034_0.8181677809166066","host":"s3://npm-registry-packages-npm-production"}},"2.2.4":{"name":"@assetsart/bookshelf","version":"2.2.4","keywords":["orm","mysql","mysql2","postgresql","sqlite","datamapper","active record"],"author":{"name":"Assets Art"},"license":"MIT","_id":"@assetsart/bookshelf@2.2.4","maintainers":[{"name":"aitthi","email":"meanstack20@gmail.com"}],"homepage":"https://github.com/Aitthi/bookshelf-v2","bugs":{"url":"https://github.com/Aitthi/bookshelf-v2/issues"},"dist":{"shasum":"b59c6e0b37493e04e1358726f05713a976948e23","tarball":"https://registry.npmjs.org/@assetsart/bookshelf/-/bookshelf-2.2.4.tgz","fileCount":78,"integrity":"sha512-RErqhepTA7ZUKW1jCvgR2SCQVN4hGoecrl93DXBTsnS9rUro7AIHu4yZEfSCIWdUk1euCZMxCFn99SYiORbF0w==","signatures":[{"sig":"MEUCIBypbmhBPDAqqmCG7l+wlNUDW42ahgJgXtAI9bJsUb65AiEApqEuavQ/D/TviGdnEcE0+VRHxHkgRiWcvB44/cOh9Mk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@assetsart%2fbookshelf@2.2.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":641558},"pnpm":{"onlyBuiltDependencies":["sqlite3","@swc/core","@biomejs/biome","esbuild"]},"type":"module","types":"./dist/types/index.d.cts","engines":{"node":">=16"},"exports":{".":{"import":{"types":"./dist/types/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/types/index.d.cts","default":"./dist/cjs/index.js"}},"./plugins/*":{"import":{"types":"./dist/types/plugins/*.d.ts","default":"./dist/esm/plugins/*.js"},"require":{"types":"./dist/types/plugins/*.d.cts","default":"./dist/cjs/plugins/*.js"}}},"gitHead":"60763ca8eeebedd87d9ad6cd9a4fa277d9f3d4ea","scripts":{"attw":"pnpm build && attw --pack .","lint":"biome lint src test","test":"vitest run","build":"node scripts/gen-version.mjs && node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && pnpm build:esm && pnpm build:cjs && pnpm build:types && node scripts/copy-types.mjs && node scripts/fix-dist-pkg.mjs","check":"biome check src test","smoke":"pnpm build && node test/smoke/esm.mjs && node test/smoke/cjs.cjs","format":"biome format --write src test","test:cov":"vitest run --coverage","build:cjs":"swc src -d dist/cjs --strip-leading-paths -C module.type=commonjs --ignore \"src/types/**\"","build:esm":"swc src -d dist/esm --strip-leading-paths -C module.type=es6 --ignore \"src/types/**\"","typecheck":"tsc --noEmit","test:types":"pnpm build && tsc -p test/types/tsconfig.cjs.json && tsc -p test/types/tsconfig.esm.json && tsc -p test/types/tsconfig.classic.json","test:watch":"vitest","build:types":"tsc -p tsconfig.build.json","fix:sqlite3":"node scripts/rebuild-sqlite3.mjs"},"_npmUser":{"name":"aitthi","email":"meanstack20@gmail.com"},"repository":{"url":"git+https://github.com/Aitthi/bookshelf-v2.git","type":"git"},"_npmVersion":"10.9.8","description":"A lightweight ORM for PostgreSQL, MySQL, and SQLite3","directories":{},"_nodeVersion":"22.23.0","typesVersions":{"*":{"plugins/*":["./dist/types/plugins/*.d.cts"]}},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.22.0","knex":"^3.3.0","uuid":"^14.0.1","mysql2":"^3.22.5","vitest":"^4.1.9","sqlite3":"^6.0.1","@swc/cli":"^0.8.1","@swc/core":"^1.15.43","typescript":"^6.0.3","@types/node":"^26.0.1","@biomejs/biome":"^2.5.1","@vitest/coverage-v8":"^4.1.9","@assetsart/bookshelf":"link:.","@arethetypeswrong/cli":"^0.18.4"},"peerDependencies":{"knex":">=3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/bookshelf_2.2.4_1782717603879_0.32287420894920427","host":"s3://npm-registry-packages-npm-production"}},"2.2.5":{"name":"@assetsart/bookshelf","version":"2.2.5","type":"module","description":"A lightweight ORM for PostgreSQL, MySQL, and SQLite3","exports":{".":{"import":{"types":"./dist/types/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/types/index.d.cts","default":"./dist/cjs/index.js"}},"./plugins/*":{"import":{"types":"./dist/types/plugins/*.d.ts","default":"./dist/esm/plugins/*.js"},"require":{"types":"./dist/types/plugins/*.d.cts","default":"./dist/cjs/plugins/*.js"}}},"types":"./dist/types/index.d.cts","typesVersions":{"*":{"plugins/*":["./dist/types/plugins/*.d.cts"]}},"scripts":{"format":"biome format --write src test","lint":"biome lint src test","test":"vitest run","test:watch":"vitest","test:cov":"vitest run --coverage","typecheck":"tsc --noEmit","test:types":"pnpm build && tsc -p test/types/tsconfig.cjs.json && tsc -p test/types/tsconfig.esm.json && tsc -p test/types/tsconfig.classic.json","attw":"pnpm build && attw --pack .","build:esm":"swc src -d dist/esm --strip-leading-paths -C module.type=es6 --ignore \"src/types/**\"","build:cjs":"swc src -d dist/cjs --strip-leading-paths -C module.type=commonjs --ignore \"src/types/**\"","build:types":"tsc -p tsconfig.build.json","build":"node scripts/gen-version.mjs && node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && pnpm build:esm && pnpm build:cjs && pnpm build:types && node scripts/copy-types.mjs && node scripts/fix-dist-pkg.mjs","smoke":"pnpm build && node test/smoke/esm.mjs && node test/smoke/cjs.cjs","fix:sqlite3":"node scripts/rebuild-sqlite3.mjs","check":"biome check src test"},"homepage":"https://github.com/Aitthi/bookshelf-v2","repository":{"type":"git","url":"git+https://github.com/Aitthi/bookshelf-v2.git"},"keywords":["orm","mysql","mysql2","postgresql","sqlite","datamapper","active record"],"devDependencies":{"@arethetypeswrong/cli":"^0.18.4","@assetsart/bookshelf":"link:.","@biomejs/biome":"^2.5.1","@swc/cli":"^0.8.1","@swc/core":"^1.15.43","@types/node":"^26.0.1","@vitest/coverage-v8":"^4.1.9","knex":"^3.3.0","mysql2":"^3.22.5","pg":"^8.22.0","sqlite3":"^6.0.1","typescript":"^6.0.3","uuid":"^14.0.1","vitest":"^4.1.9"},"peerDependencies":{"knex":">=3.1.0"},"author":{"name":"Assets Art"},"license":"MIT","engines":{"node":">=16"},"pnpm":{"onlyBuiltDependencies":["sqlite3","@swc/core","@biomejs/biome","esbuild"]},"_id":"@assetsart/bookshelf@2.2.5","gitHead":"521cd3a818a8b386e81d69f7cc2d182a21b96839","bugs":{"url":"https://github.com/Aitthi/bookshelf-v2/issues"},"_nodeVersion":"22.23.0","_npmVersion":"10.9.8","dist":{"integrity":"sha512-cdsz3rVsMJzMxD3CLqOgdZZOBllq006xsitxuqsTfGIXLBZzaqXjf+HNgLyafbW51zvpgqThVu84kq9gT0alEg==","shasum":"7f62cce79ece66f6a29481d25fd1d46bd470fe9c","tarball":"https://registry.npmjs.org/@assetsart/bookshelf/-/bookshelf-2.2.5.tgz","fileCount":78,"unpackedSize":641624,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@assetsart%2fbookshelf@2.2.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDpVOhhpwqDF2RH9ztDS3CIsZmNK7K6IW+AxwWXBApyxQIhAI0NAykH9vqkUhQWnGtKueSA9ZqCeJVe4iulRHP1oAMq"}]},"_npmUser":{"name":"aitthi","email":"meanstack20@gmail.com"},"directories":{},"maintainers":[{"name":"aitthi","email":"meanstack20@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bookshelf_2.2.5_1782717883987_0.7826608900947858"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-27T01:12:27.126Z","modified":"2026-06-29T07:24:44.471Z","2.0.0":"2026-06-27T01:12:27.381Z","2.1.0":"2026-06-27T05:10:02.421Z","2.2.0":"2026-06-29T03:07:53.552Z","2.2.1":"2026-06-29T03:20:38.702Z","2.2.2":"2026-06-29T06:20:43.436Z","2.2.3":"2026-06-29T06:44:44.199Z","2.2.4":"2026-06-29T07:20:04.100Z","2.2.5":"2026-06-29T07:24:44.137Z"},"bugs":{"url":"https://github.com/Aitthi/bookshelf-v2/issues"},"author":{"name":"Assets Art"},"license":"MIT","homepage":"https://github.com/Aitthi/bookshelf-v2","keywords":["orm","mysql","mysql2","postgresql","sqlite","datamapper","active record"],"repository":{"type":"git","url":"git+https://github.com/Aitthi/bookshelf-v2.git"},"description":"A lightweight ORM for PostgreSQL, MySQL, and SQLite3","maintainers":[{"name":"aitthi","email":"meanstack20@gmail.com"}],"readme":"# bookshelfv2\n\nbookshelfv2 is a TypeScript ORM for Node.js, built on the [Knex](http://knexjs.org) SQL query builder. It features Promise-based async methods, transaction support, eager/nested-eager relation loading, polymorphic associations, and support for one-to-one, one-to-many, and many-to-many relations.\n\nIt is designed to work with PostgreSQL, MySQL, and SQLite3.\n\nbookshelfv2 is a full TypeScript rewrite of the original [Bookshelf.js](https://github.com/bookshelf/bookshelf) ORM, published as a drop-in behaviour replacement with zero runtime dependencies.\n\n## Installation\n\n> The npm package is published as `@assetsart/bookshelf` (the project name is bookshelfv2).\n\n```sh\npnpm add @assetsart/bookshelf knex\n# or\nnpm install @assetsart/bookshelf knex\n\n# Then add one of the following database drivers:\nnpm install pg\nnpm install mysql2\nnpm install sqlite3\n```\n\n**Node.js >= 16 is required.**\n\n## Quick Start\n\n### ESM (recommended)\n\n```js\nimport bookshelfv2 from '@assetsart/bookshelf'\nimport knex from 'knex'\n\nconst db = knex({\n  client: 'pg',\n  connection: process.env.DATABASE_URL,\n})\n\nconst orm = bookshelfv2(db)\n\nconst User = orm.model('User', {\n  tableName: 'users',\n})\n```\n\n### CommonJS\n\n```js\nconst bookshelfv2 = require('@assetsart/bookshelf').default\nconst knex = require('knex')\n\nconst db = knex({\n  client: 'pg',\n  connection: process.env.DATABASE_URL,\n})\n\nconst orm = bookshelfv2(db)\n\nconst User = orm.model('User', {\n  tableName: 'users',\n})\n```\n\n### Shared instance pattern\n\nA common pattern is to initialise once and re-use the instance:\n\n```js\n// bookshelf.js (or bookshelf.ts)\nimport bookshelfv2 from '@assetsart/bookshelf'\nimport knex from 'knex'\n\nconst db = knex(dbConfig)\nexport default bookshelfv2(db)\n\n// elsewhere\nimport orm from './bookshelf.js'\n\nconst Post = orm.model('Post', {\n  // ...\n})\n```\n\n## Plugins\n\nPlugins are tree-shakeable and imported by subpath, then passed to `.plugin()`. There is no string-based plugin registration.\n\n```js\nimport bookshelfv2 from '@assetsart/bookshelf'\nimport virtuals from '@assetsart/bookshelf/plugins/virtuals'\nimport caseConverter from '@assetsart/bookshelf/plugins/case-converter'\nimport jsonColumns from '@assetsart/bookshelf/plugins/json-columns'\nimport knex from 'knex'\n\nconst orm = bookshelfv2(knex(/* ... */))\n\norm.plugin(virtuals)\norm.plugin(caseConverter)\norm.plugin(jsonColumns)\n```\n\n### Bundled plugins\n\n| Plugin | Import path | Description |\n|---|---|---|\n| Virtuals | `@assetsart/bookshelf/plugins/virtuals` | Define virtual (computed) properties on your model. |\n| Case Converter | `@assetsart/bookshelf/plugins/case-converter` | Automatically convert between the database's `snake_case` columns and the model's `camelCase` attributes. |\n| JSON Columns | `@assetsart/bookshelf/plugins/json-columns` | Transparently serialize/deserialize columns holding JSON. Declare them via a static `jsonColumns` array on the model. |\n\n> **TypeScript note:** Plugin subpaths resolve under `\"moduleResolution\": \"node16\"`, `\"nodenext\"`, and `\"bundler\"` (via the package `exports` map) and also under classic `\"node\"` / `\"node10\"` resolution (via a `typesVersions` fallback) — so no `tsconfig.json` change is required for existing CommonJS projects.\n\n## Examples\n\n### Model definitions and relations\n\n```js\nimport orm from './bookshelf.js'\n\nconst User = orm.model('User', {\n  tableName: 'users',\n  posts() {\n    return this.hasMany(Post)\n  },\n})\n\nconst Post = orm.model('Post', {\n  tableName: 'posts',\n  tags() {\n    return this.belongsToMany(Tag)\n  },\n})\n\nconst Tag = orm.model('Tag', {\n  tableName: 'tags',\n})\n```\n\n### Fetching with eager-loaded relations\n\n```js\nconst user = await new User({ id: 1 }).fetch({ withRelated: ['posts.tags'] })\nconsole.log(user.related('posts').toJSON())\n```\n\n### Pagination\n\n`fetchPage()` is built in — there is no separate pagination plugin to install. It is available on both models and collections, and accepts **either** `page` + `pageSize` **or** `limit` + `offset`. Any other `fetchAll` options (`withRelated`, `columns`, etc.) are passed through.\n\n```js\n// page / pageSize form (defaults: page 1, pageSize 10)\nconst result = await Post.forge().fetchPage({\n  page: 2,\n  pageSize: 15,\n  withRelated: ['tags'],\n})\n\nconsole.log(result.toJSON())        // the page of models\nconsole.log(result.pagination)\n// {\n//   rowCount: 53,  // total rows matching the query, before pagination\n//   pageCount: 4,  // total number of pages\n//   page: 2,       // the requested page\n//   pageSize: 15,  // the requested page size\n// }\n\n// limit / offset form — pagination metadata is { offset, limit, rowCount, pageCount }\nconst slice = await Post.forge().fetchPage({ limit: 20, offset: 40 })\n\n// Skip the extra COUNT query when you don't need totals (no rowCount / pageCount):\nconst fast = await Post.forge().fetchPage({ page: 1, pageSize: 25, disableCount: true })\n```\n\nIn TypeScript the return type is `Collection<T> & Pagination`, so `result.pagination` is fully typed (`FetchPageOptions` / `Pagination` are exported from the package).\n\n### Promise chaining\n\nAsync methods return a native-Promise subclass (`BPromise`) that supports bluebird-style chainable helpers — `.tap()`, `.bind()`, `.map()`, `.return()`, etc. — without requiring bluebird as a dependency.\n\n```js\nconst user = await new User({ id: 1 })\n  .fetch({ withRelated: ['posts'] })\n  .tap((u) => console.log('fetched:', u.id))\n```\n\n## TypeScript\n\n`@assetsart/bookshelf` ships first-class type declarations and is a drop-in replacement for `@types/bookshelf` (remove that package — it is no longer needed).\n\nUse the self-type pattern (`Model<Self>`) so relations and `this` are typed against your own model:\n\n```ts\nimport Bookshelf = require('@assetsart/bookshelf');\nconst orm = Bookshelf(knex);\n\nclass User extends orm.Model<User> {\n  get tableName() { return 'users'; }\n  posts() { return this.hasMany(Post); }\n}\n\n// `get<V>()` defaults to `any` (drop-in parity), with a generic escape hatch:\nconst user = await new User().fetch();\nconst name = user.get('name');                  // any — works without annotation\nconst len = user.get<string>('name').length;    // pass <V> to type the read\n```\n\n### The attribute bag\n\nThe attribute accessors — `get()`, `attributes`, `id`, `toJSON()`, `serialize()`, `previous()` — default to `any`, matching `@types/bookshelf` so existing code is a drop-in. The write-side methods that take attribute objects — `save()`, `set()`, `where()`, `query()`, `create()`, `add()`, the constructor, and `forge()` — accept `Record<string, any>`, so you can pass your own entity interfaces directly (a named `interface` without an index signature is **not** assignable to `Record<string, unknown>`, which is why these use `any`). Untyped reads flow freely, and you opt into stricter typing where you want it:\n\n- **Pass a type argument** to a read accessor:\n\n  ```ts\n  const images = model.get<string>('images');   // string\n  const rows = collection.toJSON<MyRow>();       // MyRow[]\n  ```\n\n- **Override `toJSON(): MyEntity`** to type the serialized object returned by `toJSON()` for a given model.\n\n> Earlier releases (≤ 2.2.1) defaulted these accessors to `unknown`. That was reverted to `any` in 2.2.2 for drop-in compatibility; the generic type arguments (`get<V>`, `toJSON<E>`, …) remain, so opting back into strict typing is per-call.\n\n### The `BPromise` return type\n\nEvery async ORM method returns a `BPromise<T>` (the bluebird-style native `Promise` subclass). The type is exported so you can name it in your own signatures:\n\n```ts\n// ESM — named import\nimport type { BPromise } from '@assetsart/bookshelf';\n\nfunction loadUser(id: number): BPromise<User> {\n  return new User({ id }).fetch();\n}\n```\n\n```ts\n// CJS — namespace-qualified\nimport Bookshelf = require('@assetsart/bookshelf');\ntype UserResult = Bookshelf.BPromise<User>;\n```\n\n> This exposes the **type** only. You rarely need to name it — method returns are already inferred as `BPromise<T>` — but it is available for explicit annotations and helper signatures.\n\n## What's new in 2.0 / Migrating from Bookshelf\n\n### Full TypeScript rewrite\n\nThe entire codebase has been rewritten in TypeScript and ships `.d.ts` declaration files. No `@types/bookshelf` package is needed.\n\n### Zero runtime dependencies\n\nbluebird, lodash, inflection, and create-error have all been removed and replaced by zero-dependency internal modules. The only peer dependency is `knex >= 3.1.0`.\n\n### Dual ESM + CJS output\n\nbookshelfv2 ships both an ESM build and a CommonJS build, selected automatically by Node.js via the `exports` field in `package.json`. Use `import` or `require` — both work.\n\n### Public API preserved\n\nThe public ORM API is a drop-in behaviour replacement for Bookshelf 1.x. Relation methods (`hasOne`, `hasMany`, `belongsTo`, `belongsToMany`, `morphOne`, `morphMany`, `morphTo`), lifecycle events, and all standard model/collection methods behave as before.\n\n`.tap()`, `.bind()`, `.map()`, `.return()` and other bluebird-style helpers are still available on every promise returned by async ORM methods. They are provided by an internal native `Promise` subclass (`BPromise`) — bluebird itself is not installed.\n\n### Plugin imports instead of string names\n\nIn Bookshelf 1.x plugins could be registered by string name (e.g. `orm.plugin('virtuals')`). In bookshelfv2 you import the plugin directly and pass the function to `.plugin()`:\n\n```js\n// Before (bookshelf 1.x)\nbookshelf.plugin('virtuals')\nbookshelf.plugin('case-converter')\n\n// After (bookshelfv2 2.0)\nimport virtuals from '@assetsart/bookshelf/plugins/virtuals'\nimport caseConverter from '@assetsart/bookshelf/plugins/case-converter'\norm.plugin(virtuals)\norm.plugin(caseConverter)\n```\n\n### Pagination is built in\n\nThe `pagination` plugin (and the `bookshelf-page` plugin it originated from) has been moved into core. Remove any `orm.plugin('pagination')` / `orm.plugin(require('bookshelf-page'))` calls and use [`fetchPage()`](#pagination) directly — the options and the returned `pagination` metadata are unchanged.\n\n### TypeScript moduleResolution for plugins\n\nPlugin subpaths (`@assetsart/bookshelf/plugins/*`) resolve under `\"moduleResolution\": \"node16\"`, `\"nodenext\"`, and `\"bundler\"` (through the package `exports` map). For existing CommonJS projects still on classic `\"node\"` / `\"node10\"` resolution — which ignores `exports` — a `typesVersions` fallback maps the same subpaths to their declaration files, so the imports type-check without any `tsconfig.json` change. (At runtime, Node honours the `exports` map regardless of the TypeScript setting.)\n\n### Node.js version requirement\n\nNode.js >= 16 is required.\n\n## F.A.Q.\n\n### My relations don't seem to be loading, what's up?\n\nMake sure to check that the type is correct for the initial parameters passed to the initial model being fetched. For example `new Model({id: '1'}).load([relations...])` will not return the same as `new Model({id: 1}).load([relations...])` — notice that the id is a string in one case and a number in the other. This can be a common mistake if retrieving the id from a URL parameter.\n\nThis is only an issue if you're eager loading data with `load` without first fetching the original model. `new Model({id: '1'}).fetch({withRelated: [relations...]})` should work just fine.\n\n### My process won't exit after my script is finished, why?\n\nThe issue here is that Knex, the database abstraction layer used by bookshelfv2, uses connection pooling and thus keeps the database connection open. If you want your process to exit after your script has finished, you will need to call `.destroy()` on the `knex` instance. More information about connection pooling can be found in the [Knex docs](http://knexjs.org/#Installation-pooling).\n\n### How do I debug?\n\nIf you pass `debug: true` in the options object to your `knex` initialise call, you can see all of the query calls being made. You can also pass that same option to methods that access the database, like `model.fetch()` or `model.destroy()`:\n\n```js\nimport knex from 'knex'\nimport bookshelfv2 from '@assetsart/bookshelf'\n\n// Turning on debug mode for all queries\nconst db = knex({\n  debug: true,\n  client: 'pg',\n  connection: process.env.DATABASE_URL,\n})\nconst orm = bookshelfv2(db)\n\n// Debugging a single query\nconst user = await new User({ id: 1 }).fetch({ debug: true, withRelated: ['posts.tags'] })\n```\n\n### Can I use standard Node.js style callbacks?\n\nYou can call `.asCallback(function(err, resp) {` on any database operation method and use the standard `(err, result)` style callback interface if you prefer.\n\n## Contributing\n\nThe project is hosted on [GitHub](https://github.com/Aitthi/bookshelf-v2). If you want to contribute, please open an issue or submit a pull request there.\n","readmeFilename":"README.md"}