Skip to content

Commit 7eaa854

Browse files
committed
Updates Demo project
1 parent 3cc2dfa commit 7eaa854

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Demo/.DS_Store

0 Bytes
Binary file not shown.

Demo/AFSQLManager-Demo/AFSQLManager.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,12 @@ -(void)deleteDatabaseWithName:(NSString *)name andStatus:(statusBlock)status {
109109
}
110110

111111
-(void)performQuery:(NSString *)query withBlock:(completionBlock)completion {
112-
112+
113+
NSString *fixedQuery = [query stringByTrimmingCharactersInSet:[NSCharacterSet newlineCharacterSet]];
114+
113115
sqlite3_stmt *statement;
114116

115-
if (sqlite3_prepare_v2(_database, [query UTF8String], -1, &statement, nil) == SQLITE_OK) {
117+
if (sqlite3_prepare_v2(_database, [fixedQuery UTF8String], -1, &statement, nil) == SQLITE_OK) {
116118

117119
while (sqlite3_step(statement) == SQLITE_ROW) {
118120

0 commit comments

Comments
 (0)