Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Primary Sendable support for Fluent #601

Merged
merged 28 commits into from
Apr 26, 2024
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a11f4bb
Bump min Swift to 5.8, add feature flags
gwynne Apr 19, 2024
e484211
Some minor code cleanup
gwynne Apr 19, 2024
90d7152
Various more or less isolated Sendable corrections
gwynne Apr 19, 2024
898f4bc
Mark as many things Sendable as we can
gwynne Apr 19, 2024
65f3430
Make QueryBuilder Sendable-safe
gwynne Apr 19, 2024
36a69a6
Make EnumBuilder fake-Sendable-safe for now
gwynne Apr 19, 2024
93807bd
Package structure and CI updates
gwynne Apr 23, 2024
0cd440c
Make EnumBuilder actually Sendable
gwynne Apr 23, 2024
c8f1583
Lots more Sendability
gwynne Apr 23, 2024
7334fb8
MirrorBypass is valid in 5.10 (looks like it'll be valid in 6.0 too, …
gwynne Apr 23, 2024
020927b
Make all the Fluent property wrappers as Sendable as they can be. Thi…
gwynne Apr 23, 2024
e496243
SomeCodingKey is now provided by SQLKit
gwynne Apr 23, 2024
57e6576
Remove old compiler condition
gwynne Apr 23, 2024
260d36d
Fix coverage CI
gwynne Apr 23, 2024
deaff9e
Make DatabaseDriver, DatabaseConfiguration, DatabaseConfigurationFact…
gwynne Apr 23, 2024
f70b62d
Remove locking from the property wrappers, just let them be unchecked…
gwynne Apr 23, 2024
4900e77
A few more Sendables that were missed.
gwynne Apr 23, 2024
eb505f0
Add the missing utilities for encoding Fluent models to SQLKit queries
gwynne Apr 23, 2024
40a18cb
Make benchmarks and tests Sendable
gwynne Apr 23, 2024
d50e8cc
Minor code and docs cleanup
gwynne Apr 24, 2024
52bf884
Update the fake database used for testing to be more flexible and fix…
gwynne Apr 26, 2024
91b62b8
Add tests for new FluentSQL APIs
gwynne Apr 26, 2024
1097e50
Fix Swift<5.10 build
gwynne Apr 26, 2024
bebc4da
Fix chunk test
gwynne Apr 26, 2024
459950e
Remove the last few uses of print() (all in tests)
gwynne Apr 26, 2024
929ee98
Remove unneeded @unchecked Sendable usage
gwynne Apr 26, 2024
d0a83ca
Fix locking of QueryHistory
gwynne Apr 26, 2024
ad1ead6
JSONDecoder's behavior here apparently changes on Linux, so don't do …
gwynne Apr 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
SomeCodingKey is now provided by SQLKit
  • Loading branch information
gwynne committed Apr 23, 2024
commit e496243af48e247d0ec840c8987e72cb259b33da
21 changes: 2 additions & 19 deletions Sources/FluentKit/Utilities/SomeCodingKey.swift
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
/// An implementation of `CodingKey` intended to represent arbitrary string and integer coding keys.
///
/// This structure is effectively an inverse complement of the `CodingKeyRepresentable` protocol.
///
/// "_The standard library's version of a protocol whose requirements are trapped in an infinitely
/// recursive personal identity crisis._" - Unknown
public struct SomeCodingKey: CodingKey, Hashable {
public let stringValue: String
public let intValue: Int?

public init(stringValue: String) {
self.stringValue = stringValue
self.intValue = Int(stringValue)
}
import SQLKit

public init(intValue: Int) {
self.stringValue = "\(intValue)"
self.intValue = intValue
}

extension SQLKit.SomeCodingKey {
public var description: String {
"SomeCodingKey(\"\(self.stringValue)\"\(self.intValue.map { ", int: \($0)" } ?? ""))"
}
Expand Down