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 3b989aa

Browse files
convert Fluent's uint8 type to postgres char (#132)
1 parent 7c95e2d commit 3b989aa

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

‎Sources/FluentPostgresDriver/PostgresConverterDelegate.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import FluentSQL
33
struct PostgresConverterDelegate: SQLConverterDelegate {
44
func customDataType(_ dataType: DatabaseSchema.DataType) -> SQLExpression? {
55
switch dataType {
6+
case .uint8:
7+
return SQLRaw(#""char""#)
68
case .uuid:
79
return SQLRaw("UUID")
810
case .bool:

‎Tests/FluentPostgresDriverTests/FluentPostgresDriverTests.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,14 @@ final class FluentPostgresDriverTests: XCTestCase {
167167
func testDuplicatedUniquePropertyName() throws {
168168
try self.benchmarker.testDuplicatedUniquePropertyName()
169169
}
170+
171+
func testEmptyEagerLoadChildren() throws {
172+
try self.benchmarker.testEmptyEagerLoadChildren()
173+
}
174+
175+
func testUInt8BackedEnum() throws {
176+
try self.benchmarker.testUInt8BackedEnum()
177+
}
170178

171179
func testBlob() throws {
172180
final class Foo: Model {

0 commit comments

Comments
(0)

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