viewmodel
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -47,5 +47,5 @@ 'use strict'; | ||
obj = _.omit(obj, 'Timestamp','PartitionKey', 'RowKey', '.metadata'); | ||
obj = _.omit(obj, 'Timestamp', 'PartitionKey', 'RowKey', '.metadata'); | ||
function isJsonString (str) { | ||
function isJsonString(str) { | ||
try { | ||
@@ -91,3 +91,3 @@ jsondate.parse(str); | ||
// Class | ||
function AzureTable(options) { | ||
function AzureTable (options) { | ||
Repository.call(this, options); | ||
@@ -118,3 +118,3 @@ | ||
self.emit('connect'); | ||
if (callback) callback(null, self); | ||
@@ -160,3 +160,3 @@ }, | ||
if (!entity) { | ||
return callback(null, new ViewModel({ id: id }, self)); | ||
return callback(null, new ViewModel({id: id}, self)); | ||
} | ||
@@ -181,2 +181,4 @@ | ||
queryOptions = _.defaults(queryOptions, {skip: 0, limit: -1}); | ||
var tableQuery = new azure.TableQuery(); | ||
@@ -189,3 +191,3 @@ var pageSize = queryOptions.skip + queryOptions.limit; | ||
if (result._where.length === 0) return tableQuery.where(key + ' eq ?', val); | ||
return result.and(key + ' eq ?', val) | ||
return result.and(key + ' eq ?', val); | ||
} else { | ||
@@ -244,2 +246,6 @@ return result; | ||
if (continuationToken) { | ||
vms.continuationToken = continuationToken; | ||
} | ||
callback(null, vms); | ||
@@ -322,3 +328,3 @@ }); | ||
checkConnection: function (callback) { | ||
var self= this; | ||
var self = this; | ||
this.client.createTableIfNotExists(this.collectionName, function (err) { | ||
@@ -348,9 +354,9 @@ if (err) { | ||
async.each(entities.entries, function (entity, callback) { | ||
self.client.deleteEntity(col, entity, function (error, response) { | ||
self.client.deleteEntity(col, entity, function (error, response) { | ||
callback(error); | ||
}); | ||
}, | ||
function (error) { | ||
callback(error); | ||
}); | ||
}, | ||
function (error) { | ||
callback(error); | ||
}); | ||
}); | ||
@@ -357,0 +363,0 @@ }, callback); |
{ | ||
"author": "adrai", | ||
"name": "viewmodel", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"private": false, | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -0,1 +1,4 @@ | ||
## v1.2.1 | ||
- fix paging issue in azure-table [#6](https://github.com/adrai/node-viewmodel/pull/6) thanks to [rvin100](https://github.com/rvin100) | ||
## v1.2.0 | ||
@@ -2,0 +5,0 @@ - added azure-table support [#5](https://github.com/adrai/node-viewmodel/pull/5) thanks to [sbiaudet](https://github.com/sbiaudet) |
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
65768
1803