diff options
author | Joel Kronqvist <work.joelkronqvist@pm.me> | 2022-03-11 20:46:06 +0200 |
---|---|---|
committer | Joel Kronqvist <work.joelkronqvist@pm.me> | 2022-03-11 20:46:06 +0200 |
commit | 080c5819d87b933816d724a83f3bf4f1686770a7 (patch) | |
tree | 4a2ccc68b27edf7d4cbc586c932cc7542b655e19 /node_modules/named-placeholders/README.md | |
parent | 5ac7049a9d30733165cc212dee308163c2a14644 (diff) | |
parent | d003b82235a9329f912522a2f70aa950dfce4998 (diff) | |
download | LYLLRuoka-080c5819d87b933816d724a83f3bf4f1686770a7.tar.gz LYLLRuoka-080c5819d87b933816d724a83f3bf4f1686770a7.zip |
Merge branch 'master' of https://github.com/JoelHMikael/FoodJS
Updating remote changes
Diffstat (limited to 'node_modules/named-placeholders/README.md')
-rw-r--r-- | node_modules/named-placeholders/README.md | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/node_modules/named-placeholders/README.md b/node_modules/named-placeholders/README.md new file mode 100644 index 0000000..22d5e33 --- /dev/null +++ b/node_modules/named-placeholders/README.md @@ -0,0 +1,29 @@ +[![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=sidorares&url=https://github.com/sidorares/named-placeholders&title=named-placeholders&language=&tags=github&category=software)
+
+[![NPM](https://nodei.co/npm/named-placeholders.png?downloads=true&stars=true)](https://nodei.co/npm/named-placeholders/)
+
+[![Build Status](https://secure.travis-ci.org/sidorares/named-placeholders.png)](http://travis-ci.org/sidorares/named-placeholders)
+
+# named-placeholders
+
+compiles "select foo where foo.id = :bar and foo.baz < :baz" into "select foo where foo.id = ? and foo.baz < ?" + ["bar", "baz"]
+
+## usage
+
+```sh
+npm install named-placeholders
+```
+
+see [this mysql2 discussion](https://github.com/sidorares/node-mysql2/issues/117)
+
+```js
+var mysql = require('mysql');
+var toUnnamed = require('named-placeholders')();
+
+var q = toUnnamed('select 1+:test', { test: 123});
+mysql.createConnection().query(q[0], q[1]);
+```
+
+## credits
+
+parser is based on @mscdex code of his excellent [node-mariasql](https://github.com/mscdex/node-mariasql) library
|