不要怂,就是干,撸起袖子干!

Commit 08e0ca7c by Jan Aagaard Meier

A small step closer to making schema.test.js 'should support including date fields' work for sqlite

1 parent 9430706b
...@@ -23,7 +23,7 @@ ConnectionManager.prototype.getConnection = function(options) { ...@@ -23,7 +23,7 @@ ConnectionManager.prototype.getConnection = function(options) {
var self = this; var self = this;
options = options || {}; options = options || {};
options.uuid = options.uuid || 'default'; options.uuid = options.uuid || 'default';
if (self.connections[options.uuid]) return Promise.resolve(self.connections[options.uuid]); if (self.connections[options.uuid]) return Promise.resolve(self.connections[options.uuid]);
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
...@@ -49,4 +49,4 @@ ConnectionManager.prototype.releaseConnection = function(connection) { ...@@ -49,4 +49,4 @@ ConnectionManager.prototype.releaseConnection = function(connection) {
} }
}; };
module.exports = ConnectionManager; module.exports = ConnectionManager;
\ No newline at end of file
...@@ -18,4 +18,4 @@ SqliteDialect.prototype.supports = _.defaults({ ...@@ -18,4 +18,4 @@ SqliteDialect.prototype.supports = _.defaults({
SqliteDialect.prototype.Query = Query; SqliteDialect.prototype.Query = Query;
SqliteDialect.prototype.name = 'sqlite'; SqliteDialect.prototype.name = 'sqlite';
module.exports = SqliteDialect; module.exports = SqliteDialect;
\ No newline at end of file
...@@ -651,7 +651,7 @@ module.exports = (function() { ...@@ -651,7 +651,7 @@ module.exports = (function() {
var hasJoin = false var hasJoin = false
, tableNames = { }; , tableNames = { };
tableNames[this.tableName] = true; tableNames[this.getTableName()] = true;
options = optClone(options || {}); options = optClone(options || {});
if (typeof options === 'object') { if (typeof options === 'object') {
...@@ -722,7 +722,7 @@ module.exports = (function() { ...@@ -722,7 +722,7 @@ module.exports = (function() {
, keysLength = keys.length , keysLength = keys.length
, tableNames = { }; , tableNames = { };
tableNames[this.tableName] = true; tableNames[this.getTableName()] = true;
// options is not a hash but an id // options is not a hash but an id
if (typeof options === 'number') { if (typeof options === 'number') {
...@@ -1738,7 +1738,7 @@ module.exports = (function() { ...@@ -1738,7 +1738,7 @@ module.exports = (function() {
throw new Error('Include malformed. Expected attributes: model'); throw new Error('Include malformed. Expected attributes: model');
} }
tableNames[include.model.tableName] = true; tableNames[include.model.getTableName()] = true;
if (include.hasOwnProperty('attributes')) { if (include.hasOwnProperty('attributes')) {
include.originalAttributes = include.attributes.slice(0); include.originalAttributes = include.attributes.slice(0);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!