Xcode: how to wrap a long line to the next line in xcode editor

I have a long line - the sql instruction, which I want to transfer to the next line in the xcode editor, how to wrap it around, for example.

[db executeUpdate:@"insert into test (rid, one, two, amount, startdate, recurrance) values (nil, ?, ?, ?, ?, ?)",
+3
source share
2 answers

Try:

[db executeUpdate:@"insert into test (rid, one, two, amount, values"  
                   " startdate, recurrance)(nil, ?, ?, ?, ?, ?)",...
+6
source

I had a similar problem ... call me paranoid .. but I like that my sqlstring looks nice and easy to track, if something went wrong, I used stringWithFormat

Example:

NSString sqlString = [NSString stringWithFormat: @"%@ %@ %@ %@ %@",
                   @"SELECT name, address, phone",
                   @"FROM whateverDatabase",
                   @"LEFT JOIN ...",
                   @"WHERE ...",
                   @"AND ...."];

hope if this is what you are looking for (I realized that I posted on the wrong page ... maybe here is better)

0
source

Source: https://habr.com/ru/post/1766212/


All Articles