diff --git a/client.js b/client.js index 1e14054..4d7b9d5 100644 --- a/client.js +++ b/client.js @@ -168,6 +168,7 @@ function create(opts) { } db.sanitize = require('./wrapper').sanitize; + db.escape = require('./wrapper').escape; Object.keys(sqlite3real.Database.prototype).forEach(function (key) { @@ -201,4 +202,5 @@ function create(opts) { module.exports.sanitize = require('./wrapper').sanitize; +module.exports.escape = require('./wrapper').escape; module.exports.create = create; diff --git a/cluster.js b/cluster.js index d9f722c..54e78e9 100644 --- a/cluster.js +++ b/cluster.js @@ -18,4 +18,5 @@ function create(opts) { } module.exports.sanitize = sqlite3.sanitize; +module.exports.escape = sqlite3.escape; module.exports.create = create; diff --git a/standalone.js b/standalone.js index 770044d..2b41841 100644 --- a/standalone.js +++ b/standalone.js @@ -13,4 +13,5 @@ function create(opts) { } module.exports.sanitize = sqlite3.sanitize; +module.exports.escape = sqlite3.escape; module.exports.create = create; diff --git a/wrapper.js b/wrapper.js index 76bd9ff..a959bb2 100644 --- a/wrapper.js +++ b/wrapper.js @@ -25,6 +25,7 @@ function create(opts) { db = dbs[opts.filename]; db.sanitize = sanitize; + db.escape = sanitize; db.__key = opts.key; return new Promise(function (resolve, reject) { @@ -58,5 +59,6 @@ function create(opts) { } module.exports.sanitize = sanitize; +module.exports.escape = sanitize; module.exports.Database = sqlite3.Database; module.exports.create = create;