Help us understand the problem. What is going on with this article?

Objective-CでParseに色んなQueryを投げる

More than 5 years have passed since last update.

BaaS の Parse を使った iPhone アプリ開発をする上で
必要な Query 発行を 公式ドキュメント を参考にまとめる。

select * from xxx where playerName = "Dan Stemkoski";

[query whereKey:@"playerName" equalTo:@"Dan Stemkoski"];

select * from xxx where playerName <> "Michael Yabuti";

[query whereKey:@"playerName" notEqualTo:@"Michael Yabuti"];

select * from xxx LIMIT 10;

query.limit = 10;

select * from xxx ORDER BY score;

[query orderByAscending:@"score"];

select * from xxx ORDER BY score DESC;

[query orderByDescending:@"score"];

select * from xxx wins < 50;

[query whereKey:@"wins" lessThan:[NSNumber numberWithInt:50]];

select * from xxx wins <= 50;

[query whereKey:@"wins" lessThanOrEqualTo:[NSNumber numberWithInt:50]]; 

select * from xxx wins > 50;

[query whereKey:@"wins" greaterThan:[NSNumber numberWithInt:50]];

select * from xxx wins >= 50;

[query whereKey:@"wins" greaterThanOrEqualTo:[NSNumber numberWithInt:50]];

select * from xxx playerName IN ('Jonathan Walsh', 'Dario Wunsch', 'Shawn Simon');

NSArray *names = [NSArray arrayWithObjects:@"Jonathan Walsh", @"Dario Wunsch", @"Shawn Simon", nil];
[query whereKey:@"playerName" containedIn:names];

select * from xxx playerName NOT IN ('Jonathan Walsh', 'Dario Wunsch', 'Shawn Simon');

NSArray *names = [NSArray arrayWithObjects:@"Jonathan Walsh", @"Dario Wunsch", @"Shawn Simon", nil];
[query whereKey:@"playerName" notContainedIn:names];

select * from xxx name LIKE "%Big Daddy's%";

[query whereKey:@"name" hasPrefix:@"Big Daddy's"];
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away