Skip to content

Commit 9531a7f

Browse files
committed
More specialization
1 parent 9e3eebf commit 9531a7f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

GRDB/Core/Statement.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ final class StatementCursor: DatabaseCursor {
504504
try? _statement.reset()
505505
}
506506

507-
@usableFromInline
507+
@inlinable
508508
func _element(sqliteStatement: SQLiteStatement) throws { }
509509
}
510510

GRDB/Record/FetchableRecord.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,12 @@ public final class RecordCursor<Record: FetchableRecord>: DatabaseCursor {
521521
public let _statement: Statement
522522
/// :nodoc:
523523
public var _isDone = false
524-
private let row: Row // Instantiated once, reused for performance
524+
@usableFromInline
525+
let _row: Row // Instantiated once, reused for performance
525526

526527
init(statement: Statement, arguments: StatementArguments? = nil, adapter: (any RowAdapter)? = nil) throws {
527528
self._statement = statement
528-
row = try Row(statement: statement).adapted(with: adapter, layout: statement)
529+
_row = try Row(statement: statement).adapted(with: adapter, layout: statement)
529530
try statement.reset(withArguments: arguments)
530531
}
531532

@@ -536,8 +537,9 @@ public final class RecordCursor<Record: FetchableRecord>: DatabaseCursor {
536537
}
537538

538539
/// :nodoc:
540+
@inlinable
539541
public func _element(sqliteStatement: SQLiteStatement) throws -> Record {
540-
try Record(row: row)
542+
try Record(row: _row)
541543
}
542544
}
543545

0 commit comments

Comments
 (0)