Protocol
SQLiteDatabase
A protocol describing the minimum requirements for an object allowing access to a generic SQLite database.
protocol SQLiteDatabase : Sendable
Overview
This protocol is intended to assist with connection pooling and other “smells like a simple database but isn’t” use cases. In retrospect, it has become clear that it was poorly designed. Users and implementations alike should try to use SQLiteConnection directly whenever possible.
Topics
Instance Properties
eventLoopThe event loop on which operations on the connection execute.loggerThe logger used by the connection.
Instance Methods
logging(to:)Return a newSQLiteDatabasewhich is indistinguishable from the original save that itsloggerproperty is replaced by the givenLogger.query(_:_:)Wrapper forquery(_:_:_:)which returns the result rows (if any) rather than calling a closure.query(_:_:_:)Convenience method for callingquery(_:_:logger:_:)with the connection’s logger.query(_:_:logger:_:)Execute a query on the connection, calling the provided closure for each result row (if any).withConnection(_:)Call the provided closure with a concreteSQLiteConnectioninstance.
Relationships
Inherits From
Swift.SendableSwift.SendableMetatype