Forum Discussion

Anburaj K.'s avatar
Anburaj K.
New member | Level 1
11 years ago

Datastore query

I am using datastore in my application. It works great. But i don't know how to use the filters (query) in this API.

I need to get all the records which are 'createdDate' greater than the given date.

I use the following code.

 NSDictionary *query = @{
                      @"createdDate":filterDate
                      };

 [testTbl get:query];

But it return only the records which are created date same as the given filter date.

Pls let me know how to query this.

1 Reply

Replies have been turned off for this discussion
  • Do you mean something like [testTbl query:query error:nil]?

    In any case, the query method only supports equality, so there's no way to have it do the query you want. You'll just need to loop over all the records yourself. (Everything's local and in memory, so this is quite efficient and roughly what the query method itself does.)

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!