Skip to content

Commit

Permalink
Dropping Swift 4.2 support (#20)
Browse files Browse the repository at this point in the history
Swift 5.0+ only
  • Loading branch information
eSpecialized authored Apr 30, 2019
1 parent ba899f0 commit 5353524
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 14 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
`SQift` adheres to [Semantic Versioning](http://semver.org/).

#### 5.x Releases

- `5.0.x` Releases - [5.0.0](#500)

#### 4.x Releases

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

---

## [5.0.0](https://github.com/Nike-Inc/SQift/releases/tag/5.0.0)

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

#### Updated

- Dropped Swift 4.2 support.
- Updated by [William Thompson](https://github.com/eSpecialized) in Pull Request [#19](https://github.com/Nike-Inc/SQift/pull/19).

---

## [4.1.0](https://github.com/Nike-Inc/SQift/releases/tag/4.1.0)

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

#### Updated

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

#### Added

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

#### Updated

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

#### Removed

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

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ SQift is a lightweight Swift wrapper for SQLite.
## Requirements

- iOS 10.0+, macOS 10.12+, tvOS 10.0+, watchOS 3.0+
- Xcode 10.0+
- Swift 4.2+
- Xcode 10.2+
- Swift 5.0+

## Migration Guides

Expand Down
4 changes: 2 additions & 2 deletions SQift.podspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Pod::Spec.new do |s|
s.name = "SQift"
s.version = "4.1.0"
s.version = "5.0.0"
s.license = "MIT"
s.summary = "A lightweight Swift wrapper for SQLite."
s.homepage = "https://github.com/Nike-Inc/SQift"
s.authors = { "Dave Camp" => "[email protected]", "Christian Noon" => "[email protected]" }

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

s.ios.deployment_target = "10.0"
s.osx.deployment_target = "10.12"
Expand Down
4 changes: 0 additions & 4 deletions Source/Connection/Functions/Function.swift
Original file line number Diff line number Diff line change
Expand Up @@ -361,13 +361,9 @@ extension Connection {
sqlite3_result_text64(context, text, UInt64(text.utf8.count), SQLITE_TRANSIENT, UInt8(SQLITE_UTF8))

case .data(var data):
#if swift(<5.0)
data.withUnsafeBytes { sqlite3_result_blob64(context, $0, UInt64(data.count), SQLITE_TRANSIENT) }
#else
data.withUnsafeBytes {
sqlite3_result_blob64(context, $0.bindMemory(to: UInt8.self).baseAddress, UInt64(data.count), SQLITE_TRANSIENT)
}
#endif

case .zeroData(let length):
sqlite3_result_zeroblob64(context, length)
Expand Down
6 changes: 0 additions & 6 deletions Source/Connection/Statement.swift
Original file line number Diff line number Diff line change
Expand Up @@ -472,15 +472,9 @@ public class Statement {
try connection.check(sqlite3_bind_text(handle, index, value, -1, SQLITE_TRANSIENT))

case .blob(let value):
#if swift(<5.0)
try value.withUnsafeBytes { (bytes: UnsafePointer<UInt8>) -> Void in
try connection.check(sqlite3_bind_blob(handle, index, bytes, Int32(value.count), SQLITE_TRANSIENT))
}
#else
try value.withUnsafeBytes {
_ = try connection.check(sqlite3_bind_blob(handle, index, $0.bindMemory(to: UInt8.self).baseAddress, Int32(value.count), SQLITE_TRANSIENT))
}
#endif
}
}
}
Expand Down

0 comments on commit 5353524

Please sign in to comment.