|
|
@@ -473,6 +473,8 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
|
|
|
@see FMResultSet
|
|
|
@see [`FMResultSet next`](<[FMResultSet next]>)
|
|
|
@see [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html)
|
|
|
+
|
|
|
+ @note If you want to use this from Swift, please note that you must include `FMDatabaseVariadic.swift` in your project. Without that, you cannot use this method directly, and instead have to use methods such as `<executeQuery:withArgumentsInArray:>`.
|
|
|
*/
|
|
|
|
|
|
- (FMResultSet *)executeQuery:(NSString*)sql, ...;
|
|
|
@@ -503,8 +505,6 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
|
|
|
|
|
|
There are two reasons why this distinction is important. First, the printf-style escape sequences can only be used where it is permissible to use a SQLite `?` placeholder. You can use it only for values in SQL statements, but not for table names or column names or any other non-value context. This method also cannot be used in conjunction with `pragma` statements and the like. Second, note the lack of quotation marks in the SQL. The `WHERE` clause was _not_ `WHERE name='%@'` (like you might have to do if you built a SQL statement using `NSString` method `stringWithFormat`), but rather simply `WHERE name=%@`.
|
|
|
|
|
|
- @note If you want to use this from Swift, please note that you must include `FMDatabaseVariadic.swift` in your project. Without that, you cannot use this method directly, and instead have to use methods such as `<executeQuery:withArgumentsInArray:>`.
|
|
|
-
|
|
|
*/
|
|
|
|
|
|
- (FMResultSet *)executeQueryWithFormat:(NSString*)format, ... NS_FORMAT_FUNCTION(1,2);
|