I have a handful of SQL queries in my objective-c project. Is there any way I can store these in separate files query1.sql, query2.sql, in my tree and sub them in at compile time?
Motivating this is the fact that my queries are either copy-pastable but unreadable (no whitespace):
NSString* query = @"SELECT A.a, B.* from myTable A INNER JOIN otherTable B ON ...
Or readable but littered with line splices:
NSString* query = @"SELECT A.a, B.* \
FROM myTable A
INNER JOIN \
...
I am aware of .strings files for objective c, but thought they were more for localization. Is that right?
EDIT: I could have been more clear: I want to store my individual sql statements in separate text files that 1.) are valid SQL independently, and 2.) can be imported at compile time.