Skip to content

Commit 7658f62

Browse files
committed
update deps to tags + add group by
1 parent 9fa5ed7 commit 7658f62

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
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", .branch("sql")),
15+
.package(url: "https://github.com/vapor/fluent.git", from: "3.0.0-rc"),
1616

1717
// 🐘 Non-blocking, event-driven Swift client for PostgreSQL.
18-
.package(url: "https://github.com/vapor/postgresql.git", .branch("sql")),
18+
.package(url: "https://github.com/vapor/postgresql.git", from: "1.0.0-rc"),
1919
],
2020
targets: [
2121
.target(name: "FluentPostgreSQL", dependencies: ["Async", "FluentSQL", "PostgreSQL"]),

Sources/FluentPostgreSQL/Deprecated.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,3 @@ public protocol PostgreSQLEnumType { }
1616
// - warning: Deprecated.
1717
@available(*, deprecated, message: "Use custom migration instead.")
1818
public protocol PostgreSQLType { }
19-
20-
21-
//extension QueryBuilder where Database == PostgreSQLDatabase {
22-
// /// - warning: Deprecated.
23-
// @available(*, deprecated, renamed: "groupBy(_:)")
24-
// public func group<T>(by field: KeyPath<Result, T>) -> Self {
25-
// return groupBy(field)
26-
// }
27-
//}

Sources/FluentPostgreSQL/FluentPostgreSQLQuery.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public struct FluentPostgreSQLQuery: FluentSQLQuery {
2424
public typealias SelectExpression = PostgreSQLSelectExpression
2525
public typealias Join = PostgreSQLJoin
2626
public typealias OrderBy = PostgreSQLOrderBy
27+
public typealias GroupBy = PostgreSQLGroupBy
2728
public typealias Upsert = PostgreSQLUpsert
2829

2930
public var statement: Statement
@@ -33,6 +34,7 @@ public struct FluentPostgreSQLQuery: FluentSQLQuery {
3334
public var joins: [Join]
3435
public var predicate: Expression?
3536
public var orderBy: [OrderBy]
37+
public var groupBy: [GroupBy]
3638
public var limit: Int?
3739
public var offset: Int?
3840
public var upsert: PostgreSQLUpsert?
@@ -47,6 +49,7 @@ public struct FluentPostgreSQLQuery: FluentSQLQuery {
4749
joins: [],
4850
predicate: nil,
4951
orderBy: [],
52+
groupBy: [],
5053
limit: nil,
5154
offset: nil,
5255
upsert: nil,

Sources/FluentPostgreSQL/PostgreSQLDatabase+QuerySupporting.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ extension PostgreSQLDatabase: QuerySupporting {
7575
select.joins = fluent.joins
7676
select.predicate = fluent.predicate
7777
select.orderBy = fluent.orderBy
78+
select.groupBy = fluent.groupBy
7879
select.limit = fluent.limit
7980
select.offset = fluent.offset
8081
query = .select(select)

0 commit comments

Comments
 (0)