|
diff --git a/node_modules/sequelize/lib/dialects/postgres/hstore.js b/node_modules/sequelize/lib/dialects/postgres/hstore.js |
|
index 77a0346..22e0d8b 100644 |
|
--- a/node_modules/sequelize/lib/dialects/postgres/hstore.js |
|
+++ b/node_modules/sequelize/lib/dialects/postgres/hstore.js |
|
@@ -1,15 +1,15 @@ |
|
'use strict'; |
|
|
|
-const hstore = require('pg-hstore')({ sanitize: true }); |
|
+// const hstore = require('pg-hstore')({ sanitize: true }); |
|
|
|
function stringify(data) { |
|
if (data === null) return null; |
|
- return hstore.stringify(data); |
|
+ // return hstore.stringify(data); |
|
} |
|
exports.stringify = stringify; |
|
|
|
function parse(value) { |
|
if (value === null) return null; |
|
- return hstore.parse(value); |
|
+ // return hstore.parse(value); |
|
} |
|
exports.parse = parse; |
|
diff --git a/node_modules/sequelize/lib/dialects/sqlite/connection-manager.js b/node_modules/sequelize/lib/dialects/sqlite/connection-manager.js |
|
index 5c7f116..3eb0c2d 100644 |
|
--- a/node_modules/sequelize/lib/dialects/sqlite/connection-manager.js |
|
+++ b/node_modules/sequelize/lib/dialects/sqlite/connection-manager.js |
|
@@ -8,6 +8,53 @@ const dataTypes = require('../../data-types').sqlite; |
|
const sequelizeErrors = require('../../errors'); |
|
const parserStore = require('../parserStore')('sqlite'); |
|
|
|
+var lib = window.SQL; |
|
+lib.verbose = function() { |
|
+ return lib; |
|
+} |
|
+ |
|
+lib._Database = lib.Database; |
|
+lib.Database = class Db extends lib._Database { |
|
+ constructor(filename, mode, cb) { |
|
+ super(); |
|
+ process.nextTick(cb, null); |
|
+ } |
|
+ |
|
+ //I'm not 100% sure what this was supposed to do on node-sqlite3, heh. |
|
+ serialize(cb) { |
|
+ process.nextTick(cb); |
|
+ } |
|
+ |
|
+ run(sql, params, cb) { |
|
+ super.run(sql, params); |
|
+ var ctx = {}; |
|
+ if (sql.toLowerCase().indexOf('insert') !== -1) { |
|
+ var rez = this.exec("select last_insert_rowid();"); |
|
+ ctx.lastID = rez[0].values[0][0]; |
|
+ } |
|
+ if (cb) { |
|
+ process.nextTick(cb.bind(ctx), null); |
|
+ } |
|
+ return this; |
|
+ } |
|
+ |
|
+ all(sql, params, cb) { |
|
+ var result = []; |
|
+ this.each(sql, params, |
|
+ function(r) { |
|
+ result.push(r); |
|
+ }, |
|
+ function() { |
|
+ cb(null, result); |
|
+ }); |
|
+ return this; |
|
+ } |
|
+ |
|
+ close () { |
|
+ |
|
+ } |
|
+} |
|
+ |
|
class ConnectionManager extends AbstractConnectionManager { |
|
constructor(dialect, sequelize) { |
|
super(dialect, sequelize); |
|
@@ -19,7 +66,7 @@ class ConnectionManager extends AbstractConnectionManager { |
|
} |
|
|
|
this.connections = {}; |
|
- this.lib = this._loadDialectModule('sqlite3').verbose(); |
|
+ this.lib = lib.verbose(); |
|
this.refreshTypeParser(dataTypes); |
|
} |
|
|