Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API Docs #101

Merged
merged 7 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions .github/workflows/api-docs.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
name: deploy-api-docs
on:
push:
branches:
- main
push:
branches:
- main

jobs:
deploy:
name: api.vapor.codes
runs-on: ubuntu-latest
steps:
- name: Deploy api-docs
uses: appleboy/ssh-action@master
with:
host: vapor.codes
username: vapor
key: ${{ secrets.VAPOR_CODES_SSH_KEY }}
script: ./github-actions/deploy-api-docs.sh
build-and-deploy:
uses: vapor/api-docs/.github/workflows/build-and-deploy-docs-workflow.yml@main
secrets: inherit
with:
package_name: sqlite-kit
modules: SQLiteKit
pathsToInvalidate: /sqlitekit
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,14 @@ jobs:
uses: actions/checkout@v3
- name: Run tests with Thread Sanitizer
run: swift test --sanitize=thread

test-exports:
name: Test exports
runs-on: ubuntu-latest
steps:
- name: Check out Vapor
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build
run: swift build -Xswiftc -DBUILDING_DOCC
4 changes: 3 additions & 1 deletion .spi.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version: 1
metadata:
authors: “Maintained by the Vapor Core Team with hundreds of contributions from the Vapor Community.”
authors: "Maintained by the Vapor Core Team with hundreds of contributions from the Vapor Community."
external_links:
documentation: "https://api.vapor.codes/sqlitekit/documentation/sqlitekit/"
3 changes: 3 additions & 0 deletions Sources/SQLiteKit/Docs.docc/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ``SQLiteKit``

SQLiteKit is a library to provide a simple Swift interface to SQLiteNIO using SQLKit.
4 changes: 4 additions & 0 deletions Sources/SQLiteKit/Exports.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#if !BUILDING_DOCC

@_exported import SQLKit
@_exported import SQLiteNIO
@_exported import AsyncKit
@_exported import struct Logging.Logger

#endif
3 changes: 3 additions & 0 deletions Sources/SQLiteKit/SQLiteConnection+SQLKit.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import SQLKit
import SQLiteNIO

extension SQLiteDatabase {
public func sql() -> SQLDatabase {
_SQLiteSQLDatabase(database: self)
Expand Down
4 changes: 4 additions & 0 deletions Sources/SQLiteKit/SQLiteConnectionSource.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import Logging
import AsyncKit
import NIOPosix
import SQLiteNIO
import NIOCore

public struct SQLiteConnectionSource: ConnectionPoolSource {
private let configuration: SQLiteConfiguration
Expand Down
1 change: 1 addition & 0 deletions Sources/SQLiteKit/SQLiteDataDecoder.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import SQLiteNIO

public struct SQLiteDataDecoder {
public init() {}
Expand Down
3 changes: 2 additions & 1 deletion Sources/SQLiteKit/SQLiteDataEncoder.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import NIO
import NIOCore
import Foundation
import SQLiteNIO

public struct SQLiteDataEncoder {
public init() { }
Expand Down
3 changes: 3 additions & 0 deletions Sources/SQLiteKit/SQLiteRow+SQLRow.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import SQLKit
import SQLiteNIO

extension SQLiteRow: SQLRow {
public var allColumns: [String] {
self.columns.map { $0.name }
Expand Down
2 changes: 2 additions & 0 deletions Tests/SQLiteKitTests/SQLiteKitTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import Logging
import SQLiteKit
import SQLKitBenchmark
import XCTest
import SQLiteNIO
import SQLKit

class SQLiteKitTests: XCTestCase {
func testSQLKitBenchmark() throws {
Expand Down