<commit_before>// Fixits for changes introduced by GRDB 5.0.0
// swiftlint:disable all

import Dispatch
#if os(iOS)
import UIKit
#endif

extension AnyFetchRequest {
    @available(*, unavailable, renamed: "RowDecoder")
    typealias T = RowDecoder
    
    @available(*, unavailable, message: "Use AnyFetchRequest(request).asRequest(of: SomeType.self) instead.")
    public init<Request: FetchRequest>(_ request: Request)
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Define your own FetchRequest type instead.")
    public init(_ prepare: @escaping (Database, _ singleResult: Bool) throws -> (SelectStatement, RowAdapter?))
    { preconditionFailure() }
}

@available(*, unavailable, message: "Custom reducers are no longer supported. See the \"Migrating From GRDB 4 to GRDB 5\" guide.")
public struct AnyValueReducer<Fetched, Value>: ValueReducer {
    public var _isSelectedRegionDeterministic: Bool
    { preconditionFailure() }
    
    public init(fetch: @escaping (Database) throws -> Fetched, value: @escaping (Fetched) -> Value?)
    { preconditionFailure() }
    
    public init<Base: _ValueReducer>(_ reducer: Base) where Base.Fetched == Fetched, Base.Value == Value
    { preconditionFailure() }
    
    public func _fetch(_ db: Database) throws -> Fetched
    { preconditionFailure() }
    
    public func _value(_ fetched: Fetched) -> Value?
    { preconditionFailure() }
}

extension AssociationAggregate {
    @available(*, unavailable, renamed: "forKey(_:)")
    public func aliased(_ name: String) -> AssociationAggregate<RowDecoder>
    { preconditionFailure() }
    
    @available(*, unavailable, renamed: "forKey(_:)")
    public func aliased(_ key: CodingKey) -> AssociationAggregate<RowDecoder>
    { preconditionFailure() }
}

extension Configuration {
    @available(*, unavailable, message: "Replace the assignment with a method call: prepareDatabase { db in ... }")
    public var prepareDatabase: ((Database) throws -> Void)? {
        get { preconditionFailure() }
        set { preconditionFailure() }
    }
    
    @available(*, unavailable, message: "Use Database.trace(options:_:) in Configuration.prepareDatabase instead.")
    public var trace: TraceFunction? {
        get { preconditionFailure() }
        set { preconditionFailure() }
    }
}

extension DatabaseFunction {
    @available(*, unavailable, renamed: "callAsFunction(_:)")
    public func apply(_ arguments: SQLExpressible...) -> SQLExpression
    { preconditionFailure() }
}

extension DatabaseMigrator {
    @available(*, unavailable, renamed: "registerMigration(_:migrate:)")
    public mutating func registerMigrationWithDeferredForeignKeyCheck(
        _ identifier: String,
        migrate: @escaping (Database) throws -> Void)
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Wrap this method: reader.read(migrator.appliedMigrations) }")
    public func appliedMigrations(in reader: DatabaseReader) throws -> Set<String>
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Wrap this method: reader.read(migrator.hasCompletedMigrations) }")
    public func hasCompletedMigrations(in reader: DatabaseReader) throws -> Bool
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Prefer reader.read(migrator.completedMigrations).contains(targetIdentifier)")
    public func hasCompletedMigrations(in reader: DatabaseReader, through targetIdentifier: String) throws -> Bool
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Prefer reader.read(migrator.completedMigrations).last")
    public func lastCompletedMigration(in reader: DatabaseReader) throws -> String?
    { preconditionFailure() }
}

extension DatabasePool {
    @available(*, unavailable, message: "Use pool.writeWithoutTransaction { $0.checkpoint() } instead")
    public func checkpoint(_ kind: Database.CheckpointMode = .passive) throws { preconditionFailure() }
    
    #if os(iOS)
    @available(*, unavailable, message: "Memory management is now enabled by default. This method does nothing.")
    public func setupMemoryManagement(in application: UIApplication) { preconditionFailure() }
    #endif
}

extension DatabaseQueue {
    #if os(iOS)
    @available(*, unavailable, message: "Memory management is now enabled by default. This method does nothing.")
    public func setupMemoryManagement(in application: UIApplication) { preconditionFailure() }
    #endif
}

extension DatabaseReader {
    @available(*, unavailable, message: "Use Database.add(collation:) in Configuration.prepareDatabase instead.")
    public func add(collation: DatabaseCollation) { preconditionFailure() }
    
    @available(*, unavailable)
    public func remove(collation: DatabaseCollation) { preconditionFailure() }
    
    @available(*, unavailable, message: "Use Database.add(function:) in Configuration.prepareDatabase instead.")
    public func add(function: DatabaseFunction) { preconditionFailure() }
    
    @available(*, unavailable)
    public func remove(function: DatabaseFunction) { preconditionFailure() }
    
    #if SQLITE_ENABLE_FTS5
    @available(*, unavailable, message: "Use Database.add(tokenizer:) in Configuration.prepareDatabase instead.")
    public func add<Tokenizer: FTS5CustomTokenizer>(tokenizer: Tokenizer.Type) { preconditionFailure() }
    #endif
}

extension FetchRequest {
    @available(*, unavailable, message: "Use makePreparedRequest(_:forSingleResult:) instead.")
    func prepare(_ db: Database, forSingleResult singleResult: Bool) throws -> (SelectStatement, RowAdapter?)
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Use ValueObservation.tracking(request.fetchCount) instead")
    public func observationForCount() -> ValueObservation<ValueReducers.Unavailable<Int>>
    { preconditionFailure() }
}

extension FetchRequest where RowDecoder: DatabaseValueConvertible {
    @available(*, unavailable, message: "Use ValueObservation.tracking(request.fetchAll) instead")
    public func observationForAll() -> ValueObservation<ValueReducers.Unavailable<[RowDecoder]>>
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Use ValueObservation.tracking(request.fetchOne) instead")
    public func observationForFirst() -> ValueObservation<ValueReducers.Unavailable<RowDecoder?>>
    { preconditionFailure() }
}

extension FetchRequest where RowDecoder: FetchableRecord {
    @available(*, unavailable, message: "Use ValueObservation.tracking(request.fetchAll) instead")
    public func observationForAll() -> ValueObservation<ValueReducers.Unavailable<[RowDecoder]>>
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Use ValueObservation.tracking(request.fetchOne) instead")
    public func observationForFirst() -> ValueObservation<ValueReducers.Unavailable<RowDecoder?>>
    { preconditionFailure() }
}

extension FetchRequest where RowDecoder: _OptionalProtocol, RowDecoder.Wrapped: DatabaseValueConvertible {
    @available(*, unavailable, message: "Use ValueObservation.tracking(request.fetchAll) instead")
    public func observationForAll() -> ValueObservation<ValueReducers.Unavailable<[RowDecoder.Wrapped?]>>
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Use ValueObservation.tracking(request.fetchOne) instead")
    public func observationForFirst() -> ValueObservation<ValueReducers.Unavailable<RowDecoder.Wrapped?>>
    { preconditionFailure() }
}

extension FetchRequest where RowDecoder == Row {
    @available(*, unavailable, message: "Use ValueObservation.tracking(request.fetchAll) instead")
    public func observationForAll() -> ValueObservation<ValueReducers.Unavailable<[Row]>>
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Use ValueObservation.tracking(request.fetchOne) instead")
    public func observationForFirst() -> ValueObservation<ValueReducers.Unavailable<Row?>>
    { preconditionFailure() }
}

extension QueryInterfaceRequest {
    @available(*, unavailable, renamed: "RowDecoder")
    typealias T = RowDecoder
}

extension SQLExpression {
    @available(*, unavailable, message: "Use SQL initializer instead")
    public var sqlLiteral: SQL
    { preconditionFailure() }
}

extension FilteredRequest {
    @available(*, unavailable, message: "The expectingSingleResult() hint is no longer available.")
    func expectingSingleResult() -> Self
    { preconditionFailure() }
}

/// :nodoc:
@available(*, unavailable, message: "Build literal expressions with SQL.sqlExpression instead.")
struct SQLExpressionLiteral: SQLSpecificExpressible {
    var sqlExpression: SQLExpression { preconditionFailure() }
    
    @available(*, unavailable, message: "Build literal expressions with SQL.sqlExpression instead.")
    public var sql: String { preconditionFailure() }<commit_msg>Add fixit for SQLLiteral<commit_after>// Fixits for changes introduced by GRDB 5.0.0
// swiftlint:disable all

import Dispatch
#if os(iOS)
import UIKit
#endif

extension AnyFetchRequest {
    @available(*, unavailable, renamed: "RowDecoder")
    typealias T = RowDecoder
    
    @available(*, unavailable, message: "Use AnyFetchRequest(request).asRequest(of: SomeType.self) instead.")
    public init<Request: FetchRequest>(_ request: Request)
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Define your own FetchRequest type instead.")
    public init(_ prepare: @escaping (Database, _ singleResult: Bool) throws -> (SelectStatement, RowAdapter?))
    { preconditionFailure() }
}

@available(*, unavailable, message: "Custom reducers are no longer supported. See the \"Migrating From GRDB 4 to GRDB 5\" guide.")
public struct AnyValueReducer<Fetched, Value>: ValueReducer {
    public var _isSelectedRegionDeterministic: Bool
    { preconditionFailure() }
    
    public init(fetch: @escaping (Database) throws -> Fetched, value: @escaping (Fetched) -> Value?)
    { preconditionFailure() }
    
    public init<Base: _ValueReducer>(_ reducer: Base) where Base.Fetched == Fetched, Base.Value == Value
    { preconditionFailure() }
    
    public func _fetch(_ db: Database) throws -> Fetched
    { preconditionFailure() }
    
    public func _value(_ fetched: Fetched) -> Value?
    { preconditionFailure() }
}

extension AssociationAggregate {
    @available(*, unavailable, renamed: "forKey(_:)")
    public func aliased(_ name: String) -> AssociationAggregate<RowDecoder>
    { preconditionFailure() }
    
    @available(*, unavailable, renamed: "forKey(_:)")
    public func aliased(_ key: CodingKey) -> AssociationAggregate<RowDecoder>
    { preconditionFailure() }
}

extension Configuration {
    @available(*, unavailable, message: "Replace the assignment with a method call: prepareDatabase { db in ... }")
    public var prepareDatabase: ((Database) throws -> Void)? {
        get { preconditionFailure() }
        set { preconditionFailure() }
    }
    
    @available(*, unavailable, message: "Use Database.trace(options:_:) in Configuration.prepareDatabase instead.")
    public var trace: TraceFunction? {
        get { preconditionFailure() }
        set { preconditionFailure() }
    }
}

extension DatabaseFunction {
    @available(*, unavailable, renamed: "callAsFunction(_:)")
    public func apply(_ arguments: SQLExpressible...) -> SQLExpression
    { preconditionFailure() }
}

extension DatabaseMigrator {
    @available(*, unavailable, renamed: "registerMigration(_:migrate:)")
    public mutating func registerMigrationWithDeferredForeignKeyCheck(
        _ identifier: String,
        migrate: @escaping (Database) throws -> Void)
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Wrap this method: reader.read(migrator.appliedMigrations) }")
    public func appliedMigrations(in reader: DatabaseReader) throws -> Set<String>
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Wrap this method: reader.read(migrator.hasCompletedMigrations) }")
    public func hasCompletedMigrations(in reader: DatabaseReader) throws -> Bool
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Prefer reader.read(migrator.completedMigrations).contains(targetIdentifier)")
    public func hasCompletedMigrations(in reader: DatabaseReader, through targetIdentifier: String) throws -> Bool
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Prefer reader.read(migrator.completedMigrations).last")
    public func lastCompletedMigration(in reader: DatabaseReader) throws -> String?
    { preconditionFailure() }
}

extension DatabasePool {
    @available(*, unavailable, message: "Use pool.writeWithoutTransaction { $0.checkpoint() } instead")
    public func checkpoint(_ kind: Database.CheckpointMode = .passive) throws { preconditionFailure() }
    
    #if os(iOS)
    @available(*, unavailable, message: "Memory management is now enabled by default. This method does nothing.")
    public func setupMemoryManagement(in application: UIApplication) { preconditionFailure() }
    #endif
}

extension DatabaseQueue {
    #if os(iOS)
    @available(*, unavailable, message: "Memory management is now enabled by default. This method does nothing.")
    public func setupMemoryManagement(in application: UIApplication) { preconditionFailure() }
    #endif
}

extension DatabaseReader {
    @available(*, unavailable, message: "Use Database.add(collation:) in Configuration.prepareDatabase instead.")
    public func add(collation: DatabaseCollation) { preconditionFailure() }
    
    @available(*, unavailable)
    public func remove(collation: DatabaseCollation) { preconditionFailure() }
    
    @available(*, unavailable, message: "Use Database.add(function:) in Configuration.prepareDatabase instead.")
    public func add(function: DatabaseFunction) { preconditionFailure() }
    
    @available(*, unavailable)
    public func remove(function: DatabaseFunction) { preconditionFailure() }
    
    #if SQLITE_ENABLE_FTS5
    @available(*, unavailable, message: "Use Database.add(tokenizer:) in Configuration.prepareDatabase instead.")
    public func add<Tokenizer: FTS5CustomTokenizer>(tokenizer: Tokenizer.Type) { preconditionFailure() }
    #endif
}

extension FetchRequest {
    @available(*, unavailable, message: "Use makePreparedRequest(_:forSingleResult:) instead.")
    func prepare(_ db: Database, forSingleResult singleResult: Bool) throws -> (SelectStatement, RowAdapter?)
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Use ValueObservation.tracking(request.fetchCount) instead")
    public func observationForCount() -> ValueObservation<ValueReducers.Unavailable<Int>>
    { preconditionFailure() }
}

extension FetchRequest where RowDecoder: DatabaseValueConvertible {
    @available(*, unavailable, message: "Use ValueObservation.tracking(request.fetchAll) instead")
    public func observationForAll() -> ValueObservation<ValueReducers.Unavailable<[RowDecoder]>>
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Use ValueObservation.tracking(request.fetchOne) instead")
    public func observationForFirst() -> ValueObservation<ValueReducers.Unavailable<RowDecoder?>>
    { preconditionFailure() }
}

extension FetchRequest where RowDecoder: FetchableRecord {
    @available(*, unavailable, message: "Use ValueObservation.tracking(request.fetchAll) instead")
    public func observationForAll() -> ValueObservation<ValueReducers.Unavailable<[RowDecoder]>>
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Use ValueObservation.tracking(request.fetchOne) instead")
    public func observationForFirst() -> ValueObservation<ValueReducers.Unavailable<RowDecoder?>>
    { preconditionFailure() }
}

extension FetchRequest where RowDecoder: _OptionalProtocol, RowDecoder.Wrapped: DatabaseValueConvertible {
    @available(*, unavailable, message: "Use ValueObservation.tracking(request.fetchAll) instead")
    public func observationForAll() -> ValueObservation<ValueReducers.Unavailable<[RowDecoder.Wrapped?]>>
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Use ValueObservation.tracking(request.fetchOne) instead")
    public func observationForFirst() -> ValueObservation<ValueReducers.Unavailable<RowDecoder.Wrapped?>>
    { preconditionFailure() }
}

extension FetchRequest where RowDecoder == Row {
    @available(*, unavailable, message: "Use ValueObservation.tracking(request.fetchAll) instead")
    public func observationForAll() -> ValueObservation<ValueReducers.Unavailable<[Row]>>
    { preconditionFailure() }
    
    @available(*, unavailable, message: "Use ValueObservation.tracking(request.fetchOne) instead")
    public func observationForFirst() -> ValueObservation<ValueReducers.Unavailable<Row?>>
    { preconditionFailure() }
}

extension QueryInterfaceRequest {
    @available(*, unavailable, renamed: "RowDecoder")
    typealias T = RowDecoder
}

extension SQLExpression {
    @available(*, unavailable, message: "Use SQL initializer instead")
    public var sqlLiteral: SQL
    { preconditionFailure() }
}

extension FilteredRequest {
    @available(*, unavailable, message: "The expectingSingleResult() hint is no longer available.")
    func expectingSingleResult() -> Self
    { preconditionFailure() }
}

@available(*, deprecated, renamed: "SQL")
typealias SQLLiteral = SQL

/// :nodoc:
@available(*, unavailable, message: "Build literal expressions with SQL.sqlExpression instead.")
struct SQLExpressionLiteral: SQLSpecificExpressible {
    var sqlExpression: SQLExpression { preconditionFailure() }
    
    @available(*, unavailable, message: "Build literal expressions with SQL.sqlExpression instead.")
    public var sql: String { preconditionFailure() }
{'fraction_non_alphanumeric': 0.11126689473389041, 'fraction_numerical': 0.0008973136672087937, 'mean_word_length': 4.8446411012782695, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 103, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5686381', 'n_tokens_mistral': 4791, 'n_tokens_neox': 4653, 'n_words': 1238}