Skip to content

Commit 5353524

Browse files
authored
Dropping Swift 4.2 support (#20)
Swift 5.0+ only
1 parent ba899f0 commit 5353524

File tree

5 files changed

+25
-14
lines changed

5 files changed

+25
-14
lines changed

CHANGELOG.md

+21
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All notable changes to this project will be documented in this file.
44
`SQift` adheres to [Semantic Versioning](http://semver.org/).
55

6+
#### 5.x Releases
7+
8+
- `5.0.x` Releases - [5.0.0](#500)
9+
610
#### 4.x Releases
711

812
- `4.1.x` Releases - [4.1.0](#410)
@@ -38,12 +42,26 @@ All notable changes to this project will be documented in this file.
3842
- `0.1.x` Releases - [0.1.0](#010)
3943

4044
---
45+
46+
## [5.0.0](https://github.com/Nike-Inc/SQift/releases/tag/5.0.0)
47+
48+
Release on 2019-04-30. All issues associated with this milestone can be found using this
49+
[filter](https://github.com/Nike-Inc/SQift/milestone/10?closed=1).
50+
51+
#### Updated
52+
53+
- Dropped Swift 4.2 support.
54+
- Updated by [William Thompson](https://github.com/eSpecialized) in Pull Request [#19](https://github.com/Nike-Inc/SQift/pull/19).
55+
56+
---
57+
4158
## [4.1.0](https://github.com/Nike-Inc/SQift/releases/tag/4.1.0)
4259

4360
Release on 2019-04-30. All issues associated with this milestone can be found using this
4461
[filter](https://github.com/Nike-Inc/SQift/milestone/8?closed=1).
4562

4663
#### Updated
64+
4765
- To Swift 5 with backwards compatibility to Swift 4.2.
4866
- Updated by [William Thompson](https://github.com/eSpecialized) in Pull Request [#18](https://github.com/Nike-Inc/SQift/pull/18).
4967
- Deployment targets to watchOS 3.0 and tvOS 10.0 in Xcode project to match podspec.
@@ -57,14 +75,17 @@ Release on 2018-11-30. All issues associated with this milestone can be found u
5775
[filter](https://github.com/Nike-Inc/SQift/milestone/7?closed=1).
5876

5977
#### Added
78+
6079
- Migration Guide for SQift 4 and added it to the README.
6180
- Added by [Jereme Claussen](https://github.com/jereme) in Pull Request [#16](https://github.com/Nike-Inc/SQift/pull/16).
6281

6382
#### Updated
83+
6484
- Deployment targets to iOS 9.0, Mac OSX 10.11, WatchOS 2.0 and tvOS 9.0.
6585
- Updated by [Jereme Claussen](https://github.com/jereme) in Pull Request [#16](https://github.com/Nike-Inc/SQift/pull/16).
6686

6787
#### Removed
88+
6889
- `Connection.trace` in favor of `Connection.traceEvent()`
6990
- Removed by [Jereme Claussen](https://github.com/jereme) in Pull Request [#16](https://github.com/Nike-Inc/SQift/pull/16).
7091

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ SQift is a lightweight Swift wrapper for SQLite.
3030
## Requirements
3131

3232
- iOS 10.0+, macOS 10.12+, tvOS 10.0+, watchOS 3.0+
33-
- Xcode 10.0+
34-
- Swift 4.2+
33+
- Xcode 10.2+
34+
- Swift 5.0+
3535

3636
## Migration Guides
3737

SQift.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
Pod::Spec.new do |s|
22
s.name = "SQift"
3-
s.version = "4.1.0"
3+
s.version = "5.0.0"
44
s.license = "MIT"
55
s.summary = "A lightweight Swift wrapper for SQLite."
66
s.homepage = "https://github.com/Nike-Inc/SQift"
77
s.authors = { "Dave Camp" => "[email protected]", "Christian Noon" => "[email protected]" }
88

99
s.source = { :git => "https://github.com/Nike-Inc/SQift.git", :tag => s.version }
1010
s.source_files = "Source/**/*.swift"
11-
s.swift_versions = ["4.2", "5.0"]
11+
s.swift_version = "5.0"
1212

1313
s.ios.deployment_target = "10.0"
1414
s.osx.deployment_target = "10.12"

Source/Connection/Functions/Function.swift

-4
Original file line numberDiff line numberDiff line change
@@ -361,13 +361,9 @@ extension Connection {
361361
sqlite3_result_text64(context, text, UInt64(text.utf8.count), SQLITE_TRANSIENT, UInt8(SQLITE_UTF8))
362362

363363
case .data(var data):
364-
#if swift(<5.0)
365-
data.withUnsafeBytes { sqlite3_result_blob64(context, $0, UInt64(data.count), SQLITE_TRANSIENT) }
366-
#else
367364
data.withUnsafeBytes {
368365
sqlite3_result_blob64(context, $0.bindMemory(to: UInt8.self).baseAddress, UInt64(data.count), SQLITE_TRANSIENT)
369366
}
370-
#endif
371367

372368
case .zeroData(let length):
373369
sqlite3_result_zeroblob64(context, length)

Source/Connection/Statement.swift

-6
Original file line numberDiff line numberDiff line change
@@ -472,15 +472,9 @@ public class Statement {
472472
try connection.check(sqlite3_bind_text(handle, index, value, -1, SQLITE_TRANSIENT))
473473

474474
case .blob(let value):
475-
#if swift(<5.0)
476-
try value.withUnsafeBytes { (bytes: UnsafePointer<UInt8>) -> Void in
477-
try connection.check(sqlite3_bind_blob(handle, index, bytes, Int32(value.count), SQLITE_TRANSIENT))
478-
}
479-
#else
480475
try value.withUnsafeBytes {
481476
_ = try connection.check(sqlite3_bind_blob(handle, index, $0.bindMemory(to: UInt8.self).baseAddress, Int32(value.count), SQLITE_TRANSIENT))
482477
}
483-
#endif
484478
}
485479
}
486480
}

0 commit comments

Comments
 (0)