waterline-dirty
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -45,4 +45,10 @@ /*--------------------------------------------------------------- | ||
// Whether this adapter is syncable (yes) | ||
syncable: true, | ||
// Enable transactions by allowing Dirty to create a commitLog | ||
commitLog: true, | ||
commitLog: { | ||
identity: '__default_dirty_transaction', | ||
adapter: 'waterline-dirty' | ||
}, | ||
@@ -67,8 +73,13 @@ // Default configuration for collections | ||
// with an existing connection, reuse it | ||
connections[collection.identity] = _.find(connections, function (connection, name) { | ||
return connection.inMemory === collection.inMemory && | ||
connection.filePath === collection.filePath; | ||
var foundConnection = _.find(connections, function (connection, name) { | ||
// console.log(collectionName,collection.filePath, collection.inMemory,":::", name,connection); | ||
// console.log("Connect:",name,connection, "Collcetion",collection.identity, collection.inMemory,collection.filePath); | ||
return connection && (connection.inMemory === collection.inMemory) || | ||
(connection.filePath === collection.filePath); | ||
}); | ||
if (connections[collection.identity]) afterwards(); | ||
if (foundConnection) { | ||
connections[collection.identity] = foundConnection; | ||
afterwards(); | ||
} | ||
@@ -75,0 +86,0 @@ // Otherwise initialize for the first time |
{ | ||
"name": "waterline-dirty", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "Waterline adapter for felixge's node-dirty", | ||
@@ -5,0 +5,0 @@ "main": "DirtyAdapter.js", |
20620
490