{"_id":"@beenotung/better-sqlite3-helper","_rev":"14-f6652fba7f469af3236b66803e1d6f0b","name":"@beenotung/better-sqlite3-helper","dist-tags":{"latest":"4.1.9"},"versions":{"4.0.0":{"name":"@beenotung/better-sqlite3-helper","version":"4.0.0","keywords":["sqlite3","sqlite","sql","database","save","custom","helper","better-sqlite3"],"author":{"name":"Markus Madeja"},"license":"MIT","_id":"@beenotung/better-sqlite3-helper@4.0.0","maintainers":[{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"}],"homepage":"http://intergenies.com/programs/nodejs/better-sqlite3-helper","bugs":{"url":"https://github.com/Kauto/better-sqlite3-helper/issues"},"dist":{"shasum":"8d984fc058057ffef17ab9e5d4339fbb8f2d0e6e","tarball":"https://registry.npmjs.org/@beenotung/better-sqlite3-helper/-/better-sqlite3-helper-4.0.0.tgz","fileCount":6,"integrity":"sha512-hk90DLN0CA84s8WNLrJs/ctoGoIVxnO+7ojyGJsPKuD3zX4Qc9+hLzClYu3NY3KGSly4IFkk3+BRv5C8qEeXiA==","signatures":[{"sig":"MEQCIC1B/yDy6fRh7ZAKvctyHPwdO7Oq64vDf9BgLgbdT3lUAiB+Is8JPfpwqbyekuAWtqKYjJPX9F51xoUi1CqIYYxpvQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50087,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkDmxuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrZhw/7BYJ7QqqW6uhJh3WEzKmghrcbTRre3r9tSors/rPr79lYyG1J\r\n4/EfCd/BQ6IV3CtPw2b69xwv9ykKllZ9eoDSW8MeqGkZso6CMd9hio804ys/\r\nnPGZsZKYizQVLCOgYlwo7b69NzRefRWYNK8LV61tOb9g/gBZDSPCTNZQ6d1K\r\nhKiBYpUEq8d+kRU4yNA6gcKJEih1TRkFpwmwCzV3Oi+Gna6y1ph99z3dKqVx\r\nMp+RS3/FQg+OSeJIe+sI3ntWgukbHJaHezy7z6lmRJH0zvxaxKafgzvFDQqt\r\na64kyXv2Bg1ulcKqFXJM7b/8fkmmD3siQUPwy6EVH7DOWRj3+mu6wX0JkgI9\r\nfMlh/kVr6paqDa5PRXHMZiJh8t/iOs4+Vl4t3qQu/SdBXihlcVj5Q8C8f8y5\r\n2dlHKI9z96SvgB9ZnJ/q0y9BVqyhH7Iysc6p0g3UKs8sM8toNVvqi/QPx+rk\r\ne1pCglSsCP+NvQ2nbg5aG5Klg0x+ipD5VSmO8gpVs5lxfrWKp/3SH8wQ5LTr\r\nIyzv6YJmrWTQvXgs10TULk9QHhQLgIbWKXxjQw85QYDDkapIg/1Tza10sfXH\r\ncVWPUxFeeqlrupNBSShRohEcIq7uMoDDUTG2bOhk4tLVAdQFSHuf86p2lwF4\r\nr+87Ghc4hgXhlMFoTIUAE3B+hZeduKXigRc=\r\n=HJSk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/database.js","gitHead":"e39f3bcb3b68960ff66f9767d5b418164c83e874","scripts":{"test":"cross-env NODE_ENV=test ./node_modules/mocha/bin/_mocha --ui bdd --recursive ./test"},"_npmUser":{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"},"repository":{"url":"git+https://github.com/Kauto/better-sqlite3-helper.git","type":"git"},"_npmVersion":"9.5.0","description":"A wrapper library that eases the work with better-sqlite3 with some new functions and a migration-system","directories":{},"_nodeVersion":"18.15.0","dependencies":{"mkdirp":"^2.1.5","app-root-path":"^3.0.0","better-sqlite3":"^8.2.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","mocha":"^9.1.3","eslint":"^8.1.0","cross-env":"^7.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.25.2","eslint-plugin-promise":"^5.1.1","eslint-config-standard":"^16.0.2"},"optionalDependencies":{"app-root-path":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/better-sqlite3-helper_4.0.0_1678666861755_0.5341108982972418","host":"s3://npm-registry-packages"}},"4.0.1":{"name":"@beenotung/better-sqlite3-helper","version":"4.0.1","keywords":["sqlite3","sqlite","sql","database","save","custom","helper","better-sqlite3"],"author":{"name":"Markus Madeja"},"license":"MIT","_id":"@beenotung/better-sqlite3-helper@4.0.1","maintainers":[{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"}],"homepage":"http://intergenies.com/programs/nodejs/better-sqlite3-helper","bugs":{"url":"https://github.com/Kauto/better-sqlite3-helper/issues"},"dist":{"shasum":"f3c2ffe64049498d9a056a049eef97935ea8a469","tarball":"https://registry.npmjs.org/@beenotung/better-sqlite3-helper/-/better-sqlite3-helper-4.0.1.tgz","fileCount":6,"integrity":"sha512-quR43/Pt+Zqn1yfP39qqgKXcxxuRyu6juY+2EP4HZIzPYQY364SRt2CzOYwE67gJcOZ3vV+Ga/w7atzIprBHuQ==","signatures":[{"sig":"MEUCIQCI81GeKQCxwTCzHTG23swPI1t5ypKyg5Hjkb4jK/6SaQIgDx+N2WMUtZM4DYmhEuitsB3B2qohnW5sf9npM9wdqIs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50286,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkDm12ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpWDw/9HowlGWhnjLmRybH5R65c4QKFwaMmHM0IFo5HvnHlANJgNMJ3\r\nIHkDOO60oYwoHIuIzwSuiV/S6/f3Nt3EsxKhXW4/kpQnQKnwg9IDVBX4IPPz\r\nZ4uiUJuR4DFL5NpLYsPY3DPq6MamuKodQRgDElPtLE8tHvH0C1rVmvrn2fuM\r\nTn032QVeIJ5g930B95QXYdF7uq2JPHEwBcBKD/oEHSEY1XjsS82rrc3kzH4c\r\n8sUt8RACklVin3rZ39Pd/7dTfcSlmQ13GdNfVACkDEylfyJJ9kAzBIarMO8B\r\nlVfmJNoxaqtaZzWGcy/nxGGehabhcdvdLKaZpBZVzxK1QVdgtafzrezks5XH\r\n6tDpv9Yl9YzzBzSew4NcGvAhoOnJLXv7Ceofe3mgJI6YuiXN2sjot/LYP4pW\r\nNkqK2xcBaFQxRrxymPePJQlp9jkBXALkaQqNmNS40ak5FFi28m/ifZPibFrp\r\nqgDJ1vcNA9KY1Jj3QAYfKfo+oqiFx+FqiNOvVlb8viBW2d1jf2gRx3EbizL0\r\nHrdu6zeqSzJC3sV+1FpQAstz5l7cQwEY8cwLr9Cfs1h9RMq+G3TTRIp3SXnX\r\n5a5+fHw6RVYRkldTgX2sZtVECbfq5+rghikziAGl/T20kwpZVmLjRCrYfNSE\r\nftfs0Do8R8/wlAARX7PpOXGfQnpM+sCd+YU=\r\n=2lBl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/database.js","gitHead":"69ff1891f746db84be8255fcfa46ec31b9fc1468","scripts":{"test":"cross-env NODE_ENV=test ./node_modules/mocha/bin/_mocha --ui bdd --recursive ./test"},"_npmUser":{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"},"repository":{"url":"git+https://github.com/Kauto/better-sqlite3-helper.git","type":"git"},"_npmVersion":"9.5.0","description":"A wrapper library that eases the work with better-sqlite3 with some new functions and a migration-system","directories":{},"_nodeVersion":"18.15.0","dependencies":{"mkdirp":"^2.1.5","app-root-path":"^3.0.0","better-sqlite3":"^8.2.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","mocha":"^9.1.3","eslint":"^8.1.0","cross-env":"^7.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.25.2","@types/better-sqlite3":"^7.6.3","eslint-plugin-promise":"^5.1.1","eslint-config-standard":"^16.0.2"},"peerDependencies":{"@types/better-sqlite3":"^7.6.3"},"optionalDependencies":{"app-root-path":"^3.0.0"},"peerDependenciesMeta":{"@types/better-sqlite3":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/better-sqlite3-helper_4.0.1_1678667126776_0.6019920306905071","host":"s3://npm-registry-packages"}},"4.0.2":{"name":"@beenotung/better-sqlite3-helper","version":"4.0.2","keywords":["sqlite3","sqlite","sql","database","save","custom","helper","better-sqlite3"],"author":{"name":"Markus Madeja"},"license":"MIT","_id":"@beenotung/better-sqlite3-helper@4.0.2","maintainers":[{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"}],"homepage":"http://intergenies.com/programs/nodejs/better-sqlite3-helper","bugs":{"url":"https://github.com/Kauto/better-sqlite3-helper/issues"},"dist":{"shasum":"30c95cc705c56471f81cdd131466dc98e386db23","tarball":"https://registry.npmjs.org/@beenotung/better-sqlite3-helper/-/better-sqlite3-helper-4.0.2.tgz","fileCount":6,"integrity":"sha512-XI8QGv2KMZt+TfgOhLtcsGZB+2ZlXEfvP/2cjE6pViRpJGBepV4ZCnxe4vu2/8FsEQFhpOyaA3k7d0DlqguMvA==","signatures":[{"sig":"MEUCIEysB7XhAph8fS+vw7h8aUpEQvQBPIUrmXyQoaLFl8l1AiEA4IWv2I7dwanDsLhFya4y7Ycfbz+I/cvGpaRuVLUAHcs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50347},"main":"src/database.js","gitHead":"e74f50055d9e7e9aa41d0006435496301e225857","scripts":{"test":"cross-env NODE_ENV=test ./node_modules/mocha/bin/_mocha --ui bdd --recursive ./test"},"_npmUser":{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"},"repository":{"url":"git+https://github.com/Kauto/better-sqlite3-helper.git","type":"git"},"_npmVersion":"9.6.7","description":"A wrapper library that eases the work with better-sqlite3 with some new functions and a migration-system","directories":{},"_nodeVersion":"18.15.0","dependencies":{"app-root-path":"^3.1.0","better-sqlite3":"^8.4.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.7","mocha":"^9.2.2","eslint":"^8.41.0","cross-env":"^7.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.27.5","@types/better-sqlite3":"^7.6.4","eslint-plugin-promise":"^5.2.0","eslint-config-standard":"^16.0.3"},"peerDependencies":{"@types/better-sqlite3":"^7.6.3"},"optionalDependencies":{"app-root-path":"^3.1.0"},"peerDependenciesMeta":{"@types/better-sqlite3":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/better-sqlite3-helper_4.0.2_1685183537077_0.07430377846200908","host":"s3://npm-registry-packages"}},"4.0.3":{"name":"@beenotung/better-sqlite3-helper","version":"4.0.3","keywords":["sqlite3","sqlite","sql","database","save","custom","helper","better-sqlite3"],"author":{"name":"Markus Madeja"},"license":"MIT","_id":"@beenotung/better-sqlite3-helper@4.0.3","maintainers":[{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"}],"homepage":"http://intergenies.com/programs/nodejs/better-sqlite3-helper","bugs":{"url":"https://github.com/Kauto/better-sqlite3-helper/issues"},"dist":{"shasum":"f1f24fc4d1e1e4c0958874da7c69f842c98cda4b","tarball":"https://registry.npmjs.org/@beenotung/better-sqlite3-helper/-/better-sqlite3-helper-4.0.3.tgz","fileCount":6,"integrity":"sha512-9pyUuwIOLs/2BPQJ0jmlfvQsQPLlzHRi8j+lQucKnHtwB0I42OR1MpymYRUJ6kt8qhrG/D6FBnWsc4lbg23rgQ==","signatures":[{"sig":"MEUCIQCSgyQ4Dcq7u/cufxiFWvY2u9kh5o5jrXlpvYkGhy5kWAIgBySnSLsLUe8bNyG3H7EaJJJUadpTYeddRD7otDvz0+I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50349},"main":"src/database.js","gitHead":"e35e450490affc2e6538d4991a9dbdb420834e43","scripts":{"test":"cross-env NODE_ENV=test ./node_modules/mocha/bin/_mocha --ui bdd --recursive ./test"},"_npmUser":{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"},"repository":{"url":"git+https://github.com/Kauto/better-sqlite3-helper.git","type":"git"},"_npmVersion":"10.2.1","description":"A wrapper library that eases the work with better-sqlite3 with some new functions and a migration-system","directories":{},"_nodeVersion":"20.9.0","dependencies":{"better-sqlite3":"^9.1.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.10","mocha":"^10.2.0","eslint":"^8.53.0","cross-env":"^7.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.29.0","@types/better-sqlite3":"^7.6.7","eslint-plugin-promise":"^6.1.1","eslint-config-standard":"^17.1.0"},"peerDependencies":{"@types/better-sqlite3":"^7.6.3"},"optionalDependencies":{"app-root-path":"^3.1.0"},"peerDependenciesMeta":{"@types/better-sqlite3":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/better-sqlite3-helper_4.0.3_1699816239317_0.5598758916598525","host":"s3://npm-registry-packages"}},"4.1.0":{"name":"@beenotung/better-sqlite3-helper","version":"4.1.0","keywords":["sqlite3","sqlite","sql","database","save","custom","helper","better-sqlite3"],"author":{"name":"Markus Madeja"},"license":"MIT","_id":"@beenotung/better-sqlite3-helper@4.1.0","maintainers":[{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"}],"homepage":"http://intergenies.com/programs/nodejs/better-sqlite3-helper","bugs":{"url":"https://github.com/Kauto/better-sqlite3-helper/issues"},"dist":{"shasum":"2fbe9257e6e5d7f527486168aa26147d453953d2","tarball":"https://registry.npmjs.org/@beenotung/better-sqlite3-helper/-/better-sqlite3-helper-4.1.0.tgz","fileCount":7,"integrity":"sha512-0R5MvGm2AyFSASefn9I4mHK0xSvmJHxnOi4QSHkSmXBiR2pxQJmtKLONoiMNibbBYa6tDQ6Z8mYP9RpoKMGo/Q==","signatures":[{"sig":"MEYCIQCzW2DBfP4HVwEjFt0/bhuafmLbxpAjHuPuUOpbY9WXAQIhAJNagO7fPNYNmY//Eovr6Y8/4uBMUzUAMt7+VvLLbMeh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50803},"main":"src/database.js","gitHead":"059e998d70e9b131404d6263e8e299dc14b975f1","scripts":{"test":"cross-env NODE_ENV=test ./node_modules/mocha/bin/_mocha --ui bdd --recursive ./test"},"_npmUser":{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"},"repository":{"url":"git+https://github.com/Kauto/better-sqlite3-helper.git","type":"git"},"_npmVersion":"10.5.0","description":"A wrapper library that eases the work with better-sqlite3 with some new functions and a migration-system","directories":{},"_nodeVersion":"20.9.0","dependencies":{"better-sqlite3":"^9.4.5"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.4.1","mocha":"^10.4.0","eslint":"^8.57.0","cross-env":"^7.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.29.1","@types/better-sqlite3":"^7.6.9","eslint-plugin-promise":"^6.1.1","eslint-config-standard":"^17.1.0"},"peerDependencies":{"@types/better-sqlite3":"^7.6.3"},"optionalDependencies":{"app-root-path":"^3.1.0"},"peerDependenciesMeta":{"@types/better-sqlite3":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/better-sqlite3-helper_4.1.0_1712685995348_0.3684277470835622","host":"s3://npm-registry-packages"}},"4.1.1":{"name":"@beenotung/better-sqlite3-helper","version":"4.1.1","keywords":["sqlite3","sqlite","sql","database","save","custom","helper","better-sqlite3"],"author":{"name":"Markus Madeja"},"license":"MIT","_id":"@beenotung/better-sqlite3-helper@4.1.1","maintainers":[{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"}],"homepage":"https://github.com/beenotung/better-sqlite3-helper#readme","bugs":{"url":"https://github.com/beenotung/better-sqlite3-helper/issues"},"dist":{"shasum":"2430872278466b6946ea98a83f59178158604f0a","tarball":"https://registry.npmjs.org/@beenotung/better-sqlite3-helper/-/better-sqlite3-helper-4.1.1.tgz","fileCount":6,"integrity":"sha512-fmueBVHbxHgUWV7tpRIR6fPN40lpoTbExwd3dOL2rgGCMoN/Nq2aywqS0MxLQg+9dTxqFcuKYkoja4CkfKqFRw==","signatures":[{"sig":"MEUCIB8N0c5qPySe3Fq2gS7m+toUM6dNZuaB9C4x95xIYEMwAiEAu+XLYMhIwfy7J5MTjdzNGDDIe0vZFjrtcKADXXq4bVc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51321},"main":"src/database.js","gitHead":"c4315a23b766dea411dec4b0030bac99525a20f2","scripts":{"test":"cross-env NODE_ENV=test ./node_modules/mocha/bin/_mocha --ui bdd --recursive ./test"},"_npmUser":{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"},"repository":{"url":"git+https://github.com/beenotung/better-sqlite3-helper.git","type":"git"},"_npmVersion":"10.5.0","description":"A wrapper library that eases the work with better-sqlite3 with some new functions and a migration-system","directories":{},"_nodeVersion":"20.9.0","dependencies":{"better-sqlite3":"^9.4.5"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.4.1","mocha":"^10.4.0","eslint":"^8.57.0","cross-env":"^7.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.29.1","@types/better-sqlite3":"^7.6.9","eslint-plugin-promise":"^6.1.1","eslint-config-standard":"^17.1.0"},"peerDependencies":{"@types/better-sqlite3":"^7.6.3"},"optionalDependencies":{"app-root-path":"^3.1.0"},"peerDependenciesMeta":{"@types/better-sqlite3":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/better-sqlite3-helper_4.1.1_1712686989493_0.03788310811825224","host":"s3://npm-registry-packages"}},"4.1.2":{"name":"@beenotung/better-sqlite3-helper","version":"4.1.2","keywords":["sqlite3","sqlite","sql","database","save","custom","helper","better-sqlite3"],"author":{"name":"Markus Madeja"},"license":"MIT","_id":"@beenotung/better-sqlite3-helper@4.1.2","maintainers":[{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"}],"homepage":"https://github.com/beenotung/better-sqlite3-helper#readme","bugs":{"url":"https://github.com/beenotung/better-sqlite3-helper/issues"},"dist":{"shasum":"8d2cbb6c1f7bf3bedae82f50f17ca85d3f7c19d1","tarball":"https://registry.npmjs.org/@beenotung/better-sqlite3-helper/-/better-sqlite3-helper-4.1.2.tgz","fileCount":6,"integrity":"sha512-cHAQ0UOZoDC1VPNRhTKLSsDqc2+8RrXTf4/CX//UI5mkgYrksdJslb03QAkCaSjSYZiO2Skaq+wLzezDcA23VA==","signatures":[{"sig":"MEUCIDLfyM1DqLWCWJhvm1+tspepXeAp7jgrQTTxDk5fi1sPAiEAwcB6EmBl6PltCDB2uSkVri8dRPBAvGbfbUcFE542cXI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51405},"main":"src/database.js","gitHead":"0e69338e48a1544a45b638cf1d19d0512ee49d96","scripts":{"test":"cross-env NODE_ENV=test ./node_modules/mocha/bin/_mocha --ui bdd --recursive ./test"},"_npmUser":{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"},"repository":{"url":"git+https://github.com/beenotung/better-sqlite3-helper.git","type":"git"},"_npmVersion":"10.5.0","description":"A wrapper library that eases the work with better-sqlite3 with some new functions and a migration-system","directories":{},"_nodeVersion":"20.9.0","dependencies":{"better-sqlite3":"^9.4.5"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.4.1","mocha":"^10.4.0","eslint":"^8.57.0","cross-env":"^7.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.29.1","@types/better-sqlite3":"^7.6.9","eslint-plugin-promise":"^6.1.1","eslint-config-standard":"^17.1.0"},"peerDependencies":{"@types/better-sqlite3":"^7.6.3"},"optionalDependencies":{"app-root-path":"^3.1.0"},"peerDependenciesMeta":{"@types/better-sqlite3":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/better-sqlite3-helper_4.1.2_1712687586461_0.18430143237858676","host":"s3://npm-registry-packages"}},"4.1.3":{"name":"@beenotung/better-sqlite3-helper","version":"4.1.3","keywords":["sqlite3","sqlite","sql","database","save","custom","helper","better-sqlite3"],"author":{"name":"Markus Madeja"},"license":"MIT","_id":"@beenotung/better-sqlite3-helper@4.1.3","maintainers":[{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"}],"homepage":"https://github.com/beenotung/better-sqlite3-helper#readme","bugs":{"url":"https://github.com/beenotung/better-sqlite3-helper/issues"},"dist":{"shasum":"71ad824e7e4bef5f2199859f96dc197c64d9013b","tarball":"https://registry.npmjs.org/@beenotung/better-sqlite3-helper/-/better-sqlite3-helper-4.1.3.tgz","fileCount":6,"integrity":"sha512-JCUnFhmCuaUrmBOi4oRTx9HhvrLsKJodqUDDYtyV+oTJb2s+GB1EbXvxliIclfFYx5LgTArO0Tuc6ZdFmP7rWA==","signatures":[{"sig":"MEUCIQDFBaXikjGr9b1G5yDff7X2KPefOZ72rbesKAGZW0MFBQIgWhz8mhEaS+UlTC1P2Yb5eIDdDDK0U5PkK4+nozBc+nI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51559},"main":"src/database.js","gitHead":"55361131228b4dddf4822b46c176877fdf141e4c","scripts":{"test":"cross-env NODE_ENV=test ./node_modules/mocha/bin/_mocha --ui bdd --recursive ./test"},"_npmUser":{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"},"repository":{"url":"git+https://github.com/beenotung/better-sqlite3-helper.git","type":"git"},"_npmVersion":"10.5.2","description":"A wrapper library that eases the work with better-sqlite3 with some new functions and a migration-system","directories":{},"_nodeVersion":"20.12.2","dependencies":{"better-sqlite3":"^9.4.5"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.4.1","mocha":"^10.4.0","eslint":"^8.57.0","cross-env":"^7.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.29.1","@types/better-sqlite3":"^7.6.10","eslint-plugin-promise":"^6.1.1","eslint-config-standard":"^17.1.0"},"peerDependencies":{"@types/better-sqlite3":"^7.6.3"},"optionalDependencies":{"app-root-path":"^3.1.0"},"peerDependenciesMeta":{"@types/better-sqlite3":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/better-sqlite3-helper_4.1.3_1714210749131_0.12369509266439827","host":"s3://npm-registry-packages"}},"4.1.4":{"name":"@beenotung/better-sqlite3-helper","version":"4.1.4","keywords":["sqlite3","sqlite","sql","database","save","custom","helper","better-sqlite3"],"author":{"name":"Markus Madeja"},"license":"MIT","_id":"@beenotung/better-sqlite3-helper@4.1.4","maintainers":[{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"}],"homepage":"https://github.com/beenotung/better-sqlite3-helper#readme","bugs":{"url":"https://github.com/beenotung/better-sqlite3-helper/issues"},"dist":{"shasum":"05d44ad5916663ca5c1b8fbd5ea89b5e279f36cd","tarball":"https://registry.npmjs.org/@beenotung/better-sqlite3-helper/-/better-sqlite3-helper-4.1.4.tgz","fileCount":6,"integrity":"sha512-LCPGxRB/vC/wS18+ZJlcMJ6fR3KJrc+iJ2QakvS/X5WVIL/WmGEMXgabGPdt5QyiZDV9AYrDo0sCWoiiwxcTEg==","signatures":[{"sig":"MEQCIG96XeePqrA0pHHEzP0bsFeRLUYqmWttSxrWspV+wbmtAiBB+Un/vatdq5LbzL0SRwg5ZD79ecOEk0XephbIbkYRVA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51560},"main":"src/database.js","gitHead":"a50b579f054a36f82532ced0f093c1da35a700ee","scripts":{"test":"cross-env NODE_ENV=test ./node_modules/mocha/bin/_mocha --ui bdd --recursive ./test"},"_npmUser":{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"},"repository":{"url":"git+https://github.com/beenotung/better-sqlite3-helper.git","type":"git"},"_npmVersion":"10.8.0","description":"A wrapper library that eases the work with better-sqlite3 with some new functions and a migration-system","directories":{},"_nodeVersion":"20.12.2","dependencies":{"better-sqlite3":"^10.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.4.1","mocha":"^10.4.0","eslint":"^8.57.0","cross-env":"^7.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.29.1","@types/better-sqlite3":"^7.6.10","eslint-plugin-promise":"^6.1.1","eslint-config-standard":"^17.1.0"},"peerDependencies":{"@types/better-sqlite3":"^7.6.3"},"optionalDependencies":{"app-root-path":"^3.1.0"},"peerDependenciesMeta":{"@types/better-sqlite3":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/better-sqlite3-helper_4.1.4_1716460534229_0.5504104801996459","host":"s3://npm-registry-packages"}},"4.1.5":{"name":"@beenotung/better-sqlite3-helper","version":"4.1.5","keywords":["sqlite3","sqlite","sql","database","save","custom","helper","better-sqlite3"],"author":{"name":"Markus Madeja"},"license":"MIT","_id":"@beenotung/better-sqlite3-helper@4.1.5","maintainers":[{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"}],"homepage":"https://github.com/beenotung/better-sqlite3-helper#readme","bugs":{"url":"https://github.com/beenotung/better-sqlite3-helper/issues"},"dist":{"shasum":"25b53b4601bfc0ad7a636f8c1f74f9931bc59089","tarball":"https://registry.npmjs.org/@beenotung/better-sqlite3-helper/-/better-sqlite3-helper-4.1.5.tgz","fileCount":6,"integrity":"sha512-TSsLtzTVa2cTRNB4mNf38GFWFbUUfgKo3lKfDEQhhcAlVdZp2jRg/KK2ApTRTNqp4hTks2t6pITLl5jV4ZobzQ==","signatures":[{"sig":"MEUCICX3X0g7W1T2drhIDTPRgdHxQoTkIClFfj/RavV6TmicAiEA0sG3UdB/sQBu71GvVI8Q/2/a4iUhO4330SOY4FTvJdc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51590},"main":"src/database.js","gitHead":"cb5d2a294cf276900b8eee999192c3e28bed34ef","scripts":{"test":"cross-env NODE_ENV=test ./node_modules/mocha/bin/_mocha --ui bdd --recursive ./test"},"_npmUser":{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"},"repository":{"url":"git+https://github.com/beenotung/better-sqlite3-helper.git","type":"git"},"_npmVersion":"10.8.0","description":"A wrapper library that eases the work with better-sqlite3 with some new functions and a migration-system","directories":{},"_nodeVersion":"20.12.2","dependencies":{"better-sqlite3":"^10.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.4.1","mocha":"^10.4.0","eslint":"^8.57.0","cross-env":"^7.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.29.1","@types/better-sqlite3":"^7.6.10","eslint-plugin-promise":"^6.1.1","eslint-config-standard":"^17.1.0"},"peerDependencies":{"@types/better-sqlite3":"^7.6.3"},"optionalDependencies":{"app-root-path":"^3.1.0"},"peerDependenciesMeta":{"@types/better-sqlite3":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/better-sqlite3-helper_4.1.5_1716785002650_0.3706899622270927","host":"s3://npm-registry-packages"}},"4.1.6":{"name":"@beenotung/better-sqlite3-helper","version":"4.1.6","keywords":["sqlite3","sqlite","sql","database","save","custom","helper","better-sqlite3"],"author":{"name":"Markus Madeja"},"license":"MIT","_id":"@beenotung/better-sqlite3-helper@4.1.6","maintainers":[{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"}],"homepage":"https://github.com/beenotung/better-sqlite3-helper#readme","bugs":{"url":"https://github.com/beenotung/better-sqlite3-helper/issues"},"dist":{"shasum":"ccb50652ed90427d0914c712b22e46270a7eb0d2","tarball":"https://registry.npmjs.org/@beenotung/better-sqlite3-helper/-/better-sqlite3-helper-4.1.6.tgz","fileCount":6,"integrity":"sha512-86SEcWhsUqgkyCR/OtzviWhw37dyQ2dEk9dxLB6ZAdkkP59PB42ARn0fc31st5KTVMNn8dUGNvNEotmg3AY67Q==","signatures":[{"sig":"MEQCIDFLfgV5DTnbFvqEnuwEwCFANXqdlAEBXtN8f+t1XmlVAiALeySeZbLZevQHg7kuTKuvd+Twi7FWuPXsPnkXyx1oVQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51640},"main":"src/database.js","gitHead":"f3393f6afa99092884487cddbae1bb61eada4bd4","scripts":{"test":"cross-env NODE_ENV=test ./node_modules/mocha/bin/_mocha --ui bdd --recursive ./test"},"_npmUser":{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"},"repository":{"url":"git+https://github.com/beenotung/better-sqlite3-helper.git","type":"git"},"_npmVersion":"10.8.1","description":"A wrapper library that eases the work with better-sqlite3 with some new functions and a migration-system","directories":{},"_nodeVersion":"20.12.2","dependencies":{"better-sqlite3":"^10.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.4.1","mocha":"^10.4.0","eslint":"^8.57.0","cross-env":"^7.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.29.1","@types/better-sqlite3":"^7.6.10","eslint-plugin-promise":"^6.1.1","eslint-config-standard":"^17.1.0"},"peerDependencies":{"@types/better-sqlite3":"^7.6.3"},"optionalDependencies":{"app-root-path":"^3.1.0"},"peerDependenciesMeta":{"@types/better-sqlite3":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/better-sqlite3-helper_4.1.6_1718206576881_0.5387783065514469","host":"s3://npm-registry-packages"}},"4.1.7":{"name":"@beenotung/better-sqlite3-helper","version":"4.1.7","keywords":["sqlite3","sqlite","sql","database","save","custom","helper","better-sqlite3"],"author":{"name":"Markus Madeja"},"license":"MIT","_id":"@beenotung/better-sqlite3-helper@4.1.7","maintainers":[{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"}],"homepage":"https://github.com/beenotung/better-sqlite3-helper#readme","bugs":{"url":"https://github.com/beenotung/better-sqlite3-helper/issues"},"dist":{"shasum":"a2d9c8e993b2308b671309c5043e7475d7a7ca34","tarball":"https://registry.npmjs.org/@beenotung/better-sqlite3-helper/-/better-sqlite3-helper-4.1.7.tgz","fileCount":6,"integrity":"sha512-a4lR4R/XcpfNRH0v9QGcPzYmS8i/uPnPNGtU13kjFqitaDhIZ7l2YUEYJbovK7FQv0gIi2NbF6twaWaGA3rWtg==","signatures":[{"sig":"MEUCICYHdVBj7HUxTyFWCPYS+bqo5Kuqx5xENl0XYCnqQHheAiEA6AQoUf//Dx5reD6evEZjUoQXzmR2dEAmM2A5oIknwuc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51640},"main":"src/database.js","gitHead":"872ae75798db3ba20603d6670130e466ec2661e7","scripts":{"test":"cross-env NODE_ENV=test ./node_modules/mocha/bin/_mocha --ui bdd --recursive ./test"},"_npmUser":{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"},"repository":{"url":"git+https://github.com/beenotung/better-sqlite3-helper.git","type":"git"},"_npmVersion":"10.8.1","description":"A wrapper library that eases the work with better-sqlite3 with some new functions and a migration-system","directories":{},"_nodeVersion":"20.12.2","dependencies":{"better-sqlite3":"^11.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.4.1","mocha":"^10.4.0","eslint":"^8.57.0","cross-env":"^7.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.29.1","@types/better-sqlite3":"^7.6.10","eslint-plugin-promise":"^6.1.1","eslint-config-standard":"^17.1.0"},"peerDependencies":{"@types/better-sqlite3":"^7.6.3"},"optionalDependencies":{"app-root-path":"^3.1.0"},"peerDependenciesMeta":{"@types/better-sqlite3":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/better-sqlite3-helper_4.1.7_1718641722904_0.14176368787230254","host":"s3://npm-registry-packages"}},"4.1.8":{"name":"@beenotung/better-sqlite3-helper","version":"4.1.8","keywords":["sqlite3","sqlite","sql","database","save","custom","helper","better-sqlite3"],"author":{"name":"Markus Madeja"},"license":"MIT","_id":"@beenotung/better-sqlite3-helper@4.1.8","maintainers":[{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"}],"homepage":"https://github.com/beenotung/better-sqlite3-helper#readme","bugs":{"url":"https://github.com/beenotung/better-sqlite3-helper/issues"},"dist":{"shasum":"9218fe13c6f3cf3c3df9b423cf2c903fddd0d4c8","tarball":"https://registry.npmjs.org/@beenotung/better-sqlite3-helper/-/better-sqlite3-helper-4.1.8.tgz","fileCount":6,"integrity":"sha512-vMBL93rr5KeUKNvm+N6yy2jFPVJQfl8rMtgG3I8WPIUssuyf5YVknCbZjXRI1K+bNcaeA7Akuzs4QxE4v0aL8Q==","signatures":[{"sig":"MEYCIQD6tPzPfn+qlIXVQFmqvb9xMgBdBvteYNauXrw433c91gIhAMdfVfKyGdDg58BNvSaKItdEJAlMe+eLXvGumPfBAT3b","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51872},"main":"src/database.js","pnpm":{"onlyBuiltDependencies":["better-sqlite3"]},"gitHead":"17c8f162d7af35f5b2a397b37865e0e539aa9352","scripts":{"test":"cross-env NODE_ENV=test ./node_modules/mocha/bin/_mocha --ui bdd --recursive ./test"},"_npmUser":{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"},"repository":{"url":"git+https://github.com/beenotung/better-sqlite3-helper.git","type":"git"},"_npmVersion":"11.5.2","description":"A wrapper library that eases the work with better-sqlite3 with some new functions and a migration-system","directories":{},"_nodeVersion":"22.13.1","dependencies":{"better-sqlite3":"^12.4.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^6.2.0","mocha":"^11.7.4","eslint":"^8.57.1","cross-env":"^10.1.0","eslint-plugin-node":"^11.1.0","eslint-plugin-import":"^2.32.0","@types/better-sqlite3":"^7.6.13","eslint-plugin-promise":"^6.6.0","eslint-config-standard":"^17.1.0"},"peerDependencies":{"@types/better-sqlite3":"^7.6.3"},"optionalDependencies":{"app-root-path":"^3.1.0"},"peerDependenciesMeta":{"@types/better-sqlite3":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/better-sqlite3-helper_4.1.8_1759817902524_0.7547845087142413","host":"s3://npm-registry-packages-npm-production"}},"4.1.9":{"name":"@beenotung/better-sqlite3-helper","version":"4.1.9","description":"A wrapper library that eases the work with better-sqlite3 with some new functions and a migration-system","main":"src/database.js","scripts":{"test":"cross-env NODE_ENV=test ./node_modules/mocha/bin/_mocha --ui bdd --recursive ./test"},"author":{"name":"Markus Madeja"},"maintainers":[{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"}],"repository":{"type":"git","url":"git+https://github.com/beenotung/better-sqlite3-helper.git"},"bugs":{"url":"https://github.com/beenotung/better-sqlite3-helper/issues"},"homepage":"https://github.com/beenotung/better-sqlite3-helper#readme","license":"MIT","keywords":["sqlite3","sqlite","sql","database","save","custom","helper","better-sqlite3"],"dependencies":{"better-sqlite3":"^12.6.2"},"devDependencies":{"@types/better-sqlite3":"^7.6.13","app-root-path":"^3.1.0","chai":"^6.2.2","cross-env":"^10.1.0","eslint":"^8.57.1","eslint-config-standard":"^17.1.0","eslint-plugin-import":"^2.32.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^6.6.0","mocha":"^11.7.5"},"peerDependencies":{"@types/better-sqlite3":"^7.6.3"},"peerDependenciesMeta":{"@types/better-sqlite3":{"optional":true}},"pnpm":{"onlyBuiltDependencies":["better-sqlite3"]},"gitHead":"3ff87b0c8fd2bb632a7b4540005efcd74129ac22","_id":"@beenotung/better-sqlite3-helper@4.1.9","_nodeVersion":"24.13.0","_npmVersion":"11.8.0","dist":{"integrity":"sha512-83bsE4kzlyU9XkqQHh7YDC1b5BUagMYp5yWpBtF04V8z4uURYKHFilXSbAXq843NhUiPY739IvreqPxbxC9mfA==","shasum":"46f4e4f65fdf01078ac7562683217a8426aee829","tarball":"https://registry.npmjs.org/@beenotung/better-sqlite3-helper/-/better-sqlite3-helper-4.1.9.tgz","fileCount":6,"unpackedSize":51840,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHaQJJiJonHsHyz+3JMqDbe+ER2Ch9WuBlgUUN5t23L0AiBTCWmEQgmMcqxpJs8bWH2S66XQuAo1UacFZobYFuIUvA=="}]},"_npmUser":{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/better-sqlite3-helper_4.1.9_1769383367329_0.9172011324313456"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-13T00:21:01.653Z","modified":"2026-01-25T23:22:47.597Z","4.0.0":"2023-03-13T00:21:01.969Z","4.0.1":"2023-03-13T00:25:26.930Z","4.0.2":"2023-05-27T10:32:17.283Z","4.0.3":"2023-11-12T19:10:39.495Z","4.1.0":"2024-04-09T18:06:35.588Z","4.1.1":"2024-04-09T18:23:09.663Z","4.1.2":"2024-04-09T18:33:06.614Z","4.1.3":"2024-04-27T09:39:09.274Z","4.1.4":"2024-05-23T10:35:34.462Z","4.1.5":"2024-05-27T04:43:22.816Z","4.1.6":"2024-06-12T15:36:17.041Z","4.1.7":"2024-06-17T16:28:43.091Z","4.1.8":"2025-10-07T06:18:22.694Z","4.1.9":"2026-01-25T23:22:47.474Z"},"bugs":{"url":"https://github.com/beenotung/better-sqlite3-helper/issues"},"author":{"name":"Markus Madeja"},"license":"MIT","homepage":"https://github.com/beenotung/better-sqlite3-helper#readme","keywords":["sqlite3","sqlite","sql","database","save","custom","helper","better-sqlite3"],"repository":{"type":"git","url":"git+https://github.com/beenotung/better-sqlite3-helper.git"},"description":"A wrapper library that eases the work with better-sqlite3 with some new functions and a migration-system","maintainers":[{"name":"beenotung","email":"aabbcc1241@yahoo.com.hk"}],"readme":"# @beenotung/better-sqlite3-helper\n\n[![npm Package Version](https://img.shields.io/npm/v/@beenotung/better-sqlite3-helper)](https://www.npmjs.com/package/@beenotung/better-sqlite3-helper)\n\nA nodejs wrapper library for the work with [better-sqlite3](https://www.npmjs.com/package/better-sqlite3/) (\"The fastest and simplest library for SQLite3 in Node.js\"). It's intended for simple server-apps for nodejs and offer some new functions and a migration-system.\n\nThis package is forked from [better-sqlite3-helper](https://github.com/Kauto/better-sqlite3-helper) by [Kauto](https://github.com/Kauto). Most changes were back-ported but some [pull requests](https://github.com/Kauto/better-sqlite3-helper/pulls) are still pending.\n  \n## New in Version 4.x\n- breaking: forked into `@beenotung/better-sqlite3-helper` for npm release\n- breaking: [better-sqlite3](https://www.npmjs.com/package/better-sqlite3/) Version 12 is now used.\n- feat: `@types/better-sqlite3` is added as optional and peer dependencies\n- feat: auto setup synchronous pragma when establish connection to database\n- patch: fix type signature for creating new instance of DB\n- chore: no longer depends on `mkdirp`, using the built-in version from `fs` instead\n\n## New in Version 3.0\n[better-sqlite3](https://www.npmjs.com/package/better-sqlite3/) Version 7 is now used. This means that the option \"memory\" is removed (use path `:memory:` instead - worked in version 2 too) and support for Node.js versions < 10 is dropped. For older node versions you can continue using version 2 of this library.\n\n## New in Version 2.0\nAll commands of better-sqlite3 Version 5 (like [function](https://github.com/JoshuaWise/better-sqlite3/blob/master/docs/api.md#functionname-options-function---this) and [backup](https://github.com/JoshuaWise/better-sqlite3/blob/master/docs/api.md#backupdestination-options---promise)) can now be used too. Commands for Version 4 are removed. In addition there is now a TypeScript Declaration File for this library.\n\n## How to install\n\nInstall it for example with\n\n```bash\nnpm i @beenotung/better-sqlite3-helper\n```\n\n## How to use\n\nIn every file you want access to a sqlite3 database simply require the library and use it right away.\n##### anyServerFile.js\n```js\nconst DB = require('@beenotung/better-sqlite3-helper')\n\nlet row = DB().queryFirstRow('SELECT * FROM users WHERE id=?', userId);\nconsole.log(row.firstName, row.lastName, row.email);\n```\n\nTo setup your database, create a `sql`-file named `001-init.sql` in a `migrations`-directory in the root-directory of your program.\n##### ~/migrations/001-init.sql\n```sql\n-- Up\nCREATE TABLE `users` (\n  id INTEGER PRIMARY KEY,\n  firstName TEXT NOT NULL,\n  lastName TEXT NOT NULL,\n  email TEXT NOT NULL\n);\n\n-- Down\nDROP TABLE IF EXISTS `users`;\n```\nAnd that's it!\n\n## One global instance\nA normal, simple application is mostly working with only one database. To make the class management more easy, this library does the access-control for you - mainly as a singleton. (But you can create a new instance to access other databases.)\n\nThe database loads lazy. Only when it's used for the first time, the database is read from the file, the migration is started and the journal-mode WAL is set. The default directory of the database is `'./data/sqlite3.db'`.\n\nIf you want to change the default-values, you can do this by calling the library once in the beginning of your server-code and thus setting it up:\n##### index.js\n```js\nconst DB = require('@beenotung/better-sqlite3-helper')\n\n// The first call creates the global instance with your settings\nDB({\n  path: './data/sqlite3.db', // this is the default\n  readonly: false, // read only\n  fileMustExist: false, // throw error if database not exists\n  WAL: true, // automatically enable 'PRAGMA journal_mode = WAL'\n  migrate: {  // disable completely by setting `migrate: false`\n    force: false, // set to 'last' to automatically reapply the last migration-file\n    table: 'migration', // name of the database table that is used to keep track\n    migrationsPath: './migrations' // path of the migration-files\n  }\n})\n```\n\nAfter that you can use the library without parameter:\n##### anotherAPIFile.js\n```js\nconst DB = require('@beenotung/better-sqlite3-helper')\n\n// a second call directly returns the global instance\nlet row = DB().queryFirstRow('SELECT * FROM users WHERE id=?', userId);\nconsole.log(row.firstName, row.lastName, row.email);\n```\n\n## New Functions\nThis class implements shorthand methods for [better-sqlite3](https://www.npmjs.com/package/better-sqlite3/).\n\n```js\n// shorthand for db.prepare('SELECT * FROM users').all();\nlet allUsers = DB().query('SELECT * FROM users');\n// result: [{id: 1, firstName: 'a', lastName: 'b', email: 'foo@b.ar'},{},...]\n// result for no result: []\n\n// shorthand for db.prepare('SELECT * FROM users WHERE id=?').get(userId);\nlet row = DB().queryFirstRow('SELECT * FROM users WHERE id=?', userId);\n// result: {id: 1, firstName: 'a', lastName: 'b', email: 'foo@b.ar'}\n// result for no result: undefined\n\n// shorthand for db.prepare('SELECT * FROM users WHERE id=?').get(999) || {};\nlet {id, firstname} = DB().queryFirstRowObject('SELECT * FROM users WHERE id=?', userId);\n// result: id = 1; firstName = 'a'\n// result for no result: id = undefined; firstName = undefined\n\n// shorthand for db.prepare('SELECT * FROM users WHERE id=?').pluck(true).get(userId);\nlet email = DB().queryFirstCell('SELECT email FROM users WHERE id=?', userId);\n// result: 'foo@b.ar'\n// result for no result: undefined\n\n// shorthand for db.prepare('SELECT * FROM users').all().map(e => e.email);\nlet emails = DB().queryColumn('email', 'SELECT email FROM users');\n// result: ['foo@b.ar', 'foo2@b.ar', ...]\n// result for no result: []\n\n// shorthand for db.prepare('SELECT * FROM users').all().reduce((o, e) => {o[e.lastName] = e.email; return o;}, {});\nlet emailsByLastName = DB().queryKeyAndColumn('lastName', 'email', 'SELECT lastName, name FROM users');\n// result: {b: 'foo@b.ar', c: 'foo2@b.ar', ...}\n// result for no result: {}\n```\n\n## Insert, Update and Replace\n\nThere are shorthands for `update`, `insert`, `replace` and `delete`. They are intended to make programming of CRUD-Rest-API-functions easier. With a `blacklist` or a `whitelist` it's even possible to send a request's query (or body) directly into the database.\n\n### Update\n```js\n// const numberOfChangedRows = DB().update(table, data, where, whitelist = undefined)\n\n// simple use with a object as where and no whitelist\nDB().update('users', {\n  lastName: 'Mustermann',\n  firstName: 'Max'\n}, {\n  email: 'unknown@emailprovider.com'\n})\n\n// data from a request and a array as a where and only editing of lastName and firstName is allowed\nDB().update('users', req.body, ['email = ?', req.body.email], ['lastName', 'firstName'])\n\n\n// update with blacklist (id and email is not allowed; only valid columns of the table are allowed) and where is a shorthand for ['id = ?', req.body.id]\nDB().updateWithBlackList('users', req.body, req.body.id, ['id', 'email'])\n```\n\n### Insert and replace\n```js\n// const lastInsertID = DB().insert(table, datas, whitelist = undefined)\n// const lastInsertID = DB().replace(table, datas, whitelist = undefined)\n\n// simple use with an object and no whitelist\nDB().insert('users', {\n  lastName: 'Mustermann',\n  firstName: 'Max',\n  email: 'unknown@emailprovider.com'\n})\n\n// inserting two users\nDB().insert('users', [{\n  lastName: 'Mustermann',\n  firstName: 'Max',\n  email: 'unknown@emailprovider.com'\n}, {\n  lastName: 'Mustermann2',\n  firstName: 'Max2',\n  email: 'unknown2@emailprovider.com'\n}])\n\n// data from a request and only lastName and firstName are set\nDB().replace('users', req.body, ['lastName', 'firstName'])\n\n\n// replace with blacklist (id and email is not allowed; only valid columns of the table are allowed)\nDB().replaceWithBlackList('users', req.body, ['id', 'email']) // or insertWithBlackList\n```\n\n### Delete\n```js\n//delete the user with an id of 4\nDB().delete('users', {id: 4})\n```\n\n### Try and catch\n\nIf you want to put invalid values into the database, the functions will throw an error. So don't forget to surround the functions with a `try-catch`. Here is an example for an express-server:\n```js\nconst { Router } = require('express')\nconst bodyParser = require('body-parser')\nconst DB = require('@beenotung/better-sqlite3-helper')\n\nrouter.patch('/user/:id', bodyParser.json(), function (req, res, next) {\n  try {\n    if (!req.params.id) {\n      res.status(400).json({error: 'missing id'})\n      return\n    }\n    DB().updateWithBlackList(\n      'users',\n      req.body,\n      req.params.id,\n      ['id']\n    )\n\n    res.statusCode(200)\n  } catch (e) {\n    console.error(e)\n    res.status(503).json({error: e.message})\n  }\n})\n```\n\n\n\n## Migrations\n\nThe migration in this library mimics the migration system of the excellent [sqlite](https://www.npmjs.com/package/sqlite) by Kriasoft.\n\nTo use this feature you have to create a `migrations`-directory in your root. Inside you create `sql`-files that are separated in a up- and a down-part:\n\n##### `migrations/001-initial-schema.sql`\n\n```sql\n-- Up\nCREATE TABLE Category (id INTEGER PRIMARY KEY, name TEXT);\nCREATE TABLE Post (id INTEGER PRIMARY KEY, categoryId INTEGER, title TEXT,\n  CONSTRAINT Post_fk_categoryId FOREIGN KEY (categoryId)\n    REFERENCES Category (id) ON UPDATE CASCADE ON DELETE CASCADE);\nINSERT INTO Category (id, name) VALUES (1, 'Business');\nINSERT INTO Category (id, name) VALUES (2, 'Technology');\n\n-- Down\nDROP TABLE Category\nDROP TABLE Post;\n```\n\n##### `migrations/002-missing-index.sql`\n\n```sql\n-- Up\nCREATE INDEX Post_ix_categoryId ON Post (categoryId);\n\n-- Down\nDROP INDEX Post_ix_categoryId;\n```\n\nThe files need to be numbered. They are automatically executed before the first use of the database.\n\n**NOTE**: For the development environment, while working on the database schema, you may want to set\n`force: 'last'` (default `false`) that will force the migration API to rollback and re-apply the latest migration over again each time when Node.js app launches. See \"Global Instance\".\n\nYou can also give an array of changes.\n\n```js\nconst DB = require('@beenotung/better-sqlite3-helper')\n\nconst db = new DB({\n  migrate: {\n    migrations: [\n      `-- Up\n      CREATE TABLE Setting (\n        key TEXT NOT NULL UNIQUE,\n        value BLOB,\n        type INT NOT NULL DEFAULT 0,\n        PRIMARY KEY(key)\n      );\n      CREATE INDEX IF NOT EXISTS Setting_index_key ON Setting (key);\n\n      -- Down\n      DROP INDEX IF EXISTS Setting_index_key;\n      DROP TABLE IF EXISTS Setting;\n      `,\n      `-- Up\n      INSERT INTO Setting (key, value, type) VALUES ('test', 'now', 0);\n      INSERT INTO Setting (key, value, type) VALUES ('testtest', 'nownow', 6);\n\n      -- Down\n      DELETE FROM Setting WHERE key = 'test';\n      DELETE FROM Setting WHERE key = 'testtest';\n      `\n    ]\n  }\n})\n```\n\n## More Documentation of better-sqlite3\n\n- [API documentation](https://github.com/JoshuaWise/better-sqlite3/wiki/API)\n\n## License\n\n[MIT](https://github.com/beenotung/better-sqlite3-helper/blob/master/LICENSE)\n","readmeFilename":"README.md"}