Permalink
Browse files

Version 2.6

  • Loading branch information...
1 parent 757cbd2 commit 7da973d694c177edc1358cfa059d1e6068c42061 @robertmryan robertmryan committed Dec 29, 2015
@@ -1,24 +1,31 @@
TODO:
Zip, nada, zilch. Got any ideas?
-If you would like to contribute some code- awesome! I just ask that you make it conform to the coding conventions already set in here, and to add a couple of tests for your new code to fmdb.m. And of course, the code should be of general use to more than just a couple of folks. Send your patches to gus@flyingmeat.com.
+If you would like to contribute some code ... awesome! I just ask that you make it conform to the coding conventions already set in here, and to add the necessary of tests for your new code to tests target. And of course, the code should be of general use to more than just a couple of folks. Send your patches to gus@flyingmeat.com.
+
+2015.12.28
+ Removed `sqlite3.h` from the headers to simplify incorporation of FMDB into a framework. This eliminates the dreaded "non-modular headers" error in frameworks.
+
+ To accomplish this, the few references to SQLite pointers have been changed to return `void` pointers. This means that if you have application code that used SQLite pointers exposed by FMDB, you may have to cast the pointer to the appropriate type when you use it (and `#import <sqlite3.h>` yourself). In general, we would advise against using SQLite pointers unless you absolutely need to.
+
+ Also changed the `FMDatabaseVariadic.swift` to throw errors for Swift 2.
2015.10.29
Added renditions of `executeUpdate:values:error:` and `executeQuery:values:error:`, which in Swift 2 throw errors.
2015.01.23
- Added Swift renditions of the variadic methods of FMDatabaseAdditions.
+ Added Swift renditions of the variadic methods of `FMDatabaseAdditions`.
2014.10.19
-Added a 'nextWithError:' to FMResultSet. Thanks to Roshan Muralidharan for the patch.
+ Added a `nextWithError:` to `FMResultSet`. Thanks to Roshan Muralidharan for the patch.
2014.09.10
New classes for exposing SQLite's FTS features. Thanks to Andrew Goodale for the code.
2014.04.23
New executeStatements: method, which will take a single UTF-8 string with multiple statements in it. This is great for batch updates. There is also a executeStatements:withResultBlock: version which takes a callback block which will be used for any statements which return rows in the bulk statement. Thanks to Rob Ryan for contributing code for this.
- Deprecated update:withErrorAndBindings: in favor of executeUpdate:withErrorAndBindings:
+ Deprecated `update:withErrorAndBindings:` in favor of `executeUpdate:withErrorAndBindings:` or `executeUpdate:values:error:`.
2014.04.09
Added back in busy handler code after a brief hiatus (check out the 2013.12.10 notes). But now doing so with sqlite3_busy_handler instead of while loops in the various execution places.
View
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'FMDB'
- s.version = '2.5.2'
+ s.version = '2.6'
s.summary = 'A Cocoa / Objective-C wrapper around SQLite.'
s.homepage = 'https://github.com/ccgus/fmdb'
s.license = 'MIT'
View
@@ -1,4 +1,5 @@
-# FMDB v2.5
+# FMDB v2.6
+
This is an Objective-C wrapper around SQLite: http://sqlite.org/
## The FMDB Mailing List:
@@ -9,6 +9,12 @@
#import <XCTest/XCTest.h>
#import "FMDatabaseAdditions.h"
+#if FMDB_SQLITE_STANDALONE
+#import <sqlite3/sqlite3.h>
+#else
+#import <sqlite3.h>
+#endif
+
@interface FMDatabaseAdditionsTests : FMDBTempDBTests
@end
@@ -101,9 +107,8 @@ - (void)testUserVersion {
XCTAssertTrue([[self db] userVersion] == 12);
}
+- (void)testApplicationID {
#if SQLITE_VERSION_NUMBER >= 3007017
-- (void)testApplicationID
-{
uint32_t appID = NSHFSTypeCodeFromFileType(NSFileTypeForHFSTypeCode('fmdb'));
[self.db setApplicationID:appID];
@@ -117,7 +122,11 @@ - (void)testApplicationID
NSString *s = [self.db applicationIDString];
XCTAssertEqualObjects(s, @"acrn");
-}
+#else
+ NSString *errorMessage = NSLocalizedString(@"Application ID functions require SQLite 3.7.17", nil);
+ XCTFail("%@", errorMessage);
+ if (self.db.logsErrors) NSLog(@"%@", errorMessage);
#endif
+}
@end
@@ -9,6 +9,12 @@
#import <XCTest/XCTest.h>
#import "FMDatabaseQueue.h"
+#if FMDB_SQLITE_STANDALONE
+#import <sqlite3/sqlite3.h>
+#else
+#import <sqlite3.h>
+#endif
+
@interface FMDatabaseQueueTests : FMDBTempDBTests
@property FMDatabaseQueue *queue;
@@ -10,6 +10,13 @@
#import "FMDatabase.h"
#import "FMDatabaseAdditions.h"
+#if FMDB_SQLITE_STANDALONE
+#import <sqlite3/sqlite3.h>
+#else
+#import <sqlite3.h>
+#endif
+
+
@interface FMDatabaseTests : FMDBTempDBTests
@end
@@ -804,7 +811,7 @@ - (void)testCustomFunction
[self.db executeUpdate:@"insert into ftest values ('not h!')"];
[self.db executeUpdate:@"insert into ftest values ('definitely not h!')"];
- [self.db makeFunctionNamed:@"StringStartsWithH" maximumArguments:1 withBlock:^(sqlite3_context *context, int aargc, sqlite3_value **aargv) {
+ [self.db makeFunctionNamed:@"StringStartsWithH" maximumArguments:1 withBlock:^(void *context, int aargc, void **aargv) {
if (sqlite3_value_type(aargv[0]) == SQLITE_TEXT) {
@autoreleasepool {
@@ -833,7 +840,7 @@ - (void)testCustomFunction
}
- (void)testVersionNumber {
- XCTAssertTrue([FMDatabase FMDBVersion] == 0x0250); // this is going to break everytime we bump it.
+ XCTAssertTrue([FMDatabase FMDBVersion] == 0x0260); // this is going to break everytime we bump it.
}
- (void)testExecuteStatements
@@ -10,6 +10,12 @@
#import "FMDatabase.h"
#import "FMResultSet.h"
+#if FMDB_SQLITE_STANDALONE
+#import <sqlite3/sqlite3.h>
+#else
+#import <sqlite3.h>
+#endif
+
@interface FMResultSetTests : FMDBTempDBTests
@end
Oops, something went wrong.

0 comments on commit 7da973d

Please sign in to comment.