-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Leverage improvements in SQLKit and SQLiteNIO (#108)
* Update package structure, bump Swift minimum to 5.8, require an SQLKit we actually need, update CI, fix ExistentialAny usage, fix readme, update docs and logo * Sendable correctness, de-underscore the SQLite version type, add support for specifying JSON encoders and decoders, add support for new SQLKit functionality, default to singleton NIOThreadPool, modernize data encoder and decoder to handle data better and faster * Add 100% doc comments coverage * Use un-deprecated SQLBenchmarker API * Update dep minimums * Take advantage of further improvements in SQLiteNIO - SQLiteDatabase is Sendable, support queryLogLevel, don't do extra thread hops in withSession() * Pedantically avoid API breakage with SQLiteDatabase.sql() and make it @inlinable, fix a Sendability warning, add a missing doc comment.
- Loading branch information
Showing
18 changed files
with
723 additions
and
246 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
* @0xTim @gwynne | ||
* @gwynne | ||
/.github/CONTRIBUTING.md @gwynne @0xTim | ||
/.github/workflows/*.yml @gwynne @0xTim | ||
/.github/workflows/test.yml @gwynne | ||
/.spi.yml @gwynne @0xTim | ||
/.gitignore @gwynne @0xTim | ||
/LICENSE @gwynne @0xTim | ||
/README.md @gwynne @0xTim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,39 @@ | ||
<p align="center"> | ||
<picture> | ||
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/vapor/sqlite-kit/assets/1130717/2d99c0b9-35e5-4f04-bb6c-8d59ff6e78c6"> | ||
<source media="(prefers-color-scheme: light)" srcset="https://github.com/vapor/sqlite-kit/assets/1130717/cb36f94d-3ac3-4fba-b801-fe19eac7dbc2"> | ||
<img src="https://github.com/vapor/sqlite-kit/assets/1130717/cb36f94d-3ac3-4fba-b801-fe19eac7dbc2" height="96" alt="SQLiteKit"> | ||
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/vapor/sqlite-kit/assets/1130717/81e423ff-d8b7-49f7-8c40-0287b3f025cf"> | ||
<source media="(prefers-color-scheme: light)" srcset="https://github.com/vapor/sqlite-kit/assets/1130717/79147036-e050-4a87-be7c-68d6d2c40717"> | ||
<img src="https://github.com/vapor/sqlite-kit/assets/1130717/79147036-e050-4a87-be7c-68d6d2c40717" height="96" alt="SQLiteKit"> | ||
</picture> | ||
<br> | ||
<br> | ||
<a href="https://docs.vapor.codes/4.0/"><img src="https://design.vapor.codes/images/readthedocs.svg" alt="Documentation"></a> | ||
<a href="https://discord.gg/vapor"><img src="https://design.vapor.codes/images/discordchat.svg" alt="Team Chat"></a> | ||
<a href="LICENSE"><img src="https://design.vapor.codes/images/mitlicense.svg" alt="MIT License"></a> | ||
<a href="https://github.com/vapor/sqlite-kit/actions/workflows/test.yml"><img src="https://img.shields.io/github/actions/workflow/status/vapor/sqlite-kit/test.yml?event=push&style=plastic&logo=github&label=test&logoColor=%23ccc" alt="Continuous Integration"></a> | ||
<a href="https://codecov.io/github/vapor/sqlite-kit"><img src="https://img.shields.io/codecov/c/github/vapor/sqlite-kit?style=plastic&logo=codecov&label=Codecov"></a> | ||
<a href="https://swift.org"><img src="https://design.vapor.codes/images/swift57up.svg" alt="Swift 5.7+"></a> | ||
<a href="https://www.swift.org/sswg/incubation-process.html"><img src="https://design.vapor.codes/images/sswg-graduated-white.svg" alt="SSWG Incubation Level: Graduated"></a> | ||
<a href="https://codecov.io/github/vapor/sqlite-kit"><img src="https://img.shields.io/codecov/c/github/vapor/sqlite-kit?style=plastic&logo=codecov&label=codecov"></a> | ||
<a href="https://swift.org"><img src="https://design.vapor.codes/images/swift58up.svg" alt="Swift 5.8+"></a> | ||
<a href="https://www.swift.org/sswg/incubation-process.html"><img src="https://design.vapor.codes/images/sswg-graduated.svg" alt="SSWG Incubation Level: Graduated"></a> | ||
</p> | ||
|
||
<br> | ||
|
||
SQLiteKit is a library providing an [SQLKit] driver for [SQLiteNIO]. | ||
SQLiteKit is an [SQLKit] driver for SQLite clients. It supports building and serializing SQLite-dialect SQL queries. SQLiteKit uses [SQLiteNIO] to connect and communicate with the database server asynchronously. [AsyncKit] is used to provide connection pooling. | ||
|
||
> [!NOTE] | ||
> The [FluentKit] driver for SQLite is provided by the [FluentSQLiteDriver] package. | ||
[SQLKit]: https://github.com/vapor/sql-kit | ||
[SQLiteNIO]: https://github.com/vapor/sqlite-nio | ||
[AsyncKit]: https://github.com/vapor/async-kit | ||
|
||
[SQLKit]: https://swiftpackageindex.com/vapor/sql-kit | ||
[SQLiteNIO]: https://swiftpackageindex.com/vapor/sqlite-nio | ||
[Fluent]: https://swiftpackageindex.com/vapor/fluent-kit | ||
[FluentSQLiteDriver]: https://swiftpackageindex.com/vapor/fluent-sqlite-driver | ||
### Usage | ||
|
||
Use the SPM string to easily include the dependendency in your `Package.swift` file. | ||
|
||
```swift | ||
.package(url: "https://github.com/vapor/sqlite-kit.git", from: "4.0.0") | ||
``` | ||
|
||
### Supported Platforms | ||
|
||
SQLiteKit supports the following platforms: | ||
|
||
- Ubuntu 20.04+ | ||
- macOS 10.15+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 13 additions & 14 deletions
27
Sources/SQLiteKit/Docs.docc/images/vapor-sqlitekit-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,4 @@ | ||
#if swift(>=5.8) | ||
|
||
@_documentation(visibility: internal) @_exported import SQLKit | ||
@_documentation(visibility: internal) @_exported import SQLiteNIO | ||
@_documentation(visibility: internal) @_exported import AsyncKit | ||
@_documentation(visibility: internal) @_exported import struct Logging.Logger | ||
|
||
#else | ||
|
||
@_exported import SQLKit | ||
@_exported import SQLiteNIO | ||
@_exported import AsyncKit | ||
@_exported import struct Logging.Logger | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.