Skip to content

Commit 21b0788

Browse files
authoredFeb 24, 2023
Add API Docs (#202)
1 parent 51f7c8a commit 21b0788

10 files changed

+47
-16
lines changed
 

‎.github/workflows/api-docs.yml

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
name: deploy-api-docs
22
on:
3-
push:
4-
branches:
5-
- main
3+
push:
4+
branches:
5+
- main
66

77
jobs:
8-
deploy:
9-
name: api.vapor.codes
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Deploy api-docs
13-
uses: appleboy/ssh-action@master
14-
with:
15-
host: vapor.codes
16-
username: vapor
17-
key: ${{ secrets.VAPOR_CODES_SSH_KEY }}
18-
script: ./github-actions/deploy-api-docs.sh
8+
build-and-deploy:
9+
uses: vapor/api-docs/.github/workflows/build-and-deploy-docs-workflow.yml@main
10+
secrets: inherit
11+
with:
12+
package_name: fluent-postgres-driver
13+
modules: FluentPostgresDriver
14+
pathsToInvalidate: /fluentpostgresdriver

‎.github/workflows/test.yml

+11
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,14 @@ jobs:
160160
uses: actions/checkout@v3
161161
- name: Run all tests
162162
run: swift test
163+
164+
test-exports:
165+
name: Test exports
166+
runs-on: ubuntu-latest
167+
steps:
168+
- name: Check out Vapor
169+
uses: actions/checkout@v3
170+
with:
171+
fetch-depth: 0
172+
- name: Build
173+
run: swift build -Xswiftc -DBUILDING_DOCC

‎.spi.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
version: 1
22
metadata:
3-
authors: “Maintained by the Vapor Core Team with hundreds of contributions from the Vapor Community.”
3+
authors: "Maintained by the Vapor Core Team with hundreds of contributions from the Vapor Community."
4+
external_links:
5+
documentation: "https://api.vapor.codes/fluentpostgresdriver/documentation/fluentpostgresdriver/"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ``FluentPostgresDriver``
2+
3+
FluentPostgresDriver is a package to integrate PostgresNIO and and PostrgresKit with FluentKit to make it easy to use and write database operations in Swift.
+10-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1+
#if !BUILDING_DOCC
2+
13
@_exported import FluentKit
24
@_exported import PostgresKit
35

6+
#else
7+
8+
import FluentKit
9+
import PostgresKit
10+
11+
#endif
12+
413
extension DatabaseID {
514
public static var psql: DatabaseID {
615
return .init(string: "psql")
716
}
8-
}
17+
}

‎Sources/FluentPostgresDriver/FluentPostgresConfiguration.swift

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import Logging
2+
import FluentKit
3+
import NIOCore
4+
import PostgresKit
25

36
extension DatabaseConfigurationFactory {
47
public static func postgres(

‎Sources/FluentPostgresDriver/FluentPostgresDatabase.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import FluentSQL
22
import Logging
3+
import PostgresKit
34

45
struct _FluentPostgresDatabase {
56
let database: PostgresDatabase

‎Sources/FluentPostgresDriver/FluentPostgresDriver.swift

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import Logging
2+
import FluentKit
3+
import PostgresKit
24

35
enum FluentPostgresError: Error {
46
case invalidURL(String)

‎Sources/FluentPostgresDriver/PostgresError+Database.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import FluentSQL
2+
import PostgresKit
23

34
extension PostgresError: DatabaseError {
45
public var isSyntaxError: Bool {

‎Sources/FluentPostgresDriver/PostgresRow+Database.swift

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import PostgresKit
2+
import FluentKit
3+
14
extension PostgresRow {
25
internal func databaseOutput(using decoder: PostgresDataDecoder) -> DatabaseOutput {
36
_PostgresDatabaseOutput(

0 commit comments

Comments
 (0)
Please sign in to comment.