chensenlai 10988628a0 语音房项目初始化 5 anni fa
..
node_modules 10988628a0 语音房项目初始化 5 anni fa
test 10988628a0 语音房项目初始化 5 anni fa
.npmignore 10988628a0 语音房项目初始化 5 anni fa
.travis.yml 10988628a0 语音房项目初始化 5 anni fa
LICENSE 10988628a0 语音房项目初始化 5 anni fa
README.md 10988628a0 语音房项目初始化 5 anni fa
index.js 10988628a0 语音房项目初始化 5 anni fa
package.json 10988628a0 语音房项目初始化 5 anni fa

README.md

Flattr this git repo

NPM

Build Status

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

npm install named-placeholders

see this mysql2 discussion

var mysql = require('mysql');
var toUnnamed = require('named-placeholders')();

var q = toUnnamed('select 1+:test', { test: 123});
mysl.createConnection().query(q[0], q[1]);

credits

parser is based on @mscdex code of his excellent node-mariasql library