pagination - Synchronous paging against Azure Table Storage -


i new working azure table storage have being able put code below allows query accept filterquery (string) specified user -- ex: (amount le 5000.00) -- , retrieve rows (entities) matching criteria.

dim sbuilder new system.text.stringbuilder dim query = mybase.createquery(of cdata)("customerdata") dim userquery = string.format("(partitionkey eq '{0}' , {1})", appid, filterquery) sbuilder.appendformat(userquery)         query = query.addqueryoption("$filter", sbuilder.tostring).astableservicequery().take(50) dim results list(of cdata) = query.execute.tolist 

i should point out way of allowing user specify filter string key me since using generic class has dictionary inside of in order allow caller pass in number of elements store given entity. therefore, solution allows user drive how wants query search , code not have 'know' custom fields.

now need add pagination. understanding 'execute' method using handles pagination if there 7,000 records matching criteria, code sit until entries retrieved/returned. however, want instead allow user specify how many entities wants returned @ time (max results) , allow him make subsequent calls using continuation tokens next 'batch' of matching entities.

any thoughts on how can achieve without losing ability allow user specify search criteria in simple string?

i think can query.endexecutesegmented(query.beginexecutesegmented(...))

check out code smarxtodo: http://blog.smarx.com/posts/todo-list-app-using-asp-net-mvc-and-windows-azure-tables


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -