import FluentKit /// A Fluent database that is not an `SQLDatabase`, so the probe's downcast fails. /// /// Every query succeeds, proving the probe reports "not reachable" because of the failed downcast /// rather than a failing backend. struct NotSQLDatabase: Database { let context: DatabaseContext var inTransaction: Bool { false } func execute( query: DatabaseQuery, onOutput: @escaping @Sendable (any DatabaseOutput) -> Void ) -> EventLoopFuture { context.eventLoop.makeSucceededVoidFuture() } func execute( schema: DatabaseSchema ) -> EventLoopFuture { context.eventLoop.makeSucceededVoidFuture() } func execute( enum: DatabaseEnum ) -> EventLoopFuture { context.eventLoop.makeSucceededVoidFuture() } func transaction( _ closure: @escaping @Sendable (any Database) -> EventLoopFuture ) -> EventLoopFuture { closure(self) } func withConnection( _ closure: @escaping @Sendable (any Database) -> EventLoopFuture ) -> EventLoopFuture { closure(self) } }