BBH1023
BBH1023

Reputation: 515

How to get more than 50 rows at once Windows Azure Android

I have an Azure table of ~115 rows that I want to load all at once on Android. It limits me to 50 items, but I know in C# you can use Take(n) to get up to 1000. What is the Android equivalent of this? This is my current code:

parameterTable.where().execute(new TableQueryCallback<Parameter>() {
            @Override
            public void onCompleted(List<Parameter> result, int count,
                    Exception exception, ServiceFilterResponse response) {
                if (exception != null) {
                    Log.e(TAG, exception.getCause().getMessage());
                    return;
                }
                for(Parameter p : result){
                    parameterList.add(p);
                }
                Intent broadcast = new Intent();
                broadcast.setAction("tables.loaded");
                Shared.sendBroadcast(broadcast);
            }
        });

Upvotes: 0

Views: 345

Answers (1)

EGLP
EGLP

Reputation: 26

The equivalent is top

parameterTable.where().top(1000).execute(new TableQueryCallback<Parameter>()
            @Override
            public void onCompleted(List<Parameter> result, int count,
                    Exception exception, ServiceFilterResponse response) {
                if (exception != null) {
                    Log.e(TAG, exception.getCause().getMessage());
                    return;
                }
                for(Parameter p : result){
                    parameterList.add(p);
                }
                Intent broadcast = new Intent();
                broadcast.setAction("tables.loaded");
                Shared.sendBroadcast(broadcast);
            }
        });

http://azure.microsoft.com/en-us/documentation/articles/mobile-services-android-how-to-use-client-library/#paging

Upvotes: 1

Related Questions