Skip to content

Commit a99b651

Browse files
committed
add docblocks + remove extraneous files
1 parent b5da9d5 commit a99b651

File tree

7 files changed

+5
-53
lines changed

7 files changed

+5
-53
lines changed

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ let package = Package(
1212
.package(url: "https://github.com/vapor/core.git", from: "3.0.0"),
1313

1414
// Swift ORM framework (queries, models, and relations) for building NoSQL and SQL database integrations.
15-
.package(url: "https://github.com/vapor/fluent.git", from: "3.0.0-rc"),
15+
.package(url: "https://github.com/vapor/fluent.git", from: "3.0.0"),
1616

1717
// 🐘 Non-blocking, event-driven Swift client for PostgreSQL.
18-
.package(url: "https://github.com/vapor/postgresql.git", from: "1.0.0-rc"),
18+
.package(url: "https://github.com/vapor/postgresql.git", from: "1.0.0"),
1919
],
2020
targets: [
2121
.target(name: "FluentPostgreSQL", dependencies: ["Async", "FluentSQL", "PostgreSQL"]),
Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1 @@
1-
@available(*, deprecated, renamed: "PostgreSQLDataConvertible")
2-
public typealias PostgreSQLColumnStaticRepresentable = PostgreSQLDataConvertible
3-
4-
/// - warning: Deprecated.
5-
@available(*, deprecated, renamed: "PostgreSQLType")
6-
public protocol PostgreSQLJSONType: PostgreSQLType { }
7-
8-
/// - warning: Deprecated.
9-
@available(*, deprecated, renamed: "PostgreSQLType")
10-
public protocol PostgreSQLArrayType: PostgreSQLType { }
11-
12-
// - warning: Deprecated.
13-
@available(*, deprecated, message: "Use custom migration instead.")
14-
public protocol PostgreSQLEnumType { }
15-
16-
// - warning: Deprecated.
17-
@available(*, deprecated, message: "Use custom migration instead.")
18-
public protocol PostgreSQLType { }
1+
/// Nothing here yet...
Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,2 @@
11
@_exported import FluentSQL
22
@_exported import PostgreSQL
3-
4-
//extension QueryBuilder where Database == PostgreSQLDatabase {
5-
// public func keys(_ keys: PostgreSQLQuery.Key...) -> Self {
6-
// query.keys = keys
7-
// return self
8-
// }
9-
//
10-
// // MARK: Group By
11-
//
12-
// /// Adds a group by to the query builder.
13-
// ///
14-
// /// query.groupBy(\.name)
15-
// ///
16-
// /// - parameters:
17-
// /// - field: Swift `KeyPath` to field on model to group by.
18-
// /// - returns: Query builder for chaining.
19-
// public func groupBy<T>(_ field: KeyPath<Result, T>) -> Self {
20-
// return groupBy(.expression(.column(PostgreSQLDatabase.queryField(.keyPath(field))), alias: nil))
21-
// }
22-
//
23-
// /// Adds a manually created group by to the query builder.
24-
// /// - parameters:
25-
// /// - groupBy: New `Query.GroupBy` to add.
26-
// /// - returns: Query builder for chaining.
27-
// public func groupBy(_ groupBy: PostgreSQLQuery.Key) -> Self {
28-
// query.groupBy.append(groupBy)
29-
// return self
30-
// }
31-
//}

Sources/FluentPostgreSQL/Fluent+PostgreSQLUpsert.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
extension _PostgreSQLModel {
2+
/// Creates the model or updates it depending on whether a model with the same ID already exists.
23
public func create(orUpdate: Bool, on conn: DatabaseConnectable) -> Future<Self> {
34
return Self.query(on: conn).create(orUpdate: orUpdate, self)
45
}
56
}
67

78
extension QueryBuilder where Result: _PostgreSQLModel, Result.Database == Database {
9+
/// Creates the model or updates it depending on whether a model with the same ID already exists.
810
public func create(orUpdate: Bool, _ model: Result) -> Future<Result> {
911
if orUpdate {
1012
let row = SQLQueryEncoder(PostgreSQLExpression.self).encode(model)

Sources/FluentPostgreSQL/PostgreSQLTableNameCache.swift

Lines changed: 0 additions & 1 deletion
This file was deleted.

Sources/FluentPostgreSQL/PostgreSQLType.swift

Lines changed: 0 additions & 1 deletion
This file was deleted.

Sources/FluentPostgreSQL/Utilities.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
protocol AnyArray {
42
static var anyElementType: Any.Type { get }
53
}

0 commit comments

Comments
 (0)