Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ccgus/fmdb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Ryan <robert.ryan@mindspring.com>2015-01-25 08:49:18 +0300
committerRob Ryan <robert.ryan@mindspring.com>2015-01-25 08:49:18 +0300
commitf0277ac36a5812b2a2b57a1b7fde41f31a921f3b (patch)
tree807f08258b4ffa48c704c96e889a69df0103256e
parent70dd7f7ee057a3781049f69ac09b18e15e7bf1be (diff)
Fix note in executeQuery documentation
-rw-r--r--src/fmdb/FMDatabase.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fmdb/FMDatabase.h b/src/fmdb/FMDatabase.h
index 9628655..1ddfa79 100644
--- a/src/fmdb/FMDatabase.h
+++ b/src/fmdb/FMDatabase.h
@@ -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);