Skip to content

Commit

Permalink
SQL is Sendable
Browse files Browse the repository at this point in the history
  • Loading branch information
groue committed Aug 25, 2024
1 parent 30569ab commit aff662c
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion GRDB/Core/SQL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
///
/// - ``append(literal:)``
/// - ``append(sql:arguments:)``
public struct SQL {
public struct SQL: Sendable {
/// `SQL.Element` is a component of an `SQL` literal.
///
/// Elements can be qualified with table aliases, and this is how `SQL`
Expand Down
2 changes: 1 addition & 1 deletion GRDB/QueryInterface/SQL/SQLExpression.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/// ```
///
/// Related SQLite documentation: <https://www.sqlite.org/lang_expr.html>
public struct SQLExpression {
public struct SQLExpression: Sendable {
private var impl: Impl

/// The preferred interpretation of the expression in JSON
Expand Down
2 changes: 1 addition & 1 deletion GRDB/QueryInterface/SQL/SQLOrdering.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/// function arguments, prefer the ``SQLOrderingTerm`` protocol.
///
/// Related SQLite documentation: <https://www.sqlite.org/syntax/ordering-term.html>
public struct SQLOrdering {
public struct SQLOrdering: Sendable {
private var impl: Impl

private enum Impl {
Expand Down
6 changes: 3 additions & 3 deletions GRDB/QueryInterface/SQL/SQLRelation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
/// // JOIN passport ON passport.citizenId = citizens.id
/// // AND passport.countryCode IN ('BE', 'DE', 'FR', ...);
/// Country.including(all: Country.citizens)
struct SQLRelation {
struct SQLRelation: Sendable {
struct Child: Refinable {
enum Kind {
// Record.including(optional: association)
Expand Down Expand Up @@ -672,7 +672,7 @@ struct SQLLimit {

// MARK: - SQLSource

struct SQLSource {
struct SQLSource: Sendable {
var tableName: String
var alias: TableAlias?

Expand All @@ -691,7 +691,7 @@ struct SQLSource {

extension SQLRelation {
/// SQLRelation.Ordering provides the order clause to SQLRelation.
struct Ordering {
struct Ordering: Sendable {
private enum Element {
case terms(DatabasePromise<[SQLOrdering]>)
case ordering(SQLRelation.Ordering)
Expand Down
2 changes: 1 addition & 1 deletion GRDB/QueryInterface/SQL/SQLSelection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/// function arguments, prefer the ``SQLSelectable`` protocol.
///
/// Related SQLite documentation: <https://www.sqlite.org/syntax/result-column.html>
public struct SQLSelection {
public struct SQLSelection: Sendable {
private var impl: Impl

/// The private implementation of the public `SQLSelection`.
Expand Down
2 changes: 1 addition & 1 deletion GRDB/QueryInterface/SQL/SQLSubquery.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// An SQL subquery.
///
/// `SQLSubquery` is an opaque representation of an SQL subquery.
public struct SQLSubquery {
public struct SQLSubquery: Sendable {
private var impl: Impl

private enum Impl {
Expand Down
4 changes: 2 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@
- [ ] GRDB7: Not Sendable: fts5customtokenizer, fts5tokenizer, fts5wrappertokenizer
- [X] GRDB7: Sendable: DatabasePromise (05899228, 5a2c15b8)
- [X] GRDB7: Sendable: TableAlias (f2b0b186)
- [ ] GRDB7: Sendable: SQLRelation (9545bf70)
- [ ] GRDB7: Sendable: SQL (ac33856f)
- [X] GRDB7: Sendable: SQLRelation (9545bf70)
- [X] GRDB7: Sendable: SQL (ac33856f)
- [ ] GRDB7: Split Row.swift (2ce8a619)
- [ ] GRDB7: Cleanup ValueReducer (6c73b1c5)
- [X] GRDB7: DatabaseCursor has a primary associated type (b11c5dd2)
Expand Down

0 comments on commit aff662c

Please sign in to comment.