浏览代码

Merge pull request #266 from rlaferla/master

Update FMDatabase.m
August "Gus" Mueller 11 年之前
父节点
当前提交
97c1366ac2
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      src/fmdb/FMDatabase.m

+ 7 - 0
src/fmdb/FMDatabase.m

@@ -785,6 +785,10 @@ - (FMResultSet *)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray*)arr
             
             
             // Prefix the key with a colon.
             // Prefix the key with a colon.
             NSString *parameterName = [[NSString alloc] initWithFormat:@":%@", dictionaryKey];
             NSString *parameterName = [[NSString alloc] initWithFormat:@":%@", dictionaryKey];
+
+            if (_traceExecution) {
+                NSLog(@"%@ = %@", parameterName, [dictionaryArgs objectForKey:dictionaryKey]);
+            }
             
             
             // Get the index for the parameter name.
             // Get the index for the parameter name.
             int namedIdx = sqlite3_bind_parameter_index(pStmt, [parameterName UTF8String]);
             int namedIdx = sqlite3_bind_parameter_index(pStmt, [parameterName UTF8String]);
@@ -964,6 +968,9 @@ - (BOOL)executeUpdate:(NSString*)sql error:(NSError**)outErr withArgumentsInArra
             // Prefix the key with a colon.
             // Prefix the key with a colon.
             NSString *parameterName = [[NSString alloc] initWithFormat:@":%@", dictionaryKey];
             NSString *parameterName = [[NSString alloc] initWithFormat:@":%@", dictionaryKey];
             
             
+            if (_traceExecution) {
+                NSLog(@"%@ = %@", parameterName, [dictionaryArgs objectForKey:dictionaryKey]);
+            }
             // Get the index for the parameter name.
             // Get the index for the parameter name.
             int namedIdx = sqlite3_bind_parameter_index(pStmt, [parameterName UTF8String]);
             int namedIdx = sqlite3_bind_parameter_index(pStmt, [parameterName UTF8String]);