Skip to content

Commit

Permalink
Merge pull request #156 from vapor/tn-array-fix
Browse files Browse the repository at this point in the history
add array(of:) support
  • Loading branch information
tanner0101 authored Dec 11, 2019
2 parents 984c420 + 399a8b8 commit fd2aa32
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions Sources/FluentMySQLDriver/MySQLConverterDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ struct MySQLConverterDelegate: SQLConverterDelegate {
case .datetime: return SQLRaw("DATETIME(6)")
case .uuid: return SQLRaw("VARBINARY(16)")
case .bool: return SQLRaw("BIT")
case .array: return SQLRaw("JSON")
default: return nil
}
}
Expand Down
40 changes: 40 additions & 0 deletions Tests/FluentMySQLDriverTests/FluentMySQLDriverTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,46 @@ final class FluentMySQLDriverTests: XCTestCase {
try self.benchmarker.testSiblingsEagerLoad()
}

func testParentGet() throws {
try self.benchmarker.testParentGet()
}

func testParentSerialization() throws {
try self.benchmarker.testParentSerialization()
}

func testMultipleJoinSameTable() throws {
try self.benchmarker.testMultipleJoinSameTable()
}

func testOptionalParent() throws {
try self.benchmarker.testOptionalParent()
}

func testFieldFilter() throws {
try self.benchmarker.testFieldFilter()
}

func testJoinedFieldFilter() throws {
try self.benchmarker.testJoinedFieldFilter()
}

func testSameChildrenFromKey() throws {
try self.benchmarker.testSameChildrenFromKey()
}

func testArray() throws {
try self.benchmarker.testArray()
}

func testPerformance() throws {
try self.benchmarker.testPerformance()
}

func testSoftDeleteWithQuery() throws {
try self.benchmarker.testSoftDeleteWithQuery()
}

func testClarityModel() throws {
final class Clarity: Model {
static let schema = "clarities"
Expand Down

0 comments on commit fd2aa32

Please sign in to comment.