Skip to content

Commit 5e771a1

Browse files
authored
Merge pull request #616 from stephencelis/prepare-release
Release branch
2 parents 38ece82 + f389b6a commit 5e771a1

File tree

17 files changed

+224
-67
lines changed

17 files changed

+224
-67
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: objective-c
22
rvm: 2.2
3-
osx_image: xcode8.2
3+
osx_image: xcode8.3
44
env:
55
global:
66
- IOS_SIMULATOR="iPhone 6s"

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
0.11.3 (30-03-2017), [diff][diff-0.11.3]
2+
========================================
3+
4+
* Fix compilation problems when using Carthage ([#615][])
5+
* Add "WITHOUT ROWID" table option ([#541][])
6+
* Argument count fixed for binary custom functions ([#481][])
7+
* Documentation updates
8+
* Tested with Xcode 8.3 / iOS 10.3
9+
110
0.11.2 (25-12-2016), [diff][diff-0.11.2]
211
========================================
312

@@ -23,12 +32,16 @@
2332
[diff-0.11.0]: https://github.com/stephencelis/SQLite.swift/compare/0.10.1...0.11.0
2433
[diff-0.11.1]: https://github.com/stephencelis/SQLite.swift/compare/0.11.0...0.11.1
2534
[diff-0.11.2]: https://github.com/stephencelis/SQLite.swift/compare/0.11.1...0.11.2
35+
[diff-0.11.3]: https://github.com/stephencelis/SQLite.swift/compare/0.11.2...0.11.3
2636

27-
[#532]: https://github.com/stephencelis/SQLite.swift/issues/532
37+
[#481]: https://github.com/stephencelis/SQLit1e.swift/pull/481
38+
[#532]: https://github.com/stephencelis/SQLit1e.swift/issues/532
39+
[#541]: https://github.com/stephencelis/SQLit1e.swift/issues/541
2840
[#546]: https://github.com/stephencelis/SQLite.swift/issues/546
2941
[#548]: https://github.com/stephencelis/SQLite.swift/pull/548
3042
[#553]: https://github.com/stephencelis/SQLite.swift/pull/553
3143
[#559]: https://github.com/stephencelis/SQLite.swift/pull/559
3244
[#560]: https://github.com/stephencelis/SQLite.swift/pull/560
3345
[#561]: https://github.com/stephencelis/SQLite.swift/issues/561
3446
[#571]: https://github.com/stephencelis/SQLite.swift/issues/571
47+
[#615]: https://github.com/stephencelis/SQLite.swift/pull/615

Documentation/Index.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ install SQLite.swift with Carthage:
7878
2. Update your Cartfile to include the following:
7979

8080
```
81-
github "stephencelis/SQLite.swift" ~> 0.11.2
81+
github "stephencelis/SQLite.swift" ~> 0.11.3
8282
```
8383
8484
3. Run `carthage update` and [add the appropriate framework][Carthage Usage].
@@ -113,7 +113,7 @@ install SQLite.swift with Carthage:
113113
use_frameworks!
114114
115115
target 'YourAppTargetName' do
116-
pod 'SQLite.swift', '~> 0.11.2'
116+
pod 'SQLite.swift', '~> 0.11.3'
117117
end
118118
```
119119
@@ -126,15 +126,15 @@ install SQLite.swift with Carthage:
126126
127127
``` ruby
128128
target 'YourAppTargetName' do
129-
pod 'SQLite.swift/standalone', '~> 0.11.2'
129+
pod 'SQLite.swift/standalone', '~> 0.11.3'
130130
end
131131
```
132132

133133
By default this will use the most recent version of SQLite without any extras. If you want you can further customize this by adding another dependency to sqlite3 or one of its subspecs:
134134

135135
``` ruby
136136
target 'YourAppTargetName' do
137-
pod 'SQLite.swift/standalone', '~> 0.11.2'
137+
pod 'SQLite.swift/standalone', '~> 0.11.3'
138138
pod 'sqlite3/fts5', '= 3.15.0' # SQLite 3.15.0 with FTS5 enabled
139139
end
140140
```
@@ -148,7 +148,7 @@ subspec in your Podfile:
148148

149149
``` ruby
150150
target 'YourAppTargetName' do
151-
pod 'SQLite.swift/SQLCipher', '~> 0.11.2'
151+
pod 'SQLite.swift/SQLCipher', '~> 0.11.3'
152152
end
153153
```
154154

@@ -1359,7 +1359,7 @@ For example, to give queries access to [`MobileCoreServices.UTTypeConformsTo`](h
13591359
``` swift
13601360
import MobileCoreServices
13611361

1362-
let typeConformsTo: (Expression<String>, String) -> Expression<Bool> = (
1362+
let typeConformsTo: (Expression<String>, Expression<String>) -> Expression<Bool> = (
13631363
try db.createFunction("typeConformsTo", deterministic: true) { UTI, conformsToUTI in
13641364
return UTTypeConformsTo(UTI, conformsToUTI)
13651365
}
@@ -1371,7 +1371,7 @@ let typeConformsTo: (Expression<String>, String) -> Expression<Bool> = (
13711371
Note `typeConformsTo`’s signature:
13721372

13731373
``` swift
1374-
(Expression<String>, String) -> Expression<Bool>
1374+
(Expression<String>, Expression<String>) -> Expression<Bool>
13751375
```
13761376

13771377
Because of this, `createFunction` expects a block with the following signature:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
BUILD_TOOL = xcodebuild
22
BUILD_SCHEME = SQLite Mac
33
IOS_SIMULATOR = iPhone 6s
4-
IOS_VERSION = 9.3
4+
IOS_VERSION = 10.3
55
ifeq ($(BUILD_SCHEME),SQLite iOS)
66
BUILD_ARGUMENTS = -scheme "$(BUILD_SCHEME)" -destination "platform=iOS Simulator,name=$(IOS_SIMULATOR),OS=$(IOS_VERSION)"
77
else

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ install SQLite.swift with Carthage:
123123
2. Update your Cartfile to include the following:
124124

125125
```
126-
github "stephencelis/SQLite.swift" ~> 0.11.2
126+
github "stephencelis/SQLite.swift" ~> 0.11.3
127127
```
128128
129129
3. Run `carthage update` and [add the appropriate framework][Carthage Usage].
@@ -159,7 +159,7 @@ SQLite.swift with CocoaPods:
159159
use_frameworks!
160160
161161
target 'YourAppTargetName' do
162-
pod 'SQLite.swift', '~> 0.11.2'
162+
pod 'SQLite.swift', '~> 0.11.3'
163163
end
164164
```
165165

SQLite.swift.podspec

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "SQLite.swift"
3-
s.version = "0.11.2"
3+
s.version = "0.11.3"
44
s.summary = "A type-safe, Swift-language layer over SQLite3 for iOS and OS X."
55

66
s.description = <<-DESC
@@ -15,10 +15,10 @@ Pod::Spec.new do |s|
1515
s.social_media_url = 'https://twitter.com/stephencelis'
1616

1717
s.module_name = 'SQLite'
18-
s.ios.deployment_target = "8.0"
19-
s.tvos.deployment_target = "9.0"
20-
s.osx.deployment_target = "10.9"
21-
s.watchos.deployment_target = "2.0"
18+
s.ios.deployment_target = "9.0"
19+
s.tvos.deployment_target = "9.1"
20+
s.osx.deployment_target = "10.10"
21+
s.watchos.deployment_target = "2.2"
2222
s.default_subspec = 'standard'
2323
s.pod_target_xcconfig = {
2424
'SWIFT_VERSION' => '3.0',

SQLite.xcodeproj/project.pbxproj

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,7 +1287,7 @@
12871287
DYLIB_INSTALL_NAME_BASE = "@rpath";
12881288
INFOPLIST_FILE = "$(SRCROOT)/Sources/SQLite/Info.plist";
12891289
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1290-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1290+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
12911291
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
12921292
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLite;
12931293
PRODUCT_NAME = SQLite;
@@ -1313,7 +1313,7 @@
13131313
DYLIB_INSTALL_NAME_BASE = "@rpath";
13141314
INFOPLIST_FILE = "$(SRCROOT)/Sources/SQLite/Info.plist";
13151315
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1316-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1316+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
13171317
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
13181318
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLite;
13191319
PRODUCT_NAME = SQLite;
@@ -1330,6 +1330,7 @@
13301330
isa = XCBuildConfiguration;
13311331
buildSettings = {
13321332
INFOPLIST_FILE = Tests/SQLiteTests/Info.plist;
1333+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
13331334
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
13341335
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLiteTests;
13351336
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1341,6 +1342,7 @@
13411342
isa = XCBuildConfiguration;
13421343
buildSettings = {
13431344
INFOPLIST_FILE = Tests/SQLiteTests/Info.plist;
1345+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
13441346
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
13451347
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLiteTests;
13461348
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1362,7 +1364,7 @@
13621364
INFOPLIST_FILE = "$(SRCROOT)/Sources/SQLite/Info.plist";
13631365
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
13641366
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
1365-
MACOSX_DEPLOYMENT_TARGET = 10.9;
1367+
MACOSX_DEPLOYMENT_TARGET = 10.10;
13661368
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLite;
13671369
PRODUCT_NAME = SQLite;
13681370
SDKROOT = macosx;
@@ -1389,7 +1391,7 @@
13891391
INFOPLIST_FILE = "$(SRCROOT)/Sources/SQLite/Info.plist";
13901392
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
13911393
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
1392-
MACOSX_DEPLOYMENT_TARGET = 10.9;
1394+
MACOSX_DEPLOYMENT_TARGET = 10.10;
13931395
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLite;
13941396
PRODUCT_NAME = SQLite;
13951397
SDKROOT = macosx;
@@ -1409,7 +1411,7 @@
14091411
COMBINE_HIDPI_IMAGES = YES;
14101412
INFOPLIST_FILE = Tests/SQLiteTests/Info.plist;
14111413
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
1412-
MACOSX_DEPLOYMENT_TARGET = 10.11;
1414+
MACOSX_DEPLOYMENT_TARGET = 10.10;
14131415
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLiteTests;
14141416
PRODUCT_NAME = "$(TARGET_NAME)";
14151417
SDKROOT = macosx;
@@ -1424,7 +1426,7 @@
14241426
COMBINE_HIDPI_IMAGES = YES;
14251427
INFOPLIST_FILE = Tests/SQLiteTests/Info.plist;
14261428
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
1427-
MACOSX_DEPLOYMENT_TARGET = 10.11;
1429+
MACOSX_DEPLOYMENT_TARGET = 10.10;
14281430
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLiteTests;
14291431
PRODUCT_NAME = "$(TARGET_NAME)";
14301432
SDKROOT = macosx;

Sources/SQLite/Core/Connection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ public final class Connection {
579579
} else if result == nil {
580580
sqlite3_result_null(context)
581581
} else {
582-
fatalError("unsupported result type: \(result)")
582+
fatalError("unsupported result type: \(String(describing: result))")
583583
}
584584
}
585585
var flags = SQLITE_UTF8

Sources/SQLite/Extensions/FTS4.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,14 @@ extension Tokenizer : CustomStringConvertible {
145145
extension Connection {
146146

147147
public func registerTokenizer(_ submoduleName: String, next: @escaping (String) -> (String, Range<String.Index>)?) throws {
148-
try check(_SQLiteRegisterTokenizer(handle, Tokenizer.moduleName, submoduleName) { input, offset, length in
148+
try check(_SQLiteRegisterTokenizer(handle, Tokenizer.moduleName, submoduleName) { (
149+
input: UnsafePointer<Int8>, offset: UnsafeMutablePointer<Int32>, length: UnsafeMutablePointer<Int32>) in
149150
let string = String(cString: input)
150151

151152
guard let (token, range) = next(string) else { return nil }
152153

153154
let view = string.utf8
154-
offset.pointee += string.substring(to: range.lowerBound).utf8.count
155+
offset.pointee += Int32(string.substring(to: range.lowerBound).utf8.count)
155156
length.pointee = Int32(view.distance(from: range.lowerBound.samePosition(in: view), to: range.upperBound.samePosition(in: view)))
156157
return token
157158
})

Sources/SQLite/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>0.11.2</string>
18+
<string>0.11.3</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

Sources/SQLite/Typed/CustomFunctions.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,60 +56,60 @@ public extension Connection {
5656
return { arg in fn([arg]) }
5757
}
5858

59-
public func createFunction<Z : Value, A : Value>(function: String, deterministic: Bool = false, _ block: @escaping (A?) -> Z) throws -> ((Expression<A?>) -> Expression<Z>) {
59+
public func createFunction<Z : Value, A : Value>(_ function: String, deterministic: Bool = false, _ block: @escaping (A?) -> Z) throws -> ((Expression<A?>) -> Expression<Z>) {
6060
let fn = try createFunction(function, 1, deterministic) { args in block(args[0].map(value)) }
6161
return { arg in fn([arg]) }
6262
}
6363

64-
public func createFunction<Z : Value, A : Value>(function: String, deterministic: Bool = false, _ block: @escaping (A) -> Z?) throws -> ((Expression<A>) -> Expression<Z?>) {
64+
public func createFunction<Z : Value, A : Value>(_ function: String, deterministic: Bool = false, _ block: @escaping (A) -> Z?) throws -> ((Expression<A>) -> Expression<Z?>) {
6565
let fn = try createFunction(function, 1, deterministic) { args in block(value(args[0])) }
6666
return { arg in fn([arg]) }
6767
}
6868

69-
public func createFunction<Z : Value, A : Value>(function: String, deterministic: Bool = false, _ block: @escaping (A?) -> Z?) throws -> ((Expression<A?>) -> Expression<Z?>) {
69+
public func createFunction<Z : Value, A : Value>(_ function: String, deterministic: Bool = false, _ block: @escaping (A?) -> Z?) throws -> ((Expression<A?>) -> Expression<Z?>) {
7070
let fn = try createFunction(function, 1, deterministic) { args in block(args[0].map(value)) }
7171
return { arg in fn([arg]) }
7272
}
7373

7474
// MARK: -
7575

7676
public func createFunction<Z : Value, A : Value, B : Value>(_ function: String, deterministic: Bool = false, _ block: @escaping (A, B) -> Z) throws -> (Expression<A>, Expression<B>) -> Expression<Z> {
77-
let fn = try createFunction(function, 1, deterministic) { args in block(value(args[0]), value(args[1])) }
77+
let fn = try createFunction(function, 2, deterministic) { args in block(value(args[0]), value(args[1])) }
7878
return { a, b in fn([a, b]) }
7979
}
8080

8181
public func createFunction<Z : Value, A : Value, B : Value>(_ function: String, deterministic: Bool = false, _ block: @escaping (A?, B) -> Z) throws -> (Expression<A?>, Expression<B>) -> Expression<Z> {
82-
let fn = try createFunction(function, 1, deterministic) { args in block(args[0].map(value), value(args[1])) }
82+
let fn = try createFunction(function, 2, deterministic) { args in block(args[0].map(value), value(args[1])) }
8383
return { a, b in fn([a, b]) }
8484
}
8585

8686
public func createFunction<Z : Value, A : Value, B : Value>(_ function: String, deterministic: Bool = false, _ block: @escaping (A, B?) -> Z) throws -> (Expression<A>, Expression<B?>) -> Expression<Z> {
87-
let fn = try createFunction(function, 1, deterministic) { args in block(value(args[0]), args[1].map(value)) }
87+
let fn = try createFunction(function, 2, deterministic) { args in block(value(args[0]), args[1].map(value)) }
8888
return { a, b in fn([a, b]) }
8989
}
9090

9191
public func createFunction<Z : Value, A : Value, B : Value>(_ function: String, deterministic: Bool = false, _ block: @escaping (A, B) -> Z?) throws -> (Expression<A>, Expression<B>) -> Expression<Z?> {
92-
let fn = try createFunction(function, 1, deterministic) { args in block(value(args[0]), value(args[1])) }
92+
let fn = try createFunction(function, 2, deterministic) { args in block(value(args[0]), value(args[1])) }
9393
return { a, b in fn([a, b]) }
9494
}
9595

9696
public func createFunction<Z : Value, A : Value, B : Value>(_ function: String, deterministic: Bool = false, _ block: @escaping (A?, B?) -> Z) throws -> (Expression<A?>, Expression<B?>) -> Expression<Z> {
97-
let fn = try createFunction(function, 1, deterministic) { args in block(args[0].map(value), args[1].map(value)) }
97+
let fn = try createFunction(function, 2, deterministic) { args in block(args[0].map(value), args[1].map(value)) }
9898
return { a, b in fn([a, b]) }
9999
}
100100

101101
public func createFunction<Z : Value, A : Value, B : Value>(_ function: String, deterministic: Bool = false, _ block: @escaping (A?, B) -> Z?) throws -> (Expression<A?>, Expression<B>) -> Expression<Z?> {
102-
let fn = try createFunction(function, 1, deterministic) { args in block(args[0].map(value), value(args[1])) }
102+
let fn = try createFunction(function, 2, deterministic) { args in block(args[0].map(value), value(args[1])) }
103103
return { a, b in fn([a, b]) }
104104
}
105105

106106
public func createFunction<Z : Value, A : Value, B : Value>(_ function: String, deterministic: Bool = false, _ block: @escaping (A, B?) -> Z?) throws -> (Expression<A>, Expression<B?>) -> Expression<Z?> {
107-
let fn = try createFunction(function, 1, deterministic) { args in block(value(args[0]), args[1].map(value)) }
107+
let fn = try createFunction(function, 2, deterministic) { args in block(value(args[0]), args[1].map(value)) }
108108
return { a, b in fn([a, b]) }
109109
}
110110

111111
public func createFunction<Z : Value, A : Value, B : Value>(_ function: String, deterministic: Bool = false, _ block: @escaping (A?, B?) -> Z?) throws -> (Expression<A?>, Expression<B?>) -> Expression<Z?> {
112-
let fn = try createFunction(function, 1, deterministic) { args in block(args[0].map(value), args[1].map(value)) }
112+
let fn = try createFunction(function, 2, deterministic) { args in block(args[0].map(value), args[1].map(value)) }
113113
return { a, b in fn([a, b]) }
114114
}
115115

Sources/SQLite/Typed/Schema.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@ extension Table {
3636

3737
// MARK: - CREATE TABLE
3838

39-
public func create(temporary: Bool = false, ifNotExists: Bool = false, block: (TableBuilder) -> Void) -> String {
39+
public func create(temporary: Bool = false, ifNotExists: Bool = false, withoutRowid: Bool = false, block: (TableBuilder) -> Void) -> String {
4040
let builder = TableBuilder()
4141

4242
block(builder)
4343

4444
let clauses: [Expressible?] = [
4545
create(Table.identifier, tableName(), temporary ? .Temporary : nil, ifNotExists),
46-
"".wrap(builder.definitions) as Expression<Void>
46+
"".wrap(builder.definitions) as Expression<Void>,
47+
withoutRowid ? Expression<Void>(literal: "WITHOUT ROWID") : nil
4748
]
4849

4950
return " ".join(clauses.flatMap { $0 }).asSQL()

Tests/CocoaPods/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
source 'https://rubygems.org'
22

3-
gem 'cocoapods', '~> 1.1.0'
3+
gem 'cocoapods', '~> 1.2.0'
44
gem 'minitest'

0 commit comments

Comments
 (0)