{"_id":"sql-template-strings","_rev":"2945467","name":"sql-template-strings","description":"ES6 tagged template strings for prepared statements with mysql and postgres","dist-tags":{"latest":"2.2.2"},"maintainers":[{"name":"felixfbecker","email":"felix.b@outlook.com"}],"time":{"modified":"2023-04-21T09:51:51.000Z","created":"2015-09-19T20:38:52.997Z","2.2.2":"2016-09-17T02:07:02.404Z","2.2.1":"2016-09-16T20:53:18.507Z","2.2.0":"2016-08-11T12:56:26.490Z","2.1.1":"2016-08-10T13:30:28.385Z","2.1.0":"2016-08-10T13:24:25.699Z","2.0.4":"2016-07-17T17:00:18.401Z","2.0.3":"2016-06-28T10:19:14.653Z","2.0.2":"2016-05-12T13:04:28.912Z","2.0.1":"2016-05-12T12:58:49.950Z","2.0.0":"2016-05-03T16:31:17.254Z","1.1.2":"2016-01-17T22:36:48.341Z","1.1.1":"2015-10-16T09:11:54.519Z","1.1.0":"2015-09-29T02:15:36.123Z","1.0.2":"2015-09-19T20:45:07.793Z","1.0.1":"2015-09-19T20:38:52.997Z"},"users":{},"author":{"name":"Felix Becker"},"repository":{"type":"git","url":"git+https://github.com/felixfbecker/node-sql-template-strings.git"},"versions":{"2.2.2":{"name":"sql-template-strings","version":"2.2.2","description":"ES6 tagged template strings for prepared statements with mysql and postgres","main":"index.js","typings":"index.d.ts","engines":{"node":">=4.0.0"},"repository":{"type":"git","url":"git+https://github.com/felixfbecker/node-sql-template-strings.git"},"scripts":{"lint":"eslint index.js test","test":"mocha test","cover":"nyc --all mocha test","typedoc":"typedoc --module es2015 --target es2015 --includeDeclarations --mode file --readme none --out typedoc index.d.ts"},"keywords":["mysql","mysql2","postgres","pg","prepared","statements","placeholder","es6","tagged","template","strings"],"author":{"name":"Felix Becker"},"license":"ISC","devDependencies":{"eslint":"^3.4.0","mocha":"^3.0.2","nyc":"^8.1.0","typedoc":"^0.4.4"},"nyc":{"include":["index.js"],"exclude":["test/**/*.js"]},"gitHead":"84ff820160e6d8b1a06d1e7c408a79b3843e5493","bugs":{"url":"https://github.com/felixfbecker/node-sql-template-strings/issues"},"homepage":"https://github.com/felixfbecker/node-sql-template-strings#readme","_id":"sql-template-strings@2.2.2","_shasum":"3f11508a25addfce217a3042a9d300c3193b96ff","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.5.0","_npmUser":{"name":"felixfbecker","email":"felix.b@outlook.com"},"dist":{"shasum":"3f11508a25addfce217a3042a9d300c3193b96ff","size":6894,"noattachment":false,"key":"/sql-template-strings/-/sql-template-strings-2.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/sql-template-strings/download/sql-template-strings-2.2.2.tgz"},"maintainers":[{"name":"felixfbecker","email":"felix.b@outlook.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/sql-template-strings-2.2.2.tgz_1474078020673_0.5804856750182807"},"directories":{},"publish_time":1474078022404,"_hasShrinkwrap":false,"_cnpm_publish_time":1474078022404,"_cnpmcore_publish_time":"2021-12-16T18:45:58.276Z"},"2.2.1":{"name":"sql-template-strings","version":"2.2.1","description":"ES6 tagged template strings for prepared statements with mysql and postgres","main":"index.js","typings":"index.d.ts","engines":{"node":">=4.0.0"},"repository":{"type":"git","url":"git+https://github.com/felixfbecker/node-sql-template-strings.git"},"scripts":{"lint":"eslint index.js test","test":"mocha test","cover":"nyc --all mocha test","typedoc":"typedoc --module es2015 --target es2015 --includeDeclarations --mode file --readme none --out typedoc index.d.ts"},"keywords":["mysql","mysql2","postgres","pg","prepared","statements","placeholder","es6","tagged","template","strings"],"author":{"name":"Felix Becker"},"license":"ISC","devDependencies":{"eslint":"^3.4.0","mocha":"^3.0.2","nyc":"^8.1.0","typedoc":"^0.4.4"},"nyc":{"include":["index.js"],"exclude":["test/**/*.js"]},"gitHead":"85304223e2bb2ca917ebcd59a098d4d506914623","bugs":{"url":"https://github.com/felixfbecker/node-sql-template-strings/issues"},"homepage":"https://github.com/felixfbecker/node-sql-template-strings#readme","_id":"sql-template-strings@2.2.1","_shasum":"88a1686c864be4d2e724a31fb8660aad6399df76","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.5.0","_npmUser":{"name":"felixfbecker","email":"felix.b@outlook.com"},"dist":{"shasum":"88a1686c864be4d2e724a31fb8660aad6399df76","size":6861,"noattachment":false,"key":"/sql-template-strings/-/sql-template-strings-2.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/sql-template-strings/download/sql-template-strings-2.2.1.tgz"},"maintainers":[{"name":"felixfbecker","email":"felix.b@outlook.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/sql-template-strings-2.2.1.tgz_1474059196492_0.5549432663246989"},"directories":{},"publish_time":1474059198507,"_hasShrinkwrap":false,"_cnpm_publish_time":1474059198507,"_cnpmcore_publish_time":"2021-12-16T18:45:58.533Z"},"2.2.0":{"name":"sql-template-strings","version":"2.2.0","description":"ES6 tagged template strings for prepared statements with mysql and postgres","main":"index.js","typings":"index.d.ts","engines":{"node":">4.0.0"},"repository":{"type":"git","url":"git+https://github.com/felixfbecker/node-sql-template-strings.git"},"scripts":{"test":"eslint index.js && mocha","typedoc":"typedoc --module es2015 --target es2015 --includeDeclarations --mode file --readme none --out typedoc index.d.ts"},"keywords":["mysql","mysql2","postgres","pg","prepared","statements","placeholder","es6","tagged","template","strings"],"author":{"name":"Felix Becker"},"license":"ISC","devDependencies":{"eslint":"^2.9.0","mocha":"^2.3.3","typedoc":"^0.4.4"},"gitHead":"1778bfab8d2c69b6ed453d4593e40072922b3c50","bugs":{"url":"https://github.com/felixfbecker/node-sql-template-strings/issues"},"homepage":"https://github.com/felixfbecker/node-sql-template-strings#readme","_id":"sql-template-strings@2.2.0","_shasum":"129f62a5972398488d485709b0805eb28cb8e4e1","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.1.0","_npmUser":{"name":"felixfbecker","email":"felix.b@outlook.com"},"dist":{"shasum":"129f62a5972398488d485709b0805eb28cb8e4e1","size":6427,"noattachment":false,"key":"/sql-template-strings/-/sql-template-strings-2.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sql-template-strings/download/sql-template-strings-2.2.0.tgz"},"maintainers":[{"name":"felixfbecker","email":"felix.b@outlook.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/sql-template-strings-2.2.0.tgz_1470920184418_0.15984271909110248"},"directories":{},"publish_time":1470920186490,"_hasShrinkwrap":false,"_cnpm_publish_time":1470920186490,"_cnpmcore_publish_time":"2021-12-16T18:45:58.815Z"},"2.1.1":{"name":"sql-template-strings","version":"2.1.1","description":"ES6 tagged template strings for prepared statements with mysql and postgres","main":"index.js","typings":"index.d.ts","engines":{"node":">4.0.0"},"repository":{"type":"git","url":"git+https://github.com/felixfbecker/node-sql-template-strings.git"},"scripts":{"test":"eslint index.js && mocha","typedoc":"typedoc --module es2015 --target es2015 --includeDeclarations --mode file --readme none --out typedoc index.d.ts"},"keywords":["mysql","mysql2","postgres","pg","prepared","statements","placeholder","es6","tagged","template","strings"],"author":{"name":"Felix Becker"},"license":"ISC","devDependencies":{"eslint":"^2.9.0","mocha":"^2.3.3","typedoc":"^0.4.4"},"gitHead":"89950de105386c7c62f6d4fef866b0d3cc328803","bugs":{"url":"https://github.com/felixfbecker/node-sql-template-strings/issues"},"homepage":"https://github.com/felixfbecker/node-sql-template-strings#readme","_id":"sql-template-strings@2.1.1","_shasum":"ede64fd378d77946e98f412117e4ab1ff08fdbc9","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.1.0","_npmUser":{"name":"felixfbecker","email":"felix.b@outlook.com"},"dist":{"shasum":"ede64fd378d77946e98f412117e4ab1ff08fdbc9","size":5842,"noattachment":false,"key":"/sql-template-strings/-/sql-template-strings-2.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/sql-template-strings/download/sql-template-strings-2.1.1.tgz"},"maintainers":[{"name":"felixfbecker","email":"felix.b@outlook.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/sql-template-strings-2.1.1.tgz_1470835825517_0.4649466220289469"},"directories":{},"publish_time":1470835828385,"_hasShrinkwrap":false,"_cnpm_publish_time":1470835828385,"_cnpmcore_publish_time":"2021-12-16T18:45:59.013Z"},"2.1.0":{"name":"sql-template-strings","version":"2.1.0","description":"ES6 tagged template strings for prepared statements with mysql and postgres","main":"index.js","typings":"index.d.ts","engines":{"node":">4.0.0"},"repository":{"type":"git","url":"git+https://github.com/felixfbecker/node-sql-template-strings.git"},"scripts":{"test":"eslint index.js && mocha","typedoc":"typedoc --module es2015 --target es2015 --includeDeclarations --mode file --readme none --out typedoc index.d.ts"},"keywords":["mysql","mysql2","postgres","pg","prepared","statements","placeholder","es6","tagged","template","strings"],"author":{"name":"Felix Becker"},"license":"ISC","devDependencies":{"eslint":"^2.9.0","mocha":"^2.3.3","typedoc":"^0.4.4"},"gitHead":"5acb6ddb0d949d5225cd245ced6bdcc3f34c9866","bugs":{"url":"https://github.com/felixfbecker/node-sql-template-strings/issues"},"homepage":"https://github.com/felixfbecker/node-sql-template-strings#readme","_id":"sql-template-strings@2.1.0","_shasum":"40dc88435afa566566c79e3d1960738024ec13da","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.1.0","_npmUser":{"name":"felixfbecker","email":"felix.b@outlook.com"},"dist":{"shasum":"40dc88435afa566566c79e3d1960738024ec13da","size":5841,"noattachment":false,"key":"/sql-template-strings/-/sql-template-strings-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sql-template-strings/download/sql-template-strings-2.1.0.tgz"},"maintainers":[{"name":"felixfbecker","email":"felix.b@outlook.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/sql-template-strings-2.1.0.tgz_1470835463766_0.3730098295491189"},"directories":{},"publish_time":1470835465699,"_hasShrinkwrap":false,"_cnpm_publish_time":1470835465699,"_cnpmcore_publish_time":"2021-12-16T18:45:59.224Z"},"2.0.4":{"name":"sql-template-strings","version":"2.0.4","description":"ES6 tagged template strings for prepared statements with mysql and postgres","main":"index.js","typings":"index.d.ts","engines":{"node":">4.0.0"},"repository":{"type":"git","url":"git+https://github.com/felixfbecker/node-sql-template-strings.git"},"scripts":{"test":"eslint index.js && mocha","typedoc":"typedoc --module es2015 --target es2015 --includeDeclarations --mode file --readme none --out typedoc index.d.ts"},"keywords":["mysql","mysql2","postgres","pg","prepared","statements","placeholder","es6","tagged","template","strings"],"author":{"name":"Felix Becker"},"license":"ISC","devDependencies":{"eslint":"^2.9.0","mocha":"^2.3.3","typedoc":"^0.4.4"},"gitHead":"c79559e618f09aef4874e1eb45c9cfc0e2ca5236","bugs":{"url":"https://github.com/felixfbecker/node-sql-template-strings/issues"},"homepage":"https://github.com/felixfbecker/node-sql-template-strings#readme","_id":"sql-template-strings@2.0.4","_shasum":"6c95c430ce9674ecb0cde66e31b17c9cfe3b1a26","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.0.0","_npmUser":{"name":"felixfbecker","email":"felix.b@outlook.com"},"dist":{"shasum":"6c95c430ce9674ecb0cde66e31b17c9cfe3b1a26","size":5605,"noattachment":false,"key":"/sql-template-strings/-/sql-template-strings-2.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/sql-template-strings/download/sql-template-strings-2.0.4.tgz"},"maintainers":[{"name":"felixfbecker","email":"felix.b@outlook.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/sql-template-strings-2.0.4.tgz_1468774816069_0.6620795696508139"},"directories":{},"publish_time":1468774818401,"_hasShrinkwrap":false,"_cnpm_publish_time":1468774818401,"_cnpmcore_publish_time":"2021-12-16T18:45:59.519Z"},"2.0.3":{"name":"sql-template-strings","version":"2.0.3","description":"ES6 tagged template strings for prepared statements with mysql and postgres","main":"index.js","typings":"index.d.ts","engines":{"node":">4.0.0"},"repository":{"type":"git","url":"git+https://github.com/felixfbecker/node-sql-template-strings.git"},"scripts":{"test":"eslint index.js && mocha"},"keywords":["mysql","mysql2","postgres","pg","prepared","statements","placeholder","es6","tagged","template","strings"],"author":{"name":"Felix Becker"},"license":"ISC","devDependencies":{"eslint":"^2.9.0","mocha":"^2.3.3"},"gitHead":"3e4da5c6fe2ed1b9e83ef26bd826a2f26cc7a8c4","bugs":{"url":"https://github.com/felixfbecker/node-sql-template-strings/issues"},"homepage":"https://github.com/felixfbecker/node-sql-template-strings#readme","_id":"sql-template-strings@2.0.3","_shasum":"73cc0d21cb7c06926b5aa026deee577b05d84dd2","_from":".","_npmVersion":"3.9.2","_nodeVersion":"6.1.0","_npmUser":{"name":"felixfbecker","email":"felix.b@outlook.com"},"dist":{"shasum":"73cc0d21cb7c06926b5aa026deee577b05d84dd2","size":5474,"noattachment":false,"key":"/sql-template-strings/-/sql-template-strings-2.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/sql-template-strings/download/sql-template-strings-2.0.3.tgz"},"maintainers":[{"name":"felixfbecker","email":"felix.b@outlook.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/sql-template-strings-2.0.3.tgz_1467109153596_0.4817513676825911"},"directories":{},"publish_time":1467109154653,"_hasShrinkwrap":false,"_cnpm_publish_time":1467109154653,"_cnpmcore_publish_time":"2021-12-16T18:45:59.737Z"},"2.0.2":{"name":"sql-template-strings","version":"2.0.2","description":"ES6 tagged template strings for prepared statements with mysql and postgres","main":"index.js","engines":{"node":">4.0.0"},"repository":{"type":"git","url":"git+https://github.com/felixfbecker/node-sql-template-strings.git"},"scripts":{"test":"eslint index.js && mocha"},"keywords":["mysql","mysql2","postgres","pg","prepared","statements","placeholder","es6","tagged","template","strings"],"author":{"name":"Felix Becker"},"license":"ISC","devDependencies":{"eslint":"^2.9.0","mocha":"^2.3.3"},"gitHead":"d58f92715ab8f861bc39b29ea9536c7b15d866b3","bugs":{"url":"https://github.com/felixfbecker/node-sql-template-strings/issues"},"homepage":"https://github.com/felixfbecker/node-sql-template-strings#readme","_id":"sql-template-strings@2.0.2","_shasum":"81a416ef4f8777cf2dcfb979a5f2f709d8e87e81","_from":".","_npmVersion":"3.8.7","_nodeVersion":"6.0.0","_npmUser":{"name":"felixfbecker","email":"felix.b@outlook.com"},"dist":{"shasum":"81a416ef4f8777cf2dcfb979a5f2f709d8e87e81","size":5339,"noattachment":false,"key":"/sql-template-strings/-/sql-template-strings-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/sql-template-strings/download/sql-template-strings-2.0.2.tgz"},"maintainers":[{"name":"felixfbecker","email":"felix.b@outlook.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/sql-template-strings-2.0.2.tgz_1463058266361_0.11315130698494613"},"directories":{},"publish_time":1463058268912,"_hasShrinkwrap":false,"_cnpm_publish_time":1463058268912,"_cnpmcore_publish_time":"2021-12-16T18:45:59.936Z"},"2.0.1":{"name":"sql-template-strings","version":"2.0.1","description":"ES6 tagged template strings for prepared statements with mysql and postgres","main":"index.js","engines":{"node":">4.0.0"},"repository":{"type":"git","url":"git+https://github.com/felixfbecker/node-sql-template-strings.git"},"scripts":{"test":"eslint index.js && mocha"},"keywords":["mysql","mysql2","postgres","pg","prepared","statements","placeholder","es6","tagged","template","strings"],"author":{"name":"Felix Becker"},"license":"ISC","devDependencies":{"eslint":"^2.9.0","mocha":"^2.3.3"},"gitHead":"a528c34e3b9bc1439b23b0896b335adf297537fc","bugs":{"url":"https://github.com/felixfbecker/node-sql-template-strings/issues"},"homepage":"https://github.com/felixfbecker/node-sql-template-strings#readme","_id":"sql-template-strings@2.0.1","_shasum":"7bcf9675d9b8f470d68efeea91f78a79c552509e","_from":".","_npmVersion":"3.8.7","_nodeVersion":"6.0.0","_npmUser":{"name":"felixfbecker","email":"felix.b@outlook.com"},"dist":{"shasum":"7bcf9675d9b8f470d68efeea91f78a79c552509e","size":5341,"noattachment":false,"key":"/sql-template-strings/-/sql-template-strings-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/sql-template-strings/download/sql-template-strings-2.0.1.tgz"},"maintainers":[{"name":"felixfbecker","email":"felix.b@outlook.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/sql-template-strings-2.0.1.tgz_1463057928344_0.19039521762169898"},"directories":{},"publish_time":1463057929950,"_hasShrinkwrap":false,"_cnpm_publish_time":1463057929950,"_cnpmcore_publish_time":"2021-12-16T18:46:00.149Z"},"2.0.0":{"name":"sql-template-strings","version":"2.0.0","description":"ES6 tagged template strings for prepared statements with mysql and postgres","main":"index.js","engines":{"node":">4.0.0"},"repository":{"type":"git","url":"git+https://github.com/felixfbecker/node-sql-template-strings.git"},"scripts":{"test":"eslint index.js && mocha"},"keywords":["mysql","mysql2","postgres","pg","prepared","statements","placeholder","es6","tagged","template","strings"],"author":{"name":"Felix Becker"},"license":"ISC","devDependencies":{"eslint":"^2.9.0","mocha":"^2.3.3"},"gitHead":"5bddc3b2e2887c6684965d062f975fedcf316ea3","bugs":{"url":"https://github.com/felixfbecker/node-sql-template-strings/issues"},"homepage":"https://github.com/felixfbecker/node-sql-template-strings#readme","_id":"sql-template-strings@2.0.0","_shasum":"7f672acd618a62b0eac4c276ddbe7bb010e4b430","_from":".","_npmVersion":"3.8.7","_nodeVersion":"6.0.0","_npmUser":{"name":"felixfbecker","email":"felix.b@outlook.com"},"dist":{"shasum":"7f672acd618a62b0eac4c276ddbe7bb010e4b430","size":5339,"noattachment":false,"key":"/sql-template-strings/-/sql-template-strings-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sql-template-strings/download/sql-template-strings-2.0.0.tgz"},"maintainers":[{"name":"felixfbecker","email":"felix.b@outlook.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/sql-template-strings-2.0.0.tgz_1462293076088_0.6900930285919458"},"directories":{},"publish_time":1462293077254,"_hasShrinkwrap":false,"_cnpm_publish_time":1462293077254,"_cnpmcore_publish_time":"2021-12-16T18:46:00.367Z"},"1.1.2":{"name":"sql-template-strings","version":"1.1.2","description":"ES6 tagged template strings for prepared statements with mysql and postgres","main":"index.js","repository":{"type":"git","url":"git+https://github.com/felixfbecker/node-sql-template-strings.git"},"scripts":{"test":"mocha && standard"},"keywords":["mysql","mysql2","postgres","pg","prepared","statements","placeholder","es6","tagged","template","strings"],"author":{"name":"Felix Becker"},"license":"ISC","devDependencies":{"chai":"^3.3.0","mocha":"^2.3.3","standard":"^5.3.1"},"gitHead":"658ec4d58aa606e913d020d2f271be38738364c8","bugs":{"url":"https://github.com/felixfbecker/node-sql-template-strings/issues"},"homepage":"https://github.com/felixfbecker/node-sql-template-strings#readme","_id":"sql-template-strings@1.1.2","_shasum":"6bb48dc5255a196832ae50320d4d3a9544c77eff","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.4.1","_npmUser":{"name":"felixfbecker","email":"felix.b@outlook.com"},"dist":{"shasum":"6bb48dc5255a196832ae50320d4d3a9544c77eff","size":2672,"noattachment":false,"key":"/sql-template-strings/-/sql-template-strings-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/sql-template-strings/download/sql-template-strings-1.1.2.tgz"},"maintainers":[{"name":"felixfbecker","email":"felix.b@outlook.com"}],"directories":{},"publish_time":1453070208341,"_hasShrinkwrap":false,"_cnpm_publish_time":1453070208341,"_cnpmcore_publish_time":"2021-12-16T18:46:00.584Z"},"1.1.1":{"name":"sql-template-strings","version":"1.1.1","description":"ES6 tagged template strings for prepared statements with mysql and postgres","main":"index.js","repository":{"type":"git","url":"git+https://github.com/felixfbecker/node-sql-template-strings.git"},"scripts":{"test":"mocha && standard"},"keywords":["mysql","mysql2","postgres","pg","prepared","statements","placeholder","es6","tagged","template","strings"],"author":{"name":"Felix Becker"},"license":"ISC","devDependencies":{"chai":"^3.3.0","mocha":"^2.3.3","standard":"^5.3.1"},"gitHead":"a8254e400d4919d2561ef6c6fa2f07836fe62672","bugs":{"url":"https://github.com/felixfbecker/node-sql-template-strings/issues"},"homepage":"https://github.com/felixfbecker/node-sql-template-strings#readme","_id":"sql-template-strings@1.1.1","_shasum":"366c9fa6468f0fe4e5136dc9d0aaa586004b036c","_from":".","_npmVersion":"3.3.6","_nodeVersion":"4.1.2","_npmUser":{"name":"felixfbecker","email":"felix.b@outlook.com"},"dist":{"shasum":"366c9fa6468f0fe4e5136dc9d0aaa586004b036c","size":2717,"noattachment":false,"key":"/sql-template-strings/-/sql-template-strings-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/sql-template-strings/download/sql-template-strings-1.1.1.tgz"},"maintainers":[{"name":"felixfbecker","email":"felix.b@outlook.com"}],"directories":{},"publish_time":1444986714519,"_hasShrinkwrap":false,"_cnpm_publish_time":1444986714519,"_cnpmcore_publish_time":"2021-12-16T18:46:00.804Z"},"1.1.0":{"name":"sql-template-strings","version":"1.1.0","description":"Allows you to use ES6 tagged template strings for prepared statements with mysql and postgres","main":"index.js","repository":{"type":"git","url":"git+https://github.com/felixfbecker/node-sql-template-strings.git"},"scripts":{"test":"mocha && standard"},"keywords":["mysql","mysql2","postgres","pg","prepared","statements","placeholder","es6","tagged","template","strings"],"author":{"name":"Felix Becker"},"license":"ISC","devDependencies":{"chai":"^3.3.0","mocha":"^2.3.3","standard":"^5.3.1"},"gitHead":"92e00292de4063aca2e5b75de9b1d6607410da4d","bugs":{"url":"https://github.com/felixfbecker/node-sql-template-strings/issues"},"homepage":"https://github.com/felixfbecker/node-sql-template-strings#readme","_id":"sql-template-strings@1.1.0","_shasum":"69a313e76b3794d3cfa652d66813e3a33e78fc53","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"felixfbecker","email":"felix.b@outlook.com"},"dist":{"shasum":"69a313e76b3794d3cfa652d66813e3a33e78fc53","size":3268,"noattachment":false,"key":"/sql-template-strings/-/sql-template-strings-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sql-template-strings/download/sql-template-strings-1.1.0.tgz"},"maintainers":[{"name":"felixfbecker","email":"felix.b@outlook.com"}],"directories":{},"publish_time":1443492936123,"_hasShrinkwrap":false,"_cnpm_publish_time":1443492936123,"_cnpmcore_publish_time":"2021-12-16T18:46:01.021Z"},"1.0.2":{"name":"sql-template-strings","version":"1.0.2","description":"Allows you to use ES6 tagged template strings for prepared statements with mysql and postgres","main":"index.js","repository":{"type":"git","url":"git+https://github.com/felixfbecker/node-sql-template-strings.git"},"keywords":["mysql","mysql2","postgres","pg","prepared","statements","placeholder","es6","tagged","template","strings"],"author":{"name":"Felix Becker"},"license":"ISC","gitHead":"e6621398ed6b59fead88b608fe4d79d18333064d","bugs":{"url":"https://github.com/felixfbecker/node-sql-template-strings/issues"},"homepage":"https://github.com/felixfbecker/node-sql-template-strings#readme","_id":"sql-template-strings@1.0.2","scripts":{},"_shasum":"091e9e4e4a53db7f15f5cfde6933f031b49f60f7","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"felixfbecker","email":"felix.b@outlook.com"},"dist":{"shasum":"091e9e4e4a53db7f15f5cfde6933f031b49f60f7","size":1622,"noattachment":false,"key":"/sql-template-strings/-/sql-template-strings-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/sql-template-strings/download/sql-template-strings-1.0.2.tgz"},"maintainers":[{"name":"felixfbecker","email":"felix.b@outlook.com"}],"directories":{},"publish_time":1442695507793,"_hasShrinkwrap":false,"_cnpm_publish_time":1442695507793,"_cnpmcore_publish_time":"2021-12-16T18:46:01.259Z"},"1.0.1":{"name":"sql-template-strings","version":"1.0.1","description":"Allows you to use ES6 tagged template strings for prepared statements with mysql and postgres","main":"index.js","repository":{"type":"git","url":"git+https://github.com/felixfbecker/node-sql-template-strings.git"},"keywords":["mysql","mysql2","postgres","pg","prepared","statements","placeholder","es6","tagged","template","strings"],"author":{"name":"Felix Becker"},"license":"ISC","gitHead":"0f9dae46437b124d6a3741194ef963e49bcb7eb1","bugs":{"url":"https://github.com/felixfbecker/node-sql-template-strings/issues"},"homepage":"https://github.com/felixfbecker/node-sql-template-strings#readme","_id":"sql-template-strings@1.0.1","scripts":{},"_shasum":"de871f0a2621eb2e04bc85b1406628f18a56d06d","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"felixfbecker","email":"felix.b@outlook.com"},"dist":{"shasum":"de871f0a2621eb2e04bc85b1406628f18a56d06d","size":1615,"noattachment":false,"key":"/sql-template-strings/-/sql-template-strings-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/sql-template-strings/download/sql-template-strings-1.0.1.tgz"},"maintainers":[{"name":"felixfbecker","email":"felix.b@outlook.com"}],"directories":{},"publish_time":1442695132997,"_hasShrinkwrap":false,"_cnpm_publish_time":1442695132997,"_cnpmcore_publish_time":"2021-12-16T18:46:01.488Z"}},"readme":"# SQL Template Strings\n\n[![Version](https://img.shields.io/npm/v/sql-template-strings.svg?maxAge=2592000)](https://www.npmjs.com/package/sql-template-strings)\n[![Downloads](https://img.shields.io/npm/dm/sql-template-strings.svg?maxAge=2592000)](https://www.npmjs.com/package/sql-template-strings)\n[![Build Status](https://travis-ci.org/felixfbecker/node-sql-template-strings.svg?branch=master)](https://travis-ci.org/felixfbecker/node-sql-template-strings)\n[![Coverage](https://codecov.io/gh/felixfbecker/node-sql-template-strings/branch/master/graph/badge.svg)](https://codecov.io/gh/felixfbecker/node-sql-template-strings)\n![Dependencies](https://david-dm.org/felixfbecker/node-sql-template-strings.svg)\n![Node Version](http://img.shields.io/node/v/sql-template-strings.svg)\n[![License](https://img.shields.io/npm/l/sql-template-strings.svg?maxAge=2592000)](https://github.com/felixfbecker/node-sql-template-strings/blob/master/LICENSE.md)\n[![Chat](https://badges.gitter.im/felixfbecker/node-sql-template-strings.svg)](https://gitter.im/felixfbecker/node-sql-template-strings?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n[API Documentation](http://node-sql-template-strings.surge.sh/)\n\nA simple yet powerful module to allow you to use ES6 tagged template strings for prepared/escaped statements.  \nWorks with [mysql](https://www.npmjs.com/package/mysql), [mysql2](https://www.npmjs.com/package/mysql2), [postgres](https://www.npmjs.com/package/pg) and [sequelize](https://www.npmjs.com/package/sequelize).\n\nExample for escaping queries (callbacks omitted):\n\n```js\nconst SQL = require('sql-template-strings')\n\nconst book = 'harry potter'\nconst author = 'J. K. Rowling'\n\n// mysql:\nmysql.query('SELECT author FROM books WHERE name = ? AND author = ?', [book, author])\n// is equivalent to\nmysql.query(SQL`SELECT author FROM books WHERE name = ${book} AND author = ${author}`)\n\n// postgres:\npg.query('SELECT author FROM books WHERE name = $1 AND author = $2', [book, author])\n// is equivalent to\npg.query(SQL`SELECT author FROM books WHERE name = ${book} AND author = ${author}`)\n\n// sequelize:\nsequelize.query('SELECT author FROM books WHERE name = ? AND author = ?', {replacements: [book, author]})\n// is equivalent to\nsequelize.query(SQL`SELECT author FROM books WHERE name = ${book} AND author = ${author}`)\n```\nThis might not seem like a big deal, but when you do an INSERT with a lot columns writing all the placeholders becomes a nightmare:\n\n```js\ndb.query(\n  'INSERT INTO books (name, author, isbn, category, recommended_age, pages, price) VALUES (?, ?, ?, ?, ?, ?, ?)',\n  [name, author, isbn, category, recommendedAge, pages, price]\n)\n// is better written as\ndb.query(SQL`\n  INSERT\n  INTO    books\n          (name, author, isbn, category, recommended_age, pages, price)\n  VALUES  (${name}, ${author}, ${isbn}, ${category}, ${recommendedAge}, ${pages}, ${price})\n`)\n```\nAlso template strings support line breaks, while normal strings do not.\n\n## How it works\nThe SQL template string tag transforms the template string and returns an _object_ that is understood by both mysql and postgres:\n\n```js\nconst query = SQL`SELECT author FROM books WHERE name = ${book} AND author = ${author}`\ntypeof query // => 'object'\nquery.text   // => 'SELECT author FROM books WHERE name = $1 AND author = $2'\nquery.sql    // => 'SELECT author FROM books WHERE name = ? AND author = ?'\nquery.values // => ['harry potter', 'J. K. Rowling']\n```\n\n## Building complex queries with `append()`\nIt is also possible to build queries by appending another query or a string with the `append()` method (returns `this` for chaining):\n\n```js\nquery.append(SQL`AND genre = ${genre}`).append(' ORDER BY rating')\nquery.text   // => 'SELECT author FROM books WHERE name = $1 AND author = $2 AND genre = $3 ORDER BY rating'\nquery.sql    // => 'SELECT author FROM books WHERE name = ? AND author = ? AND genre = ? ORDER BY rating'\nquery.values // => ['harry potter', 'J. K. Rowling', 'Fantasy'] ORDER BY rating\n```\n\nThis allows you to build complex queries without having to care about the placeholder index or the values array:\n\n```js\nconst query = SQL`SELECT * FROM books`\nif (params.name) {\n  query.append(SQL` WHERE name = ${params.name}`)\n}\nquery.append(SQL` LIMIT 10 OFFSET ${params.offset || 0}`)\n```\n\n## Raw values\nSome values cannot be replaced by placeholders in prepared statements, like table names.\n`append()` replaces the `SQL.raw()` syntax from version 1, just pass a string and it will get appended raw.\n\n > Please note that when inserting raw values, you are responsible for quoting and escaping these values with proper escaping functions first if they come from user input (E.g. `mysql.escapeId()` and `pg.escapeIdentifier()`).\n > Also, executing many prepared statements with changing raw values in a loop will quickly overflow the prepared statement buffer (and destroy their performance benefit), so be careful.\n\n```js\nconst table = 'books'\nconst order = 'DESC'\nconst column = 'author'\n\ndb.query(SQL`SELECT * FROM \"`.append(table).append(SQL`\" WHERE author = ${author} ORDER BY ${column} `).append(order))\n\n// escape user input manually\nmysql.query(SQL`SELECT * FROM `.append(mysql.escapeId(someUserInput)).append(SQL` WHERE name = ${book} ORDER BY ${column} `).append(order))\npg.query(SQL`SELECT * FROM `.append(pg.escapeIdentifier(someUserInput)).append(SQL` WHERE name = ${book} ORDER BY ${column} `).append(order)))\n```\n\n## Prepared Statements in Postgres\nPostgres requires prepared statements to be named, otherwise the parameters will be escaped and replaced on the client side.\nYou can set the name with the `setName()` method:\n\n```js\n// old way\npg.query({name: 'my_query', text: 'SELECT author FROM books WHERE name = $1', values: [book]})\n\n// with template strings\npg.query(SQL`SELECT author FROM books WHERE name = ${book}`.setName('my_query'))\n```\nYou can also set the name property on the statement object directly or use `Object.assign()`.\n\n## Bound Statements in sequelize\nBy default, Sequelize will escape replacements on the client.\nTo switch to using a bound statement in Sequelize, call `useBind()`.\nThe boolean parameter defaults to `true`.\nLike all methods, returns `this` for chaining.\nPlease note that as long as the bound mode is active, the statement object only supports Sequelize, not the other drivers.\n\n```js\n// old way\nsequelize.query('SELECT author FROM books WHERE name = ? AND author = ?', {bind: [book, author]})\n\n// with template strings\nsequelize.query(SQL`SELECT author FROM books WHERE name = ${book}`.useBind(true))\nsequelize.query(SQL`SELECT author FROM books WHERE name = ${book}`.useBind()) // the same\n\n// works with append (you can call useBind at any time)\nconst query = SQL`SELECT * FROM books`.useBind(true)\nif (params.name) {\n  query.append(SQL` WHERE name = ${params.name}`)\n}\nquery.append(SQL` LIMIT 10 OFFSET ${params.offset || 0}`)\n```\n\n## Contributing\n - Tests are written using [mocha](https://www.npmjs.com/package/mocha)\n - You can use `npm test` to run the tests and check coding style\n - Since this module is only compatible with ES6 versions of node anyway, use all the ES6 goodies\n - Pull requests are welcome :)\n","_attachments":{},"homepage":"https://github.com/felixfbecker/node-sql-template-strings#readme","bugs":{"url":"https://github.com/felixfbecker/node-sql-template-strings/issues"},"license":"ISC"}