All notable changes to this project will be documented in this file.
SQift
adheres to Semantic Versioning.
3.3.x
Releases - 3.3.03.2.x
Releases - 3.2.0 | | 3.2.13.1.x
Releases - 3.1.03.0.x
Releases - 3.0.0 | 3.0.1
0.9.x
Releases - 0.9.00.8.x
Releases - 0.8.00.7.x
Releases - 0.7.0 | 0.7.10.6.x
Releases - 0.6.0 | 0.6.10.5.x
Releases - 0.5.00.4.x
Releases - 0.4.00.3.x
Releases - 0.3.00.2.x
Releases - 0.2.00.1.x
Releases - 0.1.0
Released on 2024-01-18.
- Swift Package Manager Support
- Added by Ben Scheirman in Pull Request #40
Released on 2019-10-25. All issues associated with this milestone can be found using this filter.
- Issue where Carthage was unable to build SQift due to schemes requiring test suite compilation.
- Fixed by William Thompson in Pull Request #28.
- Issue in Xcode project Documentation group where links were invalid and README links were broken.
- Fixed by James Eisenhauer in Pull Request #30.
- Compiler warnings in
Function.swift
picked up by Xcode 11.- Fixed by Christian Noon in Pull Request #31.
Released on 2019-04-30. All issues associated with this milestone can be found using this filter.
- Dropped Swift 4.2 support.
- Updated by William Thompson in Pull Request #19.
Released on 2019-04-30. All issues associated with this milestone can be found using this filter.
- To Swift 5 with backwards compatibility to Swift 4.2.
- Updated by William Thompson in Pull Request #18.
- Deployment targets to watchOS 3.0 and tvOS 10.0 in Xcode project to match podspec.
- Updated by William Thompson in Pull Request #18.
Released on 2018-11-30. All issues associated with this milestone can be found using this filter.
- Migration Guide for SQift 4 and added it to the README.
- Added by Jereme Claussen in Pull Request #16.
- Deployment targets to iOS 9.0, Mac OSX 10.11, WatchOS 2.0 and tvOS 9.0.
- Updated by Jereme Claussen in Pull Request #16.
Connection.trace
in favor ofConnection.traceEvent()
- Removed by Jereme Claussen in Pull Request #16.
Released on 2018-11-30. All issues associated with this milestone can be found using this filter.
- The
trace
API to prepare for 4.0 migration since the internalsqlite3_trace
API is deprecated when bumping deployment targets.- Deprecated by Christian Noon in Pull Request #15.
Released on 2018-09-17. All issues associated with this milestone can be found using this filter.
- An internal initializer to
SQLiteError
to assist in error mocking for testing.- Added by Christian Noon.
- The Xcode project to use Xcode 9.3 compatibility mode.
- Updated by Christian Noon in Pull Request #10.
- The Xcode project to support Xcode 10 and Swift 4.2.
- Updated by Christian Noon in Pull Request #10.
- The Travis-CI YAML file to use
bundler
and Xcode 10.- Updated by Christian Noon in Pull Request #10.
Released on 2018-05-02. All issues associated with this milestone can be found using this filter.
- A new
TableLockPolicy
to handle table lock errors onexecute
,prepare
, andstep
operations.- Added by Christian Noon in Pull Request #7.
- The test suite by replacing
do-catch
implementations withthrows
test API variants and unhelpful assertion strings.- Updated by Christian Noon in Pull Request #8.
Released on 2018-04-10. All issues associated with this milestone can be found using this filter.
- The Xcode project and Travis CI to support Xcode 9.3.
- Updated by Christian Noon in Pull Request #6.
- Compiler warnings in aggregate context generation due to Swift 4.1 compiler.
- Fixed by Christian Noon in Pull Request #6.
- Compiler warnings in
CodableBinding
protocol extension with associated type typealias.- Fixed by Christian Noon in Pull Request #6.
Released on 2018-01-02. All issues associated with this milestone can be found using this filter.
- The Xcode project and Travis CI to support Xcode 9.2.
- Updated by Christian Noon in Pull Request #5.
Released on 2017-10-25. All issues associated with this milestone can be found using this filter.
The SQift 3.0.0 release is a MAJOR version bump that comes with many new APIs and a few breaking changes worth calling out.
The SQift 3 release has been converted to only support Swift 4. If you need to use Swift 3.2 or earlier, please stick with the latest SQift 2.x release until you can move to Swift 4.
The biggest source code change in SQift 3 was the removal of Sequence
conformance on Statement
.
This change was made because it's not safe to assume errors will not be encountered while stepping through a result set.
New query
APIs have been added to safely iterate through a result set and throw if an error is encountered.
These are meant to replace the Sequence
conformance on Statement
and are safer and more robust as well.
The fetch
APIs have also been removed and replaced with new query
variants.
SQift 3 unifies all SQL "queries" underneath the query
APIs.
The ExpressibleByRow
protocol was also added to make it easier to convert result sets to model objects.
The other breaking change worth noting is the removal of non-optional query
APIs.
In SQift 2.x, you could query for non-optional Extractable
values directly.
SQift would internally force unwrap the optional value for you.
In SQift 3, these APIs have been removed entirely for safety reasons.
Swift 4 added the ability to make use of generics in subscripts.
This means that you no longer need to write custom extensions on Row
to support your own custom bindings.
We were able to delete all the custom subscript functions in SQift itself for each of the primitive type bindings.
- A new test verifying that
Connection
supports FTS4 out-of-the-box. - New
query
APIs toConnection
andStatement
to replace theSequence
conformance onStatement
. - Better support for converting result sets into model objects through the
ExpressibleByRow
andExpressibleByRowError
types. - New APIs allowing you to query for
Column
information for each column in aRow
. - A
SQL
typealias used throughout the codebase to represent SQL statement strings. - Support to
Connection
for interrupts. - Support to
Statement
to query for busy, read-only status, and bound SQL. BaseTestCase
class to the test suite to help DRY up the tests.- Support to
Connection
to checkpoint a WAL database. - Support to
Connection
for wiring up a busy handler or busy timeout. - Support to
Connection
for update, commit, and rollback hooks. - Support to
Connection
to backup database with progress monitoring, cancellation, and pausing. - The ability to add an
Authorizer
to aConnection
to prevent certain types of statements from being executed. - Support for codable bindings along with array, set, and dictionary bindings.
- Database test demonstrating how a shared cache can compensate for checkpoint gaps in WAL databases.
- Deployment and documentation groups to the Xcode project.
- LICENSE and NOTICE documents to the project.
- The trace and transaction APIs to use Swift boxes instead of Objective-C block typealiases.
- The Xcode project and source code to compile against Swift 4 only.
- The
Row
subscript APIs to leverage generic subscripts in Swift 4 so you no longer need to write you own. - The source code structure by separating out
Connection
extensions into separate files. - The Xcode project to
import SQLite3
directly rather than including thesqlite3.h
header. - The copyright headers throughout the project to conform to the LICENSE.
- The
Sequence
conformance onStatement
since stepping through the result set can throw an error in certain conditions. - The
fetch
APIs fromStatement
andConnection
and replaced with newquery
APIs. - The non-optional
query
APIs onConnection
due to them being unsafe.
- A
.swift-version
file to the project for CocoaPods set to3.2
.
- The Xcode project to support Xcode 9 and Swift 3.2.
- The source and test code to compile against Swift 3.1 and 3.2.
- The sqlite3 header to the iOS 11 version.
- Support for adding and removing custom scalar and aggregate functions to SQLite.
This major release contains only a single API change.
The Extractable
protocol has been updated to allow optional return values instead of non-optional.
public protocol Extractable {
associatedtype BindingType
associatedtype DataType = Self
static func fromBindingValue(_ value: Any) -> DataType?
}
To update to SQift 2.x, you only need to make the DataType
return value of the fromBindingValue
API optional in all your custom Binding
implementations.
You'll also want to investigate your fromBindingValue
implementations to see if you can add some additional safety now that the return type is optional.
The Extractable
implementation of the numeric types has been updated to no longer clamp values outside the bounds of the type to the bounds of the type.
The implementations now return nil
if the underlying value lies outside the bounds of the type.
The best way to demonstrate this is through an example.
If you store a value in the database with a value of 1_000
, and try to extract it as a UInt8
, you will no longer receive 255
, but instead nil
since the value does not fit within the 0...255
range.
- The
Extractable
protocol to allow safe conversions ofAny
values intoDataType
by returning an optional value instead of non-optional. - The
Extractable
implementations for all number types (UInt8
,Int32
, etc.) to no longer "clamp" values outside the type's bounds.
- Issue where
@discardableResult
attribute was used incorrectly onbind
API that does not return a value. - Issue where
TraceEvent
extension did not correctly use availability checks in the test suite.
- Enabled
APPLICATION_EXTENSION_API_ONLY
for iOS, macOS and tvOS targets (was already on for watchOS).
- The
Migrator
to anopen
ACL to allow subclassing.
- All source and test APIs to compile against Swift 3 and follow the Swift API Design Guidelines.
- New
TraceEvent
system withConnection.traceEvent
API backed by the newsqlite3_tracev2
APIs.
- Updated to SQLite 3.14.0 header used in iOS 10.
- Deprecation warning for
sqlite3_trace
function by manually removing the deprecation warning. This is necessary since C libraries don't have availability checks.
This release is all about updating to Xcode 8 and Swift 2.3. There are no other changes in this release.
- Updated project to Xcode 8 and Swift 2.3 and bumped deployment targets.
- Set code signing to automatic with no team on framework and test targets.
Due to CI not being able to always have Xcode live in the /Applications folder, we needed to move away from module maps.
The alternative solution is to directly import the sqlite3.h
header into the project and into the umbrella header.
Since the header is the same on all platforms, there's no reason to import different ones for each platform.
- The
sqlite3.h
header to the project and the-lsqlite3
linker flag.
- Modulemaps that created the
CSQLite
framework to import.
Unfortunately the SQLCipher team is having a difficult time keeping up their support for the various Apple platforms. Because of this, we've had to move away from the dependency altogether. This required the database encryption logic to be removed from SQift.
- Modulemaps to create
CSQLite
modules for each supported platform.
- Podspec to
preserve_paths
of the new modulemaps and import them using theSWIFT_INCLUDE_PATHS
build setting.
- SQLCipher dependency and all encryption logic due to instability in the framework.
- All sections in the README referencing SQLCipher or Encryption.
- Submodule reference for SQLCipher to point at Bitbucket clone.
- Connection tests to verify foreign key settings were connection specific.
- String extension allowing users to safely escape SQL strings.
- All logic to use Swift 2.2 APIs.
- The required Xcode version to 7.3.
- Added
NSURL
binding along withRow
subscripts and unit tests.
- New
run
andfetch
variant APIs for arrays and dictionaries toConnection
. - Tests verifying all parameter binding variants work as expected for
fetch
andquery
APIs.
Database
andConnection
initializers now setsharedCache
tofalse
by default.
Using a
sharedCache
is intended for use with embedded servers to help keep memory usage low for embedded devices.
- The
readOnly
parameter from theDatabase
initializer.
- Refactored test names to use
Connection
instead ofDatabase
where applicable.
- Test around fetching a
Row
that cannot be found. - Method to
Connection
allowing you to query a value with a parameter array.
- The connection property ACL on the
ConnectionQueue
topublic
. - The writer queue and reader pool property ACLs on the
Database
topublic
. Connection
andStatement
fetch functions to return an optionalRow
for cases where the fetch does not find a validRow
.- The code sample in the README for fetching a single
Row
. Database
andConnectionPool
initializers to take connection preparation closures to allow you to prepare aConnection
for use. This allows you to set PRAGMAs, custom collation closures, etc. on a connection before starting to use it.
This is the initial release of SQift. Things will continue to evolve through the November '15 - January '16 timeframe as more SQift features are added. The goal is to be ready to release the 1.0.0 version around late January '16. The road to 1.0.0 will attempt to follow semver as closely as possible, but is not guaranteed. Until the 1.0.0 release, please pay close attention to the upgrade and release notes for each version.