viewmodel
Advanced tools
Comparing version 1.2.5 to 1.2.6
@@ -327,23 +327,29 @@ 'use strict'; | ||
if (!this.collectionName) { | ||
if (callback) callback(null); | ||
return; | ||
} | ||
this.checkConnection(function (err) { | ||
if (err) { | ||
return callback(err); | ||
} | ||
var query = new azure.TableQuery(); | ||
this.client.queryEntities(this.collectionName, query, null, function (err, entities) { | ||
if (err) { | ||
if (callback) callback(err); | ||
if (!self.collectionName) { | ||
if (callback) callback(null); | ||
return; | ||
} | ||
async.each(entities.entries, function (entity, callback) { | ||
self.client.deleteEntity(col, entity, function (error, response) { | ||
var query = new azure.TableQuery(); | ||
self.client.queryEntities(self.collectionName, query, null, function (err, entities) { | ||
if (err) { | ||
if (callback) callback(err); | ||
return; | ||
} | ||
async.each(entities.entries, function (entity, callback) { | ||
self.client.deleteEntity(col, entity, function (error, response) { | ||
if (callback) callback(error); | ||
}); | ||
}, | ||
function (error) { | ||
if (callback) callback(error); | ||
}); | ||
}, | ||
function (error) { | ||
if (callback) callback(error); | ||
} | ||
); | ||
} | ||
); | ||
}); | ||
}); | ||
@@ -350,0 +356,0 @@ }, |
@@ -373,2 +373,4 @@ 'use strict'; | ||
clear: function (callback) { | ||
this.checkConnection(); | ||
if (!this.collectionName) { | ||
@@ -375,0 +377,0 @@ if (callback) callback(null); |
@@ -116,3 +116,3 @@ 'use strict'; | ||
if (collections.indexOf(this.collectionName) < 0) { | ||
collections.push(this.collectionName) | ||
collections.push(this.collectionName); | ||
} | ||
@@ -122,2 +122,4 @@ }, | ||
clear: function (callback) { | ||
this.checkConnection(); | ||
if (store[this.collectionName]) { | ||
@@ -124,0 +126,0 @@ store[this.collectionName] = {}; |
@@ -237,2 +237,4 @@ 'use strict'; | ||
clear: function (callback) { | ||
this.checkConnection(); | ||
if (!this.collection) { | ||
@@ -239,0 +241,0 @@ if (callback) callback(null); |
@@ -322,2 +322,4 @@ 'use strict'; | ||
clear: function (callback) { | ||
this.checkConnection(); | ||
if (!this.prefix) { | ||
@@ -324,0 +326,0 @@ if (callback) callback(null); |
@@ -194,2 +194,4 @@ 'use strict'; | ||
clear: function (callback) { | ||
this.checkConnection(); | ||
if (!this.collection) { | ||
@@ -196,0 +198,0 @@ if (callback) callback(null); |
{ | ||
"author": "adrai", | ||
"name": "viewmodel", | ||
"version": "1.2.5", | ||
"version": "1.2.6", | ||
"private": false, | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
## [v1.2.5](https://github.com/adrai/node-viewmodel/compare/v1.2.4...v1.2.5) | ||
## [v1.2.6](https://github.com/adrai/node-viewmodel/compare/v1.2.4...v1.2.6) | ||
- added clear functionality to clear a collection | ||
@@ -51,2 +51,2 @@ | ||
- IMPORTANT: changed API!!! | ||
- added redis support | ||
- added redis support |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68583
1875