Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 78ecff8

Browse files
Merge pull request #67 from vapor/gm
1.0.0 gm
2 parents c3bc56f + 517aab8 commit 78ecff8

25 files changed

+1184
-687
lines changed

‎Package.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ let package = Package(
99
],
1010
dependencies: [
1111
// 🌎 Utility package containing tools for byte manipulation, Codable, OS APIs, and debugging.
12-
.package(url: "https://github.com/vapor/core.git", from:"3.0.0"),
12+
.package(url: "https://github.com/vapor/core.git", .branch("fluent-gm")),
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", .branch("master")),
1616

1717
// 🐘 Non-blocking, event-driven Swift client for PostgreSQL.
18-
.package(url: "https://github.com/vapor/postgresql.git", from:"1.0.0-rc.2"),
18+
.package(url: "https://github.com/vapor/postgresql.git", .branch("master")),
1919
],
2020
targets: [
21-
.target(name: "FluentPostgreSQL", dependencies: ["Async", "Fluent", "FluentSQL","PostgreSQL"]),
21+
.target(name: "FluentPostgreSQL", dependencies: ["Async", "Fluent", "PostgreSQL"]),
2222
.testTarget(name: "FluentPostgreSQLTests", dependencies: ["FluentBenchmark", "FluentPostgreSQL"]),
2323
]
2424
)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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 { }
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/Exports.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
@_exported import Fluent
2-
@_exported import FluentSQL
32
@_exported import PostgreSQL

‎Sources/FluentPostgreSQL/FluentPostgreSQLProvider.swift

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
import Async
2-
import Service
3-
41
/// Adds Fluent PostgreSQL's services to your project.
52
public final class FluentPostgreSQLProvider: Provider {
6-
/// See `Provider.repositoryName`
7-
public static let repositoryName = "fluent-postgresql"
8-
93
/// Creates a new `FluentPostgreSQLProvider`
104
///
115
/// - enableIdentityColumns: If true, `GENERATED BY DEFAULT AS IDENTITY` will be used.
@@ -16,17 +10,21 @@ public final class FluentPostgreSQLProvider: Provider {
1610
}
1711
}
1812

19-
/// See `Provider.register(_:)`
13+
/// See `Provider`.
2014
public func register(_ services: inout Services) throws {
2115
try services.register(FluentProvider())
2216
try services.register(PostgreSQLProvider())
2317
}
2418

25-
/// See `Provider.boot(_:)`
19+
/// See `Provider`.
2620
public func willBoot(_ worker: Container) throws -> Future<Void> {
21+
struct Setting: Codable {
22+
var version: String
23+
}
24+
2725
return worker.withPooledConnection(to: .psql) { conn in
28-
return conn.simpleQuery("SELECT current_setting('server_version') as version").map(to:Void.self) { rows in
29-
_serverVersion = tryrows[0].firstValue(forColumn:"version")!.decode(String.self)
26+
return conn.simpleQuery("SELECT current_setting('server_version') as version", decoding:Setting.self).map { rows in
27+
_serverVersion = rows[0].version
3028
if let versionString = _serverVersion {
3129
let pointIndex = versionString.index(of: ".") ?? versionString.endIndex
3230
let majorVersion = versionString[..<pointIndex]
@@ -38,7 +36,7 @@ public final class FluentPostgreSQLProvider: Provider {
3836
}
3937
}
4038

41-
/// See `Provider.boot(_:)`
39+
/// See `Provider`.
4240
public func didBoot(_ worker: Container) throws -> Future<Void> {
4341
return .done(on: worker)
4442
}

‎Sources/FluentPostgreSQL/PostgreSQLColumn.swift

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /