I am wondering how to get continuation tokens using the Windows Azure Node.js SDK? For example using the SDK I now do this to retrieve data from a table:
var tableService = azure.createTableService();
tableService.getTable('UsersUserFacebookActions', function (error) {
if (error === null) {
var query = azure.TableQuery
.select()
.from('UsersUserFacebookActions')
.where('PartitionKey eq ?', userID)
.and('Kind eq ?', 'User')
.and('Deleted eq ?', 'false');
tableService.queryEntities(query, function (error, userEntities) {
if (error === null && userEntities.length > 0) {
// check to see if access token needs extending
extendAccessToken(userEntities[0], function (user) {
callback({
PartitionKey: user.PartitionKey,
RowKey: user.RowKey,
Kind: user.Kind,
EmailAddress: user.EmailAddress,
AccessToken: user.AccessToken,
TokenExpiration: user.TokenExpiration,
JoinDate: user.JoinDate,
ChannelCount: user.ChannelCount,
FollowCount: user.FollowCount,
ChannelCountString: accounting.formatNumber(user.ChannelCount),
FollowCountString: accounting.formatNumber(user.FollowCount),
Deleted: user.Deleted,
DeleteDate: user.DeleteDate
});
});
}
else callback();
});
}
else callback();
});
However I’ve hunted through the examples and documentation including this site:
https://www.windowsazure.com/en-us/develop/nodejs/
but haven’t come across anything mentioning continuation tokens.
Any help or advice would be appreciated.
I am not familiar with node.js. But even if the client library doesn’t support continuation token, we can still manually issue HTTP requests. The document on http://nodejs.org/api/https.html#https_https_get_options_callback tells us how to issue HTTP requests from node.js, and the document on http://msdn.microsoft.com/en-us/library/windowsazure/dd135718 tells us how to use continuation token using HTTP requests. Combine them, and the scenario will work. Richard may provide more information on how to use the Windows Azure node.js client library, which may make the process easier.
Best Regards,
Ming Xu.