Skip to content

Commit 55c9c3c

Browse files
authored
wip (#60)
1 parent 604ab92 commit 55c9c3c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Sources/StructuredQueriesGRDBCore/QueryCursor.swift

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ public class QueryCursor<Element>: DatabaseCursor {
3131
final class QueryValueCursor<QueryValue: QueryRepresentable>: QueryCursor<QueryValue.QueryOutput> {
3232
public typealias Element = QueryValue.QueryOutput
3333

34+
// NB: Required to workaround a "Legacy previews execution" bug
35+
// https://github.com/pointfreeco/sharing-grdb/pull/60
36+
@usableFromInline
37+
override init(db: Database, query: QueryFragment) throws {
38+
try super.init(db: db, query: query)
39+
}
40+
3441
@inlinable
3542
public override func _element(sqliteStatement _: SQLiteStatement) throws -> Element {
3643
let element = try QueryValue(decoder: &decoder).queryOutput
@@ -46,6 +53,13 @@ final class QueryPackCursor<
4653
>: QueryCursor<(repeat (each QueryValue).QueryOutput)> {
4754
public typealias Element = (repeat (each QueryValue).QueryOutput)
4855

56+
// NB: Required to workaround a "Legacy previews execution" bug
57+
// https://github.com/pointfreeco/sharing-grdb/pull/60
58+
@usableFromInline
59+
override init(db: Database, query: QueryFragment) throws {
60+
try super.init(db: db, query: query)
61+
}
62+
4963
@inlinable
5064
public override func _element(sqliteStatement _: SQLiteStatement) throws -> Element {
5165
let element = try decoder.decodeColumns((repeat each QueryValue).self)
@@ -58,6 +72,13 @@ final class QueryPackCursor<
5872
final class QueryVoidCursor: QueryCursor<Void> {
5973
typealias Element = ()
6074

75+
// NB: Required to workaround a "Legacy previews execution" bug
76+
// https://github.com/pointfreeco/sharing-grdb/pull/60
77+
@usableFromInline
78+
override init(db: Database, query: QueryFragment) throws {
79+
try super.init(db: db, query: query)
80+
}
81+
6182
@inlinable
6283
override func _element(sqliteStatement _: SQLiteStatement) throws {
6384
try decoder.decodeColumns(Void.self)

0 commit comments

Comments
 (0)